include("../config/conn.php"); include("../config/function.php"); sesCheck(); $bh=$_GET[bh]; $sj=date("Y-m-d H:i:s"); $sqluser="select * from yjcode_user where uid='".$_SESSION[SHOPUSER]."'";mysql_query("SET NAMES 'GBK'");$resuser=mysql_query($sqluser); if(!$rowuser=mysql_fetch_array($resuser)){php_toheader("../reg/");} $userid=$rowuser[id]; $sqltask="select * from yjcode_task where bh='".$bh."' and taskty=0 and zt=4 and userid=".$userid."";mysql_query("SET NAMES 'GBK'");$restask=mysql_query($sqltask); if(!$rowtask=mysql_fetch_array($restask)){php_toheader("tasklist.php");} $sqltaskhf="select * from yjcode_taskhf where bh='".$bh."' and taskty=0 and useridhf=".$rowtask[useridhf]." and ifxz=1";mysql_query("SET NAMES 'GBK'");$restaskhf=mysql_query($sqltaskhf); if(!$rowtaskhf=mysql_fetch_array($restaskhf)){php_toheader("tasklist.php");} if($_GET[control]=="ys"){ $zt=$_POST[R1]; if($zt=="yes"){ $money1=$rowtask[money2]; PointIntoM($rowtask[useridhf],"任务完成,获得佣金(任务编号".$bh.")",$money1); PointUpdateM($rowtask[useridhf],$money1); if(1==$rowtask[yjfs]){ $m=$rowcontrol[taskyj]*$money1*(-1); PointIntoM($rowtask[useridhf],"任务完成,扣除平台中介费(任务编号".$bh.")",$m); PointUpdateM($rowtask[useridhf],$m); }elseif(2==$row[yjfs]){ $m=$rowcontrol[taskyj]*$money1*(-1)*0.5; PointIntoM($rowtask[useridhf],"任务完成,扣除平台中介费(任务编号".$bh.")",$m); PointUpdateM($rowtask[useridhf],$m); } updatetable("yjcode_task","zt=5 where id=".$rowtask[id]); $txt="验收通过"; intotable("yjcode_tasklog","bh,userid,useridhf,admin,txt,sj,fj","'".$bh."',".$rowtask[userid].",".$rowtask[useridhf].",1,'".$txt."','".$sj."',''"); if(!empty($rowtask[jsbao])){ PointIntoB($rowtask[useridhf],"任务完成通过验收,退还保证金",$rowtask[jsbao],2); PointUpdateB($rowtask[useridhf],$rowtask[jsbao]); } }elseif($zt=="no"){ $txt="验收不通过,申请平台介入"; intotable("yjcode_tasklog","bh,userid,useridhf,admin,txt,sj,fj","'".$bh."',".$rowtask[userid].",".$rowtask[useridhf].",1,'".$txt."','".$sj."',''"); updatetable("yjcode_task","zt=8 where id=".$rowtask[id]); } php_toheader("tasklist.php"); } ?>