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

📄 search.htm

📁 PHPShops多用户商城系统(简称PHPShops)是基于电子商务的一套平台交易系统
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!--<?php print <<< EOT
-->
<div id="now-position">您现在的位置: <a href="index.php">$db_shopname</a> &raquo; <strong>高级搜索</strong></div>
<div class="c"></div>
<div id="main-wrapC">
<!--
EOT;
if($type == 'goods'){print <<< EOT
-->
	<div id="contentB">
		<div id="content-mainB">
			<div id="newgoods">
<!--
EOT;
if(!$step){print <<< EOT
-->
				<div class="h2Abox">
					<h2 class="active"><span>搜索商品</span></h2>
					<h2><span><a href="search.php?type=shop">搜索店铺</a></span></h2>
					<h2><span><a href="search.php?type=article">搜索资讯</a></span></h2>
				</div>
				<div class="borderA">
				<form action="search.php?type=goods" method="post">
				<input type="hidden" name="step" value="2" />
				<table class="tableA" width="98%"  cellspacing="1" cellpadding="3" align="center" style="margin:4em  auto 2em">
					<tr>
						<td width="15%" align="right">关键字:</td>
						<td width="65%" align="left"><input type="text" name="keyword" size="30" /></td>
					</tr>
					<tr>
						<td align="right">商品类别:</td>
						<td align="left"><select name="cid">
								<option value=''></option>
								$selcategory
							</select>
						</td>
					</tr>
					<tr>
						<td align="right">卖家会员名:</td>
						<td align="left"><input type="text" name="seller" size="30" /></td>
					</tr>
					<tr>
						<td align="right">推荐商品:</td>
						<td align="left"><input type="checkbox" name="ifcommend" value="1" /> 是 </td>
					</tr>
				</table>
				<div style="text-align:center; margin-bottom:3em">
					<input type="submit" value="立 即 搜 索" />
				</div>
				</form>
			</div>
<!--
EOT;
} elseif($step == '2'){print <<< EOT
-->
			<div class="h2Abox">
				<h2 class="active"><span>搜索商品结果</span></h2>
				<h2><span><a href="search.php?type=shop">搜索店铺</a></span></h2>
				<h2><span><a href="search.php?type=article">搜索资讯</a></span></h2>
			</div>
			<div class="borderA">
				<div class="hB tar">
					<span class="fl">显示方式:						
					<a href="search.php?type=goods&step=2&list_type=1&perpage=$perpage&sortby=$sortby&page=$page&cid=$cid&seller=$seller&ifcommend=$ifcommend&keyword=$keyword"><img src="$imgpath/$stylepath/$mode_list_1" /></a><a href="search.php?type=goods&step=2&list_type=2&perpage=$perpage&sortby=$sortby&page=$page&cid=$cid&seller=$seller&ifcommend=$ifcommend&keyword=$keyword"><img src="$imgpath/$stylepath/$mode_list_2" /></a></span>
					<span class="fl">每页显示数目:<a href="search.php?type=goods&step=2&list_type=$list_type&perpage=20&sortby=$sortby&page=$page&cid=$cid&seller=$seller&ifcommend=$ifcommend&keyword=$keyword"><img src="$imgpath/$stylepath/$goods_amount_1" /></a><a href="search.php?type=goods&step=2&list_type=$list_type&perpage=40&sortby=$sortby&page=$page&cid=$cid&seller=$seller&ifcommend=$ifcommend&keyword=$keyword"><img src="$imgpath/$stylepath/$goods_amount_2" /></a><a href="search.php?type=goods&step=2&list_type=$list_type&perpage=80&sortby=$sortby&page=$page&cid=$cid&seller=$seller&ifcommend=$ifcommend&keyword=$keyword"><img src="$imgpath/$stylepath/$goods_amount_3" /></a></span>
					<span class="fl" style="margin-top:-.3em"><form action="search.php?type=goods&step=2&cid=$cid&list_type=$list_type&perpage=$perpage&page=$page&cid=$cid&seller=$seller&ifcommend=$ifcommend&keyword=$keyword" method="post" name="sortby">
					排序方式:<select name="sortby" onchange="javascript:submit(sortby)" style="vertical-align:middle; height:16px; font-size:12px;">
						<option value="0" $sortby_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;
if($list_type == '1'){print <<<EOT
-->
					
					<div class="shop-goodsList">
						<ul>
<!--
EOT;
foreach($goodsdb as $val){
if($val['itemtype'] == '1'){
	$val['itemtype'] = '一口价';
} elseif($val['itemtype'] == '3'){
	$val['itemtype'] = '团购';
}
print <<<EOT
-->
							<li>
								<dl>
									<dt><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">$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:21%; float:left;"><input type="button" value="对比选中的商品" onclick="Compare(document.goodslist)"/></div>
						<div style="width:10%; float:left; padding-left:340px; margin-top:.5em">价格</div>
						<div style="float:right;padding-right:30px; text-align:right; margin-top:.5em;width:15%;">剩余时间</div>
					</div>
<!--
EOT;
foreach($goodsdb as $val){
if($val['itemtype'] == '1'){
	$val['itemtype'] = '一口价';
} elseif($val['itemtype'] == '3'){
	$val['itemtype'] = '团购';
}
 
$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">举报</a>
<!--
EOT;
}print <<<EOT
-->
							</span>
						</dt>
						<dd>$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>
<!--
EOT;
}print <<< EOT
-->
		</div>
		<div class="c"></div>
	</div>
	<div id="content-side">
		<div class="boxC">
			<h4 class="h4C">你浏览过的商品</h4>
			<ul class="puListC">
			<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>
<script language=JavaScript>
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;
} elseif($type == 'shop'){print <<< EOT
-->
	<div id="contentB">
		<div id="content-mainB">
			<div id="newgoods">
<!--
EOT;
if(!$step){print <<< EOT
-->
				<div class="h2Abox">
					<h2><span><a href="search.php?type=goods">搜索商品</a></span></h2>
					<h2 class="active"><span>搜索店铺</span></h2>
					<h2><span><a href="search.php?type=article">搜索资讯</a></span></h2>
				</div>
				<div class="borderA">
				<form action="search.php?type=shop" method="post">
				<input type="hidden" name="step" value='2' />
				<table class="tableA" width="98%"  cellspacing="1" cellpadding="3" align="center" style="margin:4em  auto 2em">
					<tr>
						<td width="15%" align="right">卖家会员名:</td>
						<td width="65%" align="left"><input type="text" name="username" size="30" />
						</td>
					</tr>
					<tr>
						<td width="15%" align="right">卖家分类:</td>
						<td width="65%" align="left">

⌨️ 快捷键说明

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