include("../config/conn.php"); include("../config/function.php"); sesCheck(); $userid=returnuserid($_SESSION["SHOPUSER"]); $orderbh=$_GET[orderbh]; $sj=getsj(); while0("*","yjcode_order where orderbh='".$orderbh."' and selluserid=".$userid);if(!$row=mysql_fetch_array($res)){php_toheader("order.php");} if(sqlzhuru($_POST[jvs])=="tk"){ zwzr(); $zfmm=sha1(sqlzhuru($_POST[t1])); if(panduan("uid,zfmm","yjcode_user where zfmm='".$zfmm."' and uid='".$_SESSION[SHOPUSER]."'")==0){Audit_alert("支付密码有误!","selltk.php?orderbh=".$orderbh);} if($row[ddzt]!="back"){Audit_alert("未知错误!","sellorderview.php?orderbh=".$orderbh);} while1("*","yjcode_tk where selluserid=".$row[selluserid]." and orderbh='".$orderbh."'");$row1=mysql_fetch_array($res1); //同意B if(sqlzhuru($_POST[R1])=="yes"){ $allmoney=$row[money1]*$row[num]; $tkjg="卖家同意退款申请"; PointUpdateM($row[userid],$allmoney); PointIntoM($row[userid],$tkjg,$allmoney); updatetable("yjcode_order","ddzt='backsuc',tksj='".$row1[sj]."',tkly='".$row1[tkly]."',tkjg='".sqlzhuru($_POST[t2])."',tkoksj='".$sj."' where selluserid=".$userid." and id=".$row[id]); deletetable("yjcode_tk where orderbh='".$orderbh."' and selluserid=".$userid); deletetable("yjcode_db where orderbh='".$orderbh."' and selluserid=".$userid); //同意E //不同意B }elseif(sqlzhuru($_POST[R1])=="no"){ $tkjg="卖家不同意退款"; updatetable("yjcode_order","ddzt='backerr',tksj='".$row1[sj]."',tkly='".$row1[tkly]."',tkjg='".sqlzhuru($_POST[t2])."',tkoksj='".$sj."' where selluserid=".$userid." and id=".$row[id]); deletetable("yjcode_tk where orderbh='".$orderbh."' and selluserid=".$userid); $dbsj=$rowcontrol[dbsj]; $sqlpro="select * from yjcode_pro where bh='".$row[probh]."'";mysql_query("SET NAMES 'GBK'");$respro=mysql_query($sqlpro);if($rowpro=mysql_fetch_array($respro)){ $sqldb="select * from yjcode_type where id=".$rowpro[ty1id];mysql_query("SET NAMES 'GBK'");$resdb=mysql_query($sqldb);if($rowdb=mysql_fetch_array($resdb)){ if(!empty($rowdb[dbsj])){$dbsj=$rowdb[dbsj];} } } $oksj=date("Y-m-d H:i:s",strtotime("+".$dbsj." day")); $c_tit="卖家不同意退款,款项进入担保阶段,等待买家操作"; $allmoney=$row[money1]*$row[num]; intotable("yjcode_db","money1,sj,selluserid,userid,dboksj,probh,tit,orderbh","".$allmoney.",'".$sj."',".$row[selluserid].",".$row[userid].",'".$oksj."','".$row[probh]."','".$c_tit."','".$orderbh."'"); } //不同意E $tkjg=$tkjg.",理由:".sqlzhuru($_POST[t2]); intotable("yjcode_orderlog","orderbh,userid,selluserid,admin,txt,sj","'".$orderbh."',".$row[userid].",".$row[selluserid].",2,'".$tkjg."','".$sj."'"); php_toheader("sellorderview.php?orderbh=".$orderbh); } ?>