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

📄 show_goods.php

📁 LOVESTUdio多校园网络店铺 VER 3.0基于2.0开发
💻 PHP
字号:
<?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[goodsid] == ""){
die("错误的页面地址输入...");
}
?>
<?php
if($_COOKIE['showgoods'] == ""){
setcookie("showgoods",$_GET[goodsid],time()+1800);
$result=$conn->query("SELECT goodsowershop FROM ".$tablepre."goods WHERE goodsid =".$_GET[goodsid]);
$arr = $result->fetch_assoc();
$conn->query("UPDATE ".$tablepre."goods SET `goodshit`= `goodshit`+1 WHERE goodsid=".$_GET[goodsid]);
$conn->query("UPDATE ".$tablepre."shop SET `shophit`=`shophit`+1 WHERE shopid=".$arr[goodsowershop]);
}
else{
if($_COOKIE['showgoods'] !== $_GET[goodsid]){
setcookie("showgoods",$_GET[goodsid],time()+1800);
$result=$conn->query("SELECT goodsowershop FROM ".$tablepre."goods WHERE goodsid =".$_GET[goodsid]);
$arr = $result->fetch_assoc();
$conn->query("UPDATE ".$tablepre."goods SET `goodshit`= `goodshit`+1 WHERE goodsid=".$_GET[goodsid]);
$conn->query("UPDATE ".$tablepre."shop SET `shophit`=`shophit`+1 WHERE shopid=".$arr[goodsowershop]);
}
}
$result=$conn->query("SELECT * FROM ".$tablepre."goods WHERE goodsid =".$_GET[goodsid]);
$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[goodsname]; ?></title>
<link rel="stylesheet" type="text/css" href="skin/style.css" />
</head>
<script language="javascript" type="text/javascript" src="js/menu.js"></script>
<body>
<?php require_once('pagetag/page_top.html'); ?>
<table>
<tr>
<td height="5"></td>
</tr>
</table>
<table align="center" width="964" cellpadding="0" cellspacing="0">
<tr>
<td height="40" background="skin/m_l.gif" width="8"></td>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" background="skin/m_m.gif" height="1"></td>
</tr>
<tr height="38">
<td width="40"><img src="skin/m_pic.gif" /></td><td>
              <a href="goods_list?action=news" target="_parent">
			   最新商品
			   </a>&nbsp;
              |&nbsp;<a href="goods_list.php?action=hot" target="_parent">
			   最热商品
			  </a>&nbsp;
			  |&nbsp;<a href="goods_list.php?action=mode" target="_parent">
				   推荐商品
			  </a>&nbsp;
</td>
</tr>
<tr>
<td colspan="2" background="skin/m_m.gif" height="1"></td>
</tr>
</table>
</td>
<td background="skin/m_r.gif" width="8"></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table>
<?php
$res = $conn->query("SELECT * FROM ".$tablepre."shop WHERE shopid = ".$arr[goodsowershop]);
$aer = $res->fetch_assoc();
$rest = $conn->query("SELECT * FROM ".$tablepre."shopann WHERE annowner='$aer[shopowner]' ORDER BY shannid DESC");
?>
<table align="center" width="964" 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" width="944">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="73%" align="right">&nbsp;&nbsp;&nbsp;<img src="skin/smallpic/gg.gif" />&nbsp;店铺公告:</td>
<td width="25%">
<marquee border="0" scrollamount="2"  scrolldelay="60" behavior="scroll" onMouseOver="this.stop()" onMouseOut="this.start()" width="100%">
<?php
while($aor = $rest->fetch_assoc())
{
echo $aor[shanntitle];
echo "&nbsp;[";
echo substr($aor[shanntime],0,10);
echo "]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
}
?>
</marquee>
</td>
<td width="2%"></td>
</tr>
</table>
</td>
<tr>
<td width="22%">
<a href="upload/goodsimg/<?php echo $arr[goodsimg]; ?>" target="_blank">
<img src="upload/goodsimg/<?php echo $arr[goodsimg]; ?>" width="200" height="200" border="1" />
</a>
</td>
<td width="78%" valign="top">
<table width="100%" border="1" bordercolor="#F5EFEA" cellpadding="4" cellspacing="0">
<tr>
<td width="11%" align="right">商品名称:</td>
<td width="44%"><?php echo $arr[goodsname]; ?></td>
<td width="11%" align="right">店铺名称:</td>
<td width="34%"><?php echo $aer[shopname]; ?></td>
</tr>
<tr>
<td align="right">商品价格:</td>
<td class="red"><?php echo $arr[goodsprice] ?>元</td>
<td align="right">店铺地址:</td>
<td class="red"><?php echo $aer[shopaddress]; ?></td>
</tr>
<tr>
<td align="right">价格类型:</td>
<td class="red"><?php selectpricetype($arr[goodsyijia]); ?></td>
<td align="right">店铺掌柜:</td>
<td><?php echo $aer[shopowner]; ?></td>
</tr>
<tr>
<td align="right">商品数量:</td>
<td class="red"><?php echo $arr[goodsnum]; ?></td>
<td align="right">联系电话:</td>
<td class="red"><?php echo $aer[contactway]; ?></td>
</tr>
<tr>
<td align="right">上架时间:</td>
<td><?php echo $arr[goodstime]; ?></td>
<td align="right">QQ:</td>
<td class="red"><?php echo checklei($aer[shopowner],$tablepre.user,username,userqq); ?></td>
</tr>
<tr>
<td colspan="4">
<table width="100%" cellpadding="0" cellspacing="0">
<tr align="left">
<td width="25%">
<img src="skin/hit.gif" />&nbsp;被浏览<font color="#0000FF"><?php echo $arr[goodshit]; ?></font>次
</td>
<td width="25%">
<img src="skin/mail.gif" />
给店长发短信息
</td>
<td width="25%">
<img src="skin/master.gif" />
查看店长资料
</td>
<td width="25%">
<img src="skin/seesh.gif" />
浏览该店铺其它商品
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" height="30">商品描述</td>
</tr>
<tr>
<td height="1" class="line1" colspan="2"></td>
</tr>
<tr>
<td colspan="2">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>

<br>
<?php echo stripslashes($arr[goodsmaosu]); ?></td>
</tr>
</table></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>



<?php
require_once('pagetag/bottommation.php'); 
$conn->close();
?>
</body>
</html>

⌨️ 快捷键说明

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