include("../../config/conn.php"); include("../../config/function.php"); sesCheck_m(); $bh=$_GET[bh]; $hfid=$_GET[hfid]; $userid=returnuserid($_SESSION[SHOPUSER]); $sj=date("Y-m-d H:i:s"); $sqltask="select * from yjcode_task where bh='".$bh."' and taskty=1 and userid=".$userid."";mysql_query("SET NAMES 'GBK'");$restask=mysql_query($sqltask); if(!$rowtask=mysql_fetch_array($restask)){php_toheader("tasklist1.php");} $sqltaskhf="select * from yjcode_taskhf where bh='".$bh."' and taskty=1 and zt=1 and id=".$hfid;mysql_query("SET NAMES 'GBK'");$restaskhf=mysql_query($sqltaskhf); if(!$rowtaskhf=mysql_fetch_array($restaskhf)){php_toheader("taskbjlist1.php");} if($_GET[control]=="ys"){ $zt=$_POST[R1]; if($zt=="yes"){ $money1=$rowtaskhf[money1]; PointIntoM($rowtaskhf[useridhf],"任务完成,获得佣金(任务编号".$bh.")",$money1); PointUpdateM($rowtaskhf[useridhf],$money1); $zjm=0; if(0==$rowtask[yjfs]){ $zjm=$rowcontrol[taskyj]*$money1; }elseif(1==$rowtask[yjfs]){ $m=$rowcontrol[taskyj]*$money1*(-1); PointIntoM($rowtaskhf[useridhf],"任务完成,扣除平台中介费(任务编号".$bh.")",$m); PointUpdateM($rowtaskhf[useridhf],$m); }elseif(2==$rowtask[yjfs]){ $m=$rowcontrol[taskyj]*$money1*(-1)*0.5; $zjm=$m; PointIntoM($rowtaskhf[useridhf],"任务完成,扣除平台中介费(任务编号".$bh.")",$m); PointUpdateM($rowtaskhf[useridhf],$m); } $djm=$money1+abs($zjm); updatetable("yjcode_task","money3=money3-".$djm." where id=".$rowtask[id]); updatetable("yjcode_taskhf","zt=2 where id=".$hfid); $txt="验收通过"; intotable("yjcode_tasklog","bh,userid,useridhf,admin,txt,sj,fj","'".$bh."',".$rowtask[userid].",".$rowtaskhf[useridhf].",1,'".$txt."','".$sj."',''"); if(!empty($rowtask[jsbao])){ PointIntoB($rowtaskhf[useridhf],"任务完成通过验收,退还保证金",$rowtask[jsbao],2); PointUpdateB($rowtaskhf[useridhf],$rowtask[jsbao]); } }elseif($zt=="no"){ $oksj=date("Y-m-d H:i:s",strtotime("+".$rowcontrol[taskerrsj]." day")); $txt="验收不通过,接手方需须在".$oksj."前处理本次任务验收问题,否则系统自动处理为接手方任务失败"; intotable("yjcode_tasklog","bh,userid,useridhf,admin,txt,sj,fj","'".$bh."',".$rowtask[userid].",".$rowtaskhf[useridhf].",1,'".$txt."','".$sj."',''"); updatetable("yjcode_taskhf","zt=3,oksj='".$oksj."' where id=".$hfid); } php_toheader("taskbjlist1.php?bh=".$bh); } ?>