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

📄 category.htm

📁 PHPShops多用户商城系统(简称PHPShops)是基于电子商务的一套平台交易系统
💻 HTM
字号:
<!--<?php
print <<< EOT
-->
<div id="now-position">您现在的位置:$navigation</div>
<div class="c"></div>
<div style="padding-right:2px">
	<div class="h2Bbox">
		<h2 class="active"><span>$subcategory</span></h2>
<!--
EOT;
if($nameplate){print <<< EOT
-->
		<h2><span><a href="category.php?cid=$cid&second=1&list_type=$list_type&perpage=$perpage&sortby=$sortby&nid=">按品牌分类</a></span></h2>
<!--
EOT;
}print <<<EOT
-->
	</div>
	<div class="borderB catebox">
		<ul class="good-cate-list good-cate-listB">
<!--
EOT;
foreach($Subdb as $val){print <<< EOT
-->
			<li><a href="category.php?cid=$val[cid]">$val[name]</a></li>
<!--
EOT;
}print <<<EOT
-->
		</ul>
	</div>
</div>
<div class="c"></div>
<div id="main-wrapC">
	<div id="contentB">
		<div id="content-mainB">
			<div id="newgoods">
				<div class="h2Abox">
					<h2 class="active"><span>全部商品</span></h2>
					<h2><span><a href="category.php?cid=$cid&second=2">二手商品</a></span></h2>
				</div>
				
				<div class="borderA">
					<div class="hB tar">
						<span class="fl">显示方式:						
						<a href="category.php?cid=$cid&list_type=1&sortby=$sortby&page=$page"><img src="$imgpath/$stylepath/$mode_list_1" /></a><a href="category.php?cid=$cid&list_type=2&sortby=$sortby&page=$page"><img src="$imgpath/$stylepath/$mode_list_2" /></a></span>
						<span class="fl">每页显示数目:<a href="category.php?cid=$cid&perpage=20&sortby=$sortby&page=$page"><img src="$imgpath/$stylepath/$goods_amount_20" /></a><a href="category.php?cid=$cid&perpage=40&sortby=$sortby&page=$page"><img src="$imgpath/$stylepath/$goods_amount_40" /></a><a href="category.php?cid=$cid&perpage=80&sortby=$sortby&page=$page"><img src="$imgpath/$stylepath/$goods_amount_80" /></a></span>
						<span class="fl" style="margin-top:-.3em"><!--<img src="$imgpath/$stylepath/$sortby_price" align="absmiddle" /> -->
						<form action="category.php?cid=$cid&list_type=$list_type&perpage=$perpage&page=$page" method="post" name="sortby">
						排序方式:<select name="sortby" onchange="javascript:submit(sortby)" style="vertical-align:middle; height:16px; font-size:12px;">
							<option value="0">选择排序方式</option>
							<option value="1" $sortby_1>按价格 从低到高</option>
							<option value="2" $sortby_2>按价格 从高到低</option>
							<option value="3" $sortby_3>按上架时间 从近到远</option>
							<option value="4" $sortby_4>按上架时间 从远到近</option>
						</select>
						</form></span>
					</div>
					
					<form action="job.php?action=compare" method="post" name="goodslist">
<!--
EOT;
$lang_type = array(1=>'一口价',2=>'拍卖',3=>'团购');
if($list_type == '1'){print <<<EOT
-->
					<div class="shop-goodsList">
						<ul>
<!--
EOT;
foreach($goodsdb as $val){print <<<EOT
-->
							<li>
								<dl>
									<dt class="pic"><a href="detail.php?tid=$val[tid]"><img src="$val[httppic]" width="160" height="160" /></a><input type="checkbox" name="selid[]" value="$val[tid]" /><a href="detail.php?tid=$val[tid]">$val[subject]</a></dt>
									<dd><span class="grayB">{$lang_type[$val[itemtype]]}</span> <strong class="orange-txt">$val[itemprice]</strong> </dd>
								</dl>
							</li>
<!--
EOT;
}print <<<EOT
-->
						</ul>
					</div>
					<div class="c"></div>
<!--
EOT;
} else{print <<<EOT
-->
					<div style="border-bottom:1px dashed #d9d9d9;margin:0;padding:.5em;overflow:hidden;float:left; font-family:Tahoma; ">
						<div style="width:70%; float:left;"><input type="button" value="对比选中的商品" onclick="Compare(document.goodslist)"/></div>
						<div style="float:right;padding-right:30px;text-align:left;margin-top:.5em;width:13%;">剩余时间</div>
						<div style="width:10%; float:left; padding-left:340px; margin-top:.5em">价格</div>
					</div>
<!--
EOT;
foreach($goodsdb as $val){
$val['surplus'] = $val[min].'分';
($val[hour] || $val[day]) && $val['surplus'] = $val[hour].'小时'.$val['surplus'];
$val[day] && $val['surplus'] = $val[day].'天'.$val['surplus'];
print <<<EOT
-->

					<dl class="s-good-ind" id="goods_$val[tid]">
						<dd class="date">$val[surplus]</dd>
						<dd style="width:30px;margin-top:30px;">
							<input type="checkbox" name="selid[]" value="$val[tid]" />
						</dd>
						<dd class="pic">
							<a href="detail.php?tid=$val[tid]"><img src="$val[httppic]" width="90" height="90" /></a>
						</dd>
						<dt>
							<a href="detail.php?tid=$val[tid]" class="orange-t">$val[subject]</a> 
							<span class="dsc">卖家: <a href="shop.php?uid=$val[uid]">$val[seller]</a></span>
							<span class="dsc"> 
<!--
EOT;
if($_SYS['goods_commend'] || $usr_name==$manager){print <<<EOT
-->
								<a style="cursor:pointer;" title="设置成系统推荐商品" OnClick="sendmsg('ajax.php','action=commend_goods&tid=$val[tid]');">推荐</a>&nbsp;
<!--
EOT;
}if($_SYS['delgoods'] || $usr_name==$manager){print <<<EOT
-->
								<a style="cursor:pointer;" title="删除该商品" style="cursor:pointer" onclick="del_goods('$val[tid]');">删除</a>&nbsp; 
<!--
EOT;
}if($db_reportgoods && $_G['report_goods']){print <<<EOT
-->
								<a style="cursor:pointer;" title="向系统举报该商品" OnClick="sendmsg('ajax.php','action=report_goods&tid=$val[tid]',this.id);" id="report_$val[tid]">举报</a>
<!--
EOT;
}print <<<EOT
-->
							</span>
						</dt>
						<dd>{$lang_type[$val[itemtype]]}<br /><strong class="orange-txt"> $val[itemprice] </strong><br /></dd>
					</dl>
<!--
EOT;
}}print <<<EOT
-->		
					
						<span class="fl">$pages</span>
						<span style="float:right;text-align:left;margin-top:.3em;width:13%;"><input type="button" value="商品比较" onclick="Compare(document.goodslist)" /></span>
					</form>
				</div>
			</div>
			<div class="c"></div>
		</div>
		<div id="content-side">
<!--
EOT;
if($infomation){print <<<EOT
-->
			<div class="boxB">
				<h4 class="h4B">资讯信息</h4>
				<ul class="puListB">
<!--
EOT;
foreach($infomation as $val){print <<<EOT
-->
					<li><a href="article.php?itemid=$val[itemid]">[$val[sortid]] $val[subject]</a></li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
			</div>
<!--
EOT;
}print <<<EOT
-->
			<div class="boxC">
				<h4 class="h4C">你浏览过的商品</h4>
				<ul class="puListC" id="lastview">
				<form action="job.php?action=compare" method="post" name="lastview" target="_blank">
<!--
EOT;
foreach($Goods_LastView as $val){print <<<EOT
-->
					<li><input type="checkbox" name="selid[]" value="$val[tid]" /> <a href="detail.php?tid=$val[tid]">$val[subject]</a></li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
				<ul class="puListC">
					<div class="fl" style="padding:.5em"><a class="anniuA" onclick="clear_view()" style="cursor:hand;"><span>清除记录</span></a></div>
					<div class="fr" style="padding:.5em"><a class="anniuA" onclick="Compare(document.lastview)" style="cursor:hand;"><span>对 比</span></a></div>
				</ul>
				</form>
			</div>
		</div>
	</div>
</div>
<div class="c"></div>

<script language=JavaScript>
var tid;
function del_goods(id){
	if(confirm('您确定要删除该商品吗?')){
		ajax.send('ajax.php','action=del_goods&tid='+id,function(){
			if(ajax.request.responseText.indexOf('\tsuccess') != -1){
				$('goods_'+id).style.display = 'none';
			}
			ajax.guide();
		});
	}
}
function clear_view(){
	ajax.send('ajax.php','action=clearview',function(){
		if(ajax.request.responseText.indexOf('\tsuccess') != -1){
			$('lastview').style.display = 'none';
		}
		ajax.guide();
	});
}
function Compare(form){
	for(var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(e.checked == true){
			form.submit();
			return false;
		}
	}
	alert('请选择要比较的商品');
	return false;
}
</script>
<!--
EOT;
?>-->

⌨️ 快捷键说明

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