taskbjsel.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?
  2. include("../../config/conn.php");
  3. include("../../config/function.php");
  4. sesCheck_m();
  5. $bh=$_GET[bh];
  6. $mid=$_GET[mid];
  7. $sj=date("Y-m-d H:i:s");
  8. $sqluser="select * from yjcode_user where uid='".$_SESSION[SHOPUSER]."'";mysql_query("SET NAMES 'GBK'");$resuser=mysql_query($sqluser);
  9. if(!$rowuser=mysql_fetch_array($resuser)){php_toheader("../reg/");}
  10. $userid=$rowuser[id];
  11. $sqltask="select * from yjcode_task where bh='".$bh."' and taskty=0 and userid=".$userid."";mysql_query("SET NAMES 'GBK'");$restask=mysql_query($sqltask);
  12. if(!$rowtask=mysql_fetch_array($restask)){php_toheader("tasklist.php");}
  13. $sqltaskhf="select * from yjcode_taskhf where bh='".$bh."' and userid=".$userid." and id=".$mid;mysql_query("SET NAMES 'GBK'");$restaskhf=mysql_query($sqltaskhf);
  14. if(!$rowtaskhf=mysql_fetch_array($restaskhf)){php_toheader("taskbjlist.php?bh=".$bh);}
  15. if($_GET[control]=="hz"){
  16. if(0!=$row[zt]){Audit_alert("操作失败,返回重试","taskbjsel.php?bh=".$bh."&mid=".$mid);}
  17. $money5=0;
  18. if(empty($rowtask[yjfs])){$money5=$rowtaskhf[money1]*$rowcontrol[taskyj];}
  19. elseif($rowtask[yjfs]==2){$money5=$rowtaskhf[money1]*$rowcontrol[taskyj]*0.5;}
  20. $djmoney=$rowtaskhf[money1]-$rowtask[money4]+$money5;
  21. if($djmoney>$rowuser[money1]){Audit_alert("余额不足,请先充值","taskbjsel.php?bh=".$bh."&mid=".$mid);}
  22. PointIntoM($rowuser[id],"任务开始,冻结金额(任务编号".$bh.")",$djmoney*(-1));
  23. PointUpdateM($rowuser[id],$djmoney*(-1));
  24. $money3=$rowtaskhf[money1]+$money5;
  25. updatetable("yjcode_task","zt=3,useridhf=".$rowtaskhf[useridhf].",money2=".$rowtaskhf[money1].",money3=".$money3.",money5=".$money5." where id=".$rowtask[id]);
  26. $rwdq=date("Y-m-d H:i:s",strtotime("+".$rowtask[rwzq]." day"));
  27. updatetable("yjcode_taskhf","ifxz=1,zbsj='".$sj."',rwdq='".$rwdq."' where id=".$mid);
  28. $txt="已选标,接手方开始做任务,并且需要在".$rwdq."前完成任务并提交验收";
  29. intotable("yjcode_tasklog","bh,userid,useridhf,admin,txt,sj,fj","'".$bh."',".$rowtask[userid].",".$rowtaskhf[useridhf].",1,'".$txt."','".$sj."',''");
  30. if(!empty($rowtask[jsbao])){
  31. while1("bh,useridhf,ifxz","yjcode_taskhf where bh='".$rowtask[bh]."' and ifxz=0");while($row1=mysql_fetch_array($res1)){
  32. PointIntoB($row1[useridhf],"任务未中标,退还保证金",$rowtask[jsbao],2);
  33. PointUpdateB($row1[useridhf],$rowtask[jsbao]);
  34. }
  35. }
  36. php_toheader("taskbjlist.php?bh=".$bh);
  37. }
  38. ?>
  39. <html>
  40. <head>
  41. <meta http-equiv="x-ua-compatible" content="ie=7" />
  42. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  43. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
  44. <title>会员中心 <?=webname?></title>
  45. <? include("../tem/cssjs.html");?>
  46. <link href="css/task.css" rel="stylesheet" type="text/css" />
  47. <script language="javascript">
  48. function tj(){
  49. if(!confirm("确定选择该用户使用吗?")){return false;}
  50. layer.open({type: 2,content: '正在提交',shadeClose:false});
  51. f1.action="taskbjsel.php?bh=<?=$bh?>&mid=<?=$mid?>&control=hz";
  52. }
  53. </script>
  54. </head>
  55. <body>
  56. <? include("topuser.php");?>
  57. <div class="bfbtop1 box">
  58. <div class="d1" onClick="gourl('../task/view<?=$rowtask[id]?>.html')"><img src="img/topleft.png" height="21" /></div>
  59. <div class="d2">选择用户</div>
  60. <div class="d3"></div>
  61. </div>
  62. <? include("taskv.php");?>
  63. <? while2("*","yjcode_user where id=".$rowtaskhf[useridhf]);$row2=mysql_fetch_array($res2);?>
  64. <div class="taskmain1 box"><div class="d1"></div><div class="d2">用户信息</div></div>
  65. <div class="taskmain2 box"><div class="d1">选择用户:</div><div class="d2"><?=$row2[nc]?></div></div>
  66. <div class="taskmain2 box"><div class="d1">联系QQ:</div><div class="d2"><a href="javascript:void(0);" onClick="qqtang('<?=$row2[uqq]?>')"><?=$row2[uqq]?></a></div></div>
  67. <? if(!empty($row2[mot])){?>
  68. <div class="taskmain2 box"><div class="d1">联系电话:</div><div class="d2"><?=$row2[mot]?></div></div>
  69. <? }?>
  70. <div class="taskmain2 box"><div class="d1">用户报价:</div><div class="d2"><strong class="red">¥<?=$rowtaskhf[money1]?></strong></div></div>
  71. <div class="taskmain2 box">
  72. <div class="d1">中介费用:</div>
  73. <div class="d2">
  74. <?
  75. if(empty($rowtask[yjfs])){echo "雇主承担,费用为<strong class='feng'>¥".$rowtaskhf[money1]*$rowcontrol[taskyj]."</strong>";}
  76. elseif($rowtask[yjfs]==1){echo "接手方承担";}
  77. elseif($rowtask[yjfs]==2){echo "双方各承担一半,费用为<strong class='feng'>¥".$rowtaskhf[money1]*$rowcontrol[taskyj]*0.5."</strong>";}
  78. ?>
  79. </div>
  80. </div>
  81. <div class="taskmain2 box"><div class="d1">报名时间:</div><div class="d2"><?=$rowtaskhf[sj]?></div></div>
  82. <div class="taskmain2 box"><div class="d1">我的余额:</div><div class="d2"><strong class="red">¥<?=$rowuser[money1]?></strong> [<a href="pay.php">充值</a>]</div></div>
  83. <div class="taskmain2 box"><div class="d1">接手留言:</div><div class="d2"><?=strip_tags(returnjgdw($rowtaskhf[txt],"","未填写任何说明"))?></div></div>
  84. <div class="taskmain2 box"><div class="d1">合作须知:</div><div class="d2">选择合作后,需要冻结报价金额(减去订金)</div></div>
  85. <div class="taskmain3 box"></div>
  86. <? if(0==$rowtask[zt]){?>
  87. <form name="f1" method="post" onsubmit="return tj()">
  88. <div class="fbbtn box">
  89. <div class="d1"><? tjbtnr_m("选择合作")?></div>
  90. </div>
  91. </form>
  92. <? }?>
  93. </body>
  94. </html>