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

📄 showcart.php

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

/*
	[插件名称] 订单购物车列表 - 替换模版标签{#modShowCart#}
	[适用范围] 全站
	[文 件 名] ShowCart.php
	[更新时间] 2007/1/13
*/


function ShowCart(){

	global $fsql,$msql,$charset,$MenuInfo,$tbl_shop_con,$tbl_hb,$KuAlert,$lanCartNone,$lanCartNTC4,$CONF,$lanOrderHbZh;
	global $CONF,$lanOrderHbNTC1,$tbl_goodsprop;

	$PSET=PlusSet("modShowCart");

	$tempname=PlusDef($PSET["tempname"],"tpl_ordercart.htm");

	$CARTSTR=$_COOKIE["CART"];

	//默认货币单位
	$hbname=$CONF["hbname"];
	$hbdanwei=$CONF["hbdanwei"];
	$hbcode=$CONF["hbcode"];


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


		$str=$TempArr["start"];


			$arrey=explode('#',$CARTSTR);
			$tnums=sizeof($arrey)-1;
			$tjine=0;
			$kk=0;

			for($t=0;$t<$tnums;$t++){
				$fff=explode('&',$arrey[$t]);
				$gid=$fff[0];
				$acc=$fff[1];
				$mypr=$fff[3];

				$fsql->query("select * from $tbl_shop_con where id='$gid'");
				if($fsql->next_record()){
					$id=$fsql->f('id');
					$bn=$fsql->f('bn');
					$title=$fsql->f('title');
					$goodstype=$fsql->f('goodstype');
					$tcall=$fsql->f('tcall');
					$danwei=$fsql->f('danwei');
					$price0=$fsql->f('price0');
					$price1=$fsql->f('price1');
					$price2=$fsql->f('price2');
					$price3=$fsql->f('price3');
					$price4=$fsql->f('price4');
					$price5=$fsql->f('price5');
					$price6=$fsql->f('price6');
					$price7=$fsql->f('price7');
					$price8=$fsql->f('price8');
					$price9=$fsql->f('price9');
					$price10=$fsql->f('price10');
					$price11=$fsql->f('price11');
					$price12=$fsql->f('price12');
					$price=NowPrice($id,$goodstype,$price1,$price2,$price3,$price4,$price5,$price6,$price7,$price8,$price9,$price10,$price11,$price12);
					$jine=$price*$acc;
					$jine=number_format($jine,2,'.','');
					
					if($goodstype=="tc"){
						$tcgoods=GoodsTcAll($tcall);
					}else{
						$tcgoods="";
					}

					$var=array (
					'id' => $id,
					'jine' => $jine, 
					'price' => $price,
					'acc' => $acc,
					'goodsname' => $title,
					'tcgoods' => $tcgoods,
					'prop' => $mypr,
					'hbcode' => $hbcode,
					'hbdanwei' => $hbdanwei,
					'hbname' => $hbname,
					'danwei' => $danwei,
					'bn' => $bn
					);


					$str.=ShowTplTemp($TempArr["list"],$var);
					
				}
			$tjine=$tjine+$jine;
			$kk++;
			}
			$tjine=number_format($tjine,2,'.','');


			
			$end=$TempArr["end"];



			if($kk<=0){
				$end=str_replace("{#OrderNotice#}",$lanCartNone."<br>",$end);
				$backurl="index.php";
				$visible="style='display:none'";
			}else{
				$end=str_replace("{#OrderNotice#}",$lanCartNTC4."<br>",$end);
				$backurl="cart.php";
			}


			$end=str_replace("{#visible#}",$visible,$end);
			$end=str_replace("{#tjine#}",$tjine,$end);
			$end=str_replace("{#hbdanwei#}",$hbdanwei,$end);
			$end=str_replace("{#hbname#}",$hbname,$end);
			$end=str_replace("{#hbcode#}",$hbcode,$end);
			$end=str_replace("{#backurl#}",$backurl,$end);
			

			$str.=$end;
			

		
		return $str;


}

?>

⌨️ 快捷键说明

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