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

📄 shopmenuall.php

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

/*
	[插件名称] 商品分类栏目菜单 - 替换模版标签{#modShopMenuAll#}
	[适用范围] 商品检索页,内容页
	[文 件 名] ShopMenuAll.php
	[更新时间] 2007/2/11
*/



function ShopMenuAll(){

		global $msql,$tbl_shop_cat,$CatchOpen;
		global $NowMenuid,$MenuInfo;


		$PSET=PlusSet("modShopMenuAll");

		$showmenuid=PlusDef($PSET["showmenuid"],MenuDef("shop",$NowMenuid));
		$catid=PlusDef($PSET["catid"],"0");
		$shownums=PlusDef($PSET["shownums"],"15");
		$ord=PlusDef($PSET["ord"],"xuhao");
		$sc=PlusDef($PSET["sc"],"asc");
		$onlytj=PlusDef($PSET["onlytj"],"0");
		$target=PlusDef($PSET["target"],"_self");
		$tempname=PlusDef($PSET["tempname"],"tpl_classmenu.htm");

		$scl=" menuid!='0' ";

		if($showmenuid!="0" && $showmenuid!=""){
			$scl.=" and menuid='$showmenuid' ";
		}

		if($onlytj=="1"){
			$scl.=" and tj='1' ";
		}


			
		$msql->query("select * from $tbl_shop_cat where $scl order by $ord $sc");
		$i=0;
		while($msql->next_record()){
				$ArrayPid[$i]=$msql->f("pid");
				$ArrayMenuid[$i]=$msql->f("menuid");
				$ArrayCatid[$i]=$msql->f("catid");
				$ArrayCat[$i]=$msql->f("cat");
				$ArrayCatpath[$i]=$msql->f("catpath");
				$ArrayCatNums[$i]=$msql->f("nums");
		$i++;
		}
		$TotalCat=$i;

        



		//模版解释
		$Temp=LoadTemp(ROOTPATH."templates/".$MenuInfo["skin"]."/".$tempname);
		$TempArr=SplitTblTemp($Temp);
		
		//循环开始
		$bigcat=$TempArr["start"];

		$s=1;
		for($t=0;$t<$TotalCat;$t++){
			//if($ArrayPid[$t]=="0"){
				
				
				$fold=MenuFold($ArrayMenuid[$t]);

				if($CatchOpen=="1" && file_exists(ROOTPATH.$fold."/class/".$ArrayCatid[$t].".html")){
					$u=ROOTPATH.$fold."/class/".$ArrayCatid[$t].".html";
				}else{
					$u=ROOTPATH.$fold."/class/?".$ArrayCatid[$t].".html";
				}


				$catstr=str_replace("{#TopClass#}",$ArrayCat[$t],$TempArr["menu"]);
				$catstr=str_replace("{#TopClassUrl#}",$u,$catstr);
				$catstr=str_replace("{#ClassNums#}",$ArrayCatNums[$t],$catstr);
				$catstr=str_replace("{#width#}","width=".$tdwidth."%",$catstr);
				$catstr=str_replace("{#target#}",$target,$catstr);

				
				$bigcat.=$catstr;

				

				if($s>=$shownums && $shownums!=0){
					break;
				}
				$s++;
			
			//}
		}




        $bigcat.=$TempArr["end"];
       
			if($s>1){
				return $bigcat;
		
			}

		
}


?>

⌨️ 快捷键说明

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