⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 show_shop.php

📁 LOVESTUdio多校园网络店铺 VER 3.0基于2.0开发
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php
require_once('libs/session.inc');
require_once('libs/config.inc');
require_once('libs/dbmanager.inc');
require_once('libs/function.inc');
$conn = DBManager::getConnection(); 
if($_GET[shopid] == ""){
die("错误的页面地址输入...");
}
?>
<?php
if($_COOKIE['showshop'] == ""){
setcookie("showshop",$_GET[shopid],time()+1800);
$addhit = $conn->query("UPDATE ".$tablepre."shop SET `shophit`=`shophit`+1 WHERE shopid=".$_GET[shopid]);
}
else{
if($_COOKIE['showshop'] !== $_GET[shopid]){
setcookie("showshop",$_GET[shopid],time()+1800);
$addhit = $conn->query("UPDATE ".$tablepre."shop SET `shophit`=`shophit`+1 WHERE shopid=".$_GET[shopid]);
     }

}
$result = $conn->query("SELECT * FROM ".$tablepre."shop WHERE shopid=".$_GET[shopid]);
$arr = $result->fetch_assoc();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?php echo $arr[shopname]; ?></title>
<link rel="stylesheet" type="text/css" href="skin/style.css" />
</head>
<script language="javascript" type="text/javascript" src="js/menu.js"></script>
<script language="javascript" type="text/javascript">
function DrawImage(ImgD,iwidth)
{
 var image=new Image();
 image.src=ImgD.src;
 if(image.width>0 && image.height>0)
 {
  if(image.width>iwidth)
  {  
   ImgD.width=iwidth;
   ImgD.height=(image.height*iwidth)/image.width;
  }
 }
 ImgD.style.display = "block";
} 
</script>

<body>
<?php require_once('pagetag/page_top.html'); ?>
<table align="center" width="964" cellpadding="0" cellspacing="0">
<tr>
<td height="10"></td>
</tr>
<tr>
<td width="250" valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="10"><img src="skin/smallpic/ta_tl.gif" /></td>
<td background="skin/smallpic/ta_t.gif"></td>
<td><img src="skin/smallpic/ta_tr.gif" /></td>
</tr>
<tr>
<td  background="skin/smallpic/ta_l.gif"></td>
<td valign="top" height="300" width="230">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="30" background="skin/shn.gif" align="right" valign="bottom" style=" padding-bottom:3px"><a href="?shopid=<?php echo $_GET[shopid]; ?>&action=news"><img border="0" src="skin/smallpic/more3.gif" /></a></td>
</tr>
<tr><td height="1" background="skin/line1.gif"></td></tr>
<tr>
<td>
<div style="overflow:auto; width:230px; height:300px">
<?php
$rest = $conn->query("SELECT * FROM ".$tablepre."shopnews WHERE newsowner='$arr[shopowner]' ORDER BY shnid DESC LIMIT 0,2");
while($aor = $rest->fetch_assoc())
{
echo "<font color=red>";
echo $aor[shntitle];
echo "</font><br />发表于:<font color=red>";
echo $aor[shntime];
echo "</font><br />";
echo $aor[shnnr];
echo "<br /><br />";
}
?>
</div>
</td>
</tr>
</table>
</td>
<td background="skin/smallpic/ta_r.gif"></td>
</tr>
<tr>
<td><img src="skin/smallpic/ta_bl.gif" /></td>
<td background="skin/smallpic/ta_b.gif"></td>
<td><img src="skin/smallpic/ta_br.gif" /></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="10"><img src="skin/smallpic/ta_tl.gif" /></td>
<td background="skin/smallpic/ta_t.gif"></td>
<td><img src="skin/smallpic/ta_tr.gif" /></td>
</tr>
<tr>
<td  background="skin/smallpic/ta_l.gif"></td>
<td valign="top" height="300" width="230">
<table width="100%" cellpadding="0" cellspacing="0">
<tR>
<td height="30" background="skin/ann.gif" align="right" valign="bottom" style=" padding-bottom:3px"><a href="?shopid=<?php echo $_GET[shopid]; ?>&action=ann"><img border="0" src="skin/smallpic/more3.gif" /></a></td>
</tR>
<tr><td height="1" background="skin/line1.gif"></td></tr>
<tr>
<tr>
<td>
<div style="overflow:auto; width:230px; height:300px">
<?php
$rest = $conn->query("SELECT * FROM ".$tablepre."shopann WHERE annowner='$arr[shopowner]' ORDER BY shannid DESC LIMIT 0,2");
while($aor = $rest->fetch_assoc())
{
echo "<font color=red>";
echo $aor[shanntitle];
echo "</font><br />发表于:<font color=red>";
echo $aor[shanntime];
echo "</font><br />";
echo $aor[shannnr];
echo "<br /><br />";
}
?>
</div>
</td>
</tr>
</table>
</td>
<td background="skin/smallpic/ta_r.gif"></td>
</tr>
<tr>
<td><img src="skin/smallpic/ta_bl.gif" /></td>
<td background="skin/smallpic/ta_b.gif"></td>
<td><img src="skin/smallpic/ta_br.gif" /></td>
</tr>
</table>
</td><td width="5"></td>
<td width="709" valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="10"><img src="skin/smallpic/ta_tl.gif" /></td>
<td background="skin/smallpic/ta_t.gif"></td>
<td><img src="skin/smallpic/ta_tr.gif" /></td>
</tr>
<tr>
<td  background="skin/smallpic/ta_l.gif"></td>
<td valign="top" height="200" width="689">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="23%" align="right">店铺广播:</td>
<td>
<marquee border="0" scrollamount="2"  scrolldelay="60" behavior="scroll" onMouseOver="this.stop()" onMouseOut="this.start()" width="100%">
<?php
$rest = $conn->query("SELECT * FROM ".$tablepre."shopann WHERE annowner='$arr[shopowner]' AND shannmode =1 ORDER BY shannid DESC");
while($aor = $rest->fetch_assoc())
{
echo $aor[shannnr];
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
}
?>
</marquee>
</td>
<td align="right"><a href="?shopid=<?php echo $_GET[shopid]; ?>">查看商品</a>&nbsp;</td>
</tr>
<tr>
<td valign="top" align="center">
<a href="upload/shoplogo/<?php echo $arr[shopimg] ?>" target="_blank">
<img src="upload/shoplogo/<?php echo $arr[shopimg] ?>" border="1" width="150" height="150" />
</a>
<br />
欢迎光临[<font color="#0000FF"><?php echo $arr[shopname]; ?></font>]
</td>
<td width="44%" valign="top">
<table border="1" bordercolor="#F5EFEA" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td width="23%" align="right">掌柜:</td>
<td width="77%">&nbsp;<?php echo $arr[shopowner]; ?></td>
</tr>
<tr>
<td align="right">地址:</td><td>&nbsp;<?php echo $arr[shopaddress]; ?></td>
</tr>
<tr>
<td align="right">联系电话:</td><td>&nbsp;<?php echo $arr[contactway]; ?></td>
</tr>
<tr>
<td align="right">QQ:</td><td>&nbsp;<?php echo checklei($arr[shopowner],$tablepre.user,username,userqq); ?></td>
</tr>
<tr>
<td align="right">人气:</td><td>&nbsp;<?php echo $arr[shophit]; ?></td>
</tr>
<tr>
<td align="right">
留言:</td><td>&nbsp;<a href="user/user_mail.php?action=write&pmto=<?php echo $arr[shopowner]; ?>" target="_blank"><img src="skin/smallpic/22.gif" border="0" /></a></td>
</tr>
<tr>
<td align="right">QQ交谈:</td><td>&nbsp;<a target=blank href=tencent://message/?uin=<?php echo checklei($arr[shopowner],$tablepre.user,username,userqq); ?>&Site=www.lovestu.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:<?php echo checklei($arr[shopowner],$tablepre.user,username,userqq); ?>:7 alt="与店长交谈" /></a></td>
</tr>
</table>
</td>
<td width="33%" valign="top">
<table border="1" bordercolor="#F5EFEA" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td>
 店铺描述:</td>
 </tr>
 <tr>
 <td>
<div style="overflow:auto; width:220px; height:155px">
<?php echo $arr[shopmaosu]; ?>
</div>

</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="red">&nbsp;<a href="?shopid=<?php echo $_GET[shopid]; ?>">查看商品</a></td>
<td align="center">被投诉
<?php
$rest = $conn->query("SELECT * FROM ".$tablepre."tousu WHERE tsshop='$arr[shopname]'");
$tsnum=0;
while($alr = $rest->fetch_assoc()){
$tsnum++;
}
echo "<font color='blue'>".$tsnum."</font>";
?>
次</td>
<td align="center"><a href="shop_ts.php?shopname=<?php echo $arr[shopname]; ?>">投诉该店铺</a></td>
</tr>
<tr><td colspan="3" height="1" background="skin/line1.gif"></td></tr>
<tr>
<td colspan="3">
<?php
if($_GET[action] == ""){
$sql = "SELECT * FROM ".$tablepre."goods WHERE goodsowershop = '$arr[shopid]' ORDER BY goodsshopmode DESC,goodsid DESC";
$res = $conn->query($sql);
$total = 0;
while($akr = $res->fetch_assoc()){
$total++;
}
               $page = new ShowPage;   
               $page->PageSize = 10;   
               $page->Total = $total;   
               $page->LinkAry = array();                    
               $showpage = $page->ShowLink();
$res = $conn->query("SELECT * FROM ".$tablepre."goods WHERE goodsowershop = '$arr[shopid]' ORDER BY goodsshopmode DESC,goodsid DESC LIMIT ".$page->OffSet());
?>
<table width="100%" border="1" bordercolor="#F5EFEA" cellpadding="4" cellspacing="0">
<tr align="center">
<td width="27%">商品名称</td>
<td width="12%">图片</td>
<td width="11%">价格</td>
<td width="11%">议价</td>
<td width="8%">数量</td>
<td width="22%">上架时间</td>
<td width="9%">本店推荐</td>
</tr>
<?php
while ($arr = $res->fetch_assoc())
{

?>
<tr align="center">
<td><a href="show_goods.php?goodsid=<?php echo $arr[goodsid]; ?>" target="_blank"><?php echo $arr[goodsname]; ?></a></td>
<td><a href="show_goods.php?goodsid=<?php echo $arr[goodsid]; ?>" target="_blank"><img src="upload/goodsimg/<?php echo $arr[goodsimg]; ?>" width="50" height="50" border="1" /></a></td>
<td class="red"><?php echo $arr[goodsprice]; ?>元</td>
<td class="red"><?php echo selectpricetype($arr[goodsyijia]); ?></td>
<td><?php echo $arr[goodsnum]; ?></td>
<td><?php echo $arr[goodstime]; ?></td>
<td><img src="skin/smallpic/<?php echo selectshopgoodsmode($arr[goodsshopmode]); ?>" /></td>
</tr>
<?php
}
?>
<tr>
     <td align="right" colspan="7"><?php echo $showpage; ?>&nbsp;&nbsp;</td>
  </tr>
</table>
<?php
}elseif($_GET[action] == news){
$sql = "SELECT * FROM ".$tablepre."shopnews WHERE  newsowner= '$arr[shopowner]' ORDER BY shnid DESC";
$res = $conn->query($sql);
$total = 0;
while($aor = $result->fetch_assoc()){
$total++;
}         
               $page = new ShowPage;   
               $page->PageSize = 5;   
               $page->Total = $total;   
               $page->LinkAry = array();                    
               $showpage = $page->ShowLink();

$res = $conn->query("SELECT * FROM ".$tablepre."shopnews WHERE  newsowner= '$arr[shopowner]' ORDER BY shnid DESC LIMIT ".$page->OffSet());

?>
<table width="100%" border="1" bordercolor="#F5EFEA" cellpadding="4" cellspacing="0">
<tr align="center">
<td width="7%">序号</td>
<td width="67%">新闻标题</td>
<td width="26%">发表时间</td>
</tr>
<?php
while($aer = $res->fetch_assoc()){
?>
<tr>
<td align="center"><?php echo $aer[shnid]; ?></td>
<td>&nbsp;&nbsp;<a href="show_mation.php?action=shn&shnid=<?php echo $aer[shnid] ?>" target="_blank"><?php echo $aer[shntitle]; ?></a></td>
<td align="center"><?php echo $aer[shntime]; ?></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -