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

📄 goodssearchform.php

📁 推荐的一本书!!!!建议看 !!!!!!!!!
💻 PHP
字号:
<?php

/*
	[插件名称] 商品组合搜索 - 替换模版的{#modGoodsSearchForm#}
	[适用范围] 全站
	[文 件 名] GoodsSearchForm.php
	[更新时间] 2006/9/21
*/


function GoodsSearchForm(){

	global $msql,$fsql,$tsql,$charset,$PagesInfo,$lanZoneSel,$lanCitySel;
	global $tbl_shop_cat,$MenuInfo,$tbl_brand,$tbl_menu,$CONF;


	$PSET=PlusSet("modGoodsSearchForm");
	$tempname=PlusDef($PSET["tempname"],"tpl_goodssearchform.htm");
	

	$catid=$_GET["catid"];
	$key=$_GET["key"];
	$showtj=$_GET["showtj"];
	$showremai=$_GET["showremai"];
	$shownew=$_GET["shownew"];
	$showtejia=$_GET["showtejia"];
	$page=$_GET["page"];
	$brand=$_GET["brand"];
	$fromprice=$_GET["fromprice"];
	$toprice=$_GET["toprice"];

	$hbdanwei=$CONF["hbdanwei"];

	//分类

	$msql->query("select * from $tbl_menu where coltype='shop' and ifshow='1' and ifsearch='1' order by xuhao");
	while($msql->next_record()){
		$menuid=$msql->f('menuid');
		$menu=$msql->f('menu');
		
		$menustr=$menu."-| ";
	
		$fsql->query("select * from $tbl_shop_cat where menuid='$menuid' and pid='0' order by xuhao");
		while($fsql->next_record()){
			$lcatid=$fsql->f('catid');
			$lcat=$fsql->f('cat');
			if($catid==$lcatid){
				$catlist.="<option value='".$lcatid."' selected>".$menustr.$lcat."</option>";
			}else{
				$catlist.="<option value='".$lcatid."'>".$menustr.$lcat."</option>";
			}
			
		}
	
	}
	

	//品牌
	$fsql->query("select * from $tbl_brand order by xuhao ");
	while($fsql->next_record()){
		$lbrand=$fsql->f('brand');
		if($brand==$lbrand){
		$brandlist.="<option value='".$lbrand."' selected>".$lbrand."</option>";
		}else{
		$brandlist.="<option value='".$lbrand."'>".$lbrand."</option>";
		
		}
	}


	$words=$CONF["GoodsHotWords"];

	$arr=explode(",",$words);
	for($i=0;$i<sizeof($arr);$i++){
		if($arr[$i]!=""){
			$ul=urlencode($arr[$i]);
			$hotwords.="<a href=".ROOTPATH."goodssearch.php?key=".$ul.">".$arr[$i]."</a> ";
		}

	}


	//模版解释
	$Temp=LoadTemp(ROOTPATH."templates/".$MenuInfo["skin"]."/".$tempname);



		$var=array (
		'key' => $key, 
		'catlist' => $catlist, 
		'brandlist' => $brandlist, 
		'hotwords' => $hotwords, 
		'hbdanwei' => $hbdanwei, 
		'fromprice' => $fromprice, 
		'toprice' => $toprice, 
		'RP' => ROOTPATH
		);

		$str=ShowTplTemp($Temp,$var);
		return $str;


}
?>

⌨️ 快捷键说明

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