freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于php網(wǎng)上購(gòu)物系統(tǒng)-資料下載頁(yè)

2024-11-06 07:15本頁(yè)面

【導(dǎo)讀】起止時(shí)間:2020-10-15至2020-12-03. 河南城建學(xué)院畢業(yè)設(shè)計(jì)(論文)

  

【正文】 ction checkIdCard($idCard) { $preg=/^[09]{18}$/。 $preg2=/^[09]{17}x$/。 return (preg_match($preg,$idCard) || preg_match($preg2,$idCard))。 } $db=new MyDB()。 if(count($_POST)0){ $error=。 $flag=0。 //$flag=true @$pwd=$_POST[39。userpwd39。]。 @$rePwd=$_POST[39。userrepwd39。]。 if(!checkRepassword($pwd,$rePwd)) { $error=兩次密碼不一致 。 $flag=1。 echo $error。 } @$birthday=$_POST[39。birthday39。]。 if(!checkBirthday($birthday)amp。amp。flag==0) { $error=生日格式不正確 。 $flag=1。 echo $error。 河南城建學(xué)院畢業(yè)設(shè)計(jì)(論文) 32 } @$=$_POST[39。39。]。 if(!checkEmail($)amp。amp。flag==0) { $error=郵箱格式不正確 。 $flag=1。 echo $error。 } @$idcard=$_POST[39。idcard39。]。 if(!checkIdCard($idcard)amp。amp。flag==0) { $error=身份證格式不正確 。 $flag=1。 echo $error。 } if(flag==0amp。amp。$error==){ @$name=$_POST[39。username39。]。 @$sex=$_POST[39。sex39。]。 @$selectpics=$_POST[39。selectpics39。]。 $reg_date=date(39。Ymd His39。)。 $lastlogintime=date(39。Ymd His39。)。 $sql=insert into user values(null,39。$name39。,39。$pwd39。,39。$reg_date39。,39。$lastlogintime39。,39。$39。,39。$sex39。, 39。$birthday39。,39。$selectpics39。,39。$idcard39。,0,0)。 $res=$dbexecute($sql)。 if($res) { echo 。 } } } //$tpldisplay(error,error)。 $tpldisplay()。 ? 河南城建學(xué)院畢業(yè)設(shè)計(jì)(論文) 33 購(gòu)物車(chē)功能模塊設(shè)計(jì) 客戶通過(guò)購(gòu)物車(chē)購(gòu)買(mǎi)商品時(shí),購(gòu)物車(chē)要隨時(shí)計(jì)算客戶所有購(gòu)買(mǎi)的商品價(jià)格,因此需要一個(gè)購(gòu)物車(chē)數(shù)據(jù)庫(kù)表記錄商品的基本信息,客戶通過(guò)購(gòu)物車(chē)買(mǎi)完商品后,還需要填寫(xiě)送貨方式、付款方式等客戶的基本信息,然后,才能從網(wǎng)上正式提交訂單。為了有效地存儲(chǔ)訂單信息,在數(shù)據(jù)庫(kù)中設(shè)計(jì)了訂單信息表。訂單 信息表主要存放的是訂單名稱(chēng)、訂單編號(hào)、訂單總價(jià)等訂單的基本信息。 該模塊的核心代碼如下: ?php header(contenttype:text/html。charset=gb2312)。 require_once 。 require_once 。 require_once 。 session_start()。 $cart=$_SESSION[39。mycart39。]。 $username=$_SESSION[39。username39。]。 $db=new MyDB()。 $store_per_sum=0。 $market_per_sum=0。 $store_total=0。 $market_total=0。 $last_sum=0。 //$arr=array()。 if(@$_GET[39。act39。]==show) { /*$sql=create temporary table T_id(id int)。 $sql2=create temporary table T_num(id int,gnum varchar(20))。 $dbexecute($sql)。 $dbexecute($sql2)。 foreach($cartcart as $gid=$num) 河南城建學(xué)院畢業(yè)設(shè)計(jì)(論文) 34 { $sql=insert into T_id values($gid)。 $sql2=insert into T_num values($gid,$num)。 $dbexecute($sql)。 $dbexecute($sql2)。 //$arr=$num。 } $sql=select ,good_name,good_min_img,store_price,market_price,gnum,good_acount from goods,T_num where in(select id from T_id) and =。 $res=$dbexecute($sql)。*/ $array=array()。 foreach($cartcart as $gid=$value) { $sql=select * from goods where id=$gid。 $r=$dbexecute($sql)。 $array=$r[0]。 $array[39。gnum39。]=$value。 $res[]=$array。 } //print_r($res)。 $tplassign(res,$res)。 foreach($res as $value) { //購(gòu)買(mǎi)總金額 =店內(nèi)小計(jì)累加 $store_total+=$value[39。store_price39。]*$value[39。gnum39。]。 //市場(chǎng)總額 =市場(chǎng)小計(jì)累加 $market_total+=$value[39。market_price39。]*$value[39。gnum39。]。 } //節(jié)省金額 =市場(chǎng)總額 購(gòu)買(mǎi)總額 $last_sum=$market_total$store_total。 河南城建學(xué)院畢業(yè)設(shè)計(jì)(論文) 35 $_SESSION[39。total39。]=$store_total。 $tplassign(store_total,$store_total)。 $tplassign(market_total,$market_total)。 $tplassign(last_sum,$last_sum)。 } //刪除購(gòu)物車(chē)中某一個(gè)商品 if(@$_GET[39。act39。]==delete) { @$gid=$_GET[39。gid39。]。 $cartremove($gid)。 header(location:?act=show)。 } //清空購(gòu)物車(chē) if(@$_GET[39。act39。]==removeall) { $cartremoveall()。 header(location:?act=show)。 } //更新購(gòu)物車(chē)的商品數(shù)量 if(@$_GET[39。act39。]==update) { @$gnum=$_GET[39。new_gnum39。]。 @$gid=$_GET[39。gid39。]。 echo $gnum。 $cartmodify($gid,$gnum)。 header(location:?act=show)。 河南城建學(xué)院畢業(yè)設(shè)計(jì)(論文) 36 } /*if(@$_GET[39。act39。]==show) { $arr=array()。 foreach($cartcart as $id=$value) { $sql=select * from goods where id=$id。 $res=$dbexecute($sql)。 $arr[]=$res。 $arr2[39。nid39。]=$value。 //print_r($arr2)。 } $tplassign(res,$arr)。 $tplassign(gnum,$arr2)。 }*/ $tplassign(username,$username)。 $tpldisplay()。 ? 訂單功能模塊設(shè)計(jì) 用戶可以查看自己的訂單信息, 方便用戶購(gòu)買(mǎi)。該模塊的部分代碼 包含在 頁(yè)面中,其中在用戶下訂單的時(shí)候,會(huì)生成一個(gè)訂單號(hào),此功能的作用是便于用戶識(shí)別、管理員管理訂單。 主要代碼如下: ?php require_once 。 require_once 。 require_once 。 $db=new MyDB()。 session_start()。 $cart=$_SESSION[39。mycart39。]。 $name=$_SESSION[39。username39。]。 河南城建學(xué)院畢業(yè)設(shè)計(jì)(論文) 37 $total=$_SESSION[39。total39。]。 $info_name=$_SESSION[39。info_name39。]。 $info_addr=$_SESSION[39。info_addr39。]。 $info_phone=$_SESSION[39。info_phone39。]。 $info_=$_SESSION[39。info_39。]。 //$name=39。.$name.39。 $sql=select id from user where username=39。$name39。 $res=$dbexecute($sql)。 if(@$_GET[39。act39。]==aftershow) { $sql=create temporary table T_id(id int)。 $sql2=create temporary table T_num(id int,gnum varchar(20))。 $dbexecute($sql)。 $dbexecute($sql2)。 foreach($cartcart as $gid=$num) { $sql=insert into T_id values($gid)。 $sql2=insert into T_num values($gid,$num)。 $dbexecute($sql)。 $dbexecute($sql2)。 //$arr=$num。 //echo $gid.br。 //echo $num.br。 } $sql=select ,good_name,good_min_img,store_price,market_price,gnum,good_acount from goods,T_num where in(select id from T_id) and =。 $res=$dbexecute($sql)。 //print_r($res)。 $tplassign(res,$res)。 河南城建學(xué)院畢業(yè)設(shè)計(jì)(論文) 38 foreach($res as $value) { //購(gòu)買(mǎi)總金額 =店內(nèi)小計(jì)累加 $store_total+=$value[39。store_price39。]*$value[39。gnum39。]。 //市場(chǎng)總額 =市場(chǎng)小計(jì)累加 $market_total+=$value[39。market_price39。]*$value[39。gnum39。]。 } //節(jié)省金額 =市場(chǎng)總額 購(gòu)買(mǎi)總額 $last_sum=$market_total$store_total。 $_SE
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1