function autosybg($user_shiyongid, $gtime) { global $CCtimes; $usname = $_SESSION['usnamese']; $sql = "select a.name,b.name as buy_name,b.userid,b.step5_time,c.coupon_price,c.pt_meney,c.shiyongtype,c.hs_price,c.id from user_shiyong as b left join shiyong as c on b.shiyongid=c.id left join user as a on b.userid=a.id where b.id={$user_shiyongid}"; $result = mysql_query($sql); $usrow = mysql_fetch_assoc($result); if (checkReoprtUser2($usrow['userid'], $user_shiyongid, 'status=5')) { if (time() - 3600 * $gtime > $usrow['step5_time']) { if ($usrow['shiyongtype'] == 2) { $usrow['coupon_price'] = $usrow['coupon_price'] - $usrow['hs_price']; } $mingxiA = "您试用编号ID为:" . $usrow['id'] . "的产品完成,平台给您退款" . $usrow['coupon_price'] . "元"; $mingxiB = "用户" . $usrow['name'] . "试用您发布编号ID为:" . $usrow['id'] . "的产品完成,给该用户退款" . $usrow['coupon_price'] . "元"; $count1 = Kmoney($usrow['name'], $usrow['coupon_price'], $mingxiA, 'transfer', 0, 1, 0); $count2 = Jsmoney($usrow['buy_name'], -$usrow['coupon_price'], $mingxiB, 'debited', 0, 1, 0, '', 0); if ($usrow['pt_meney'] > 0) { $mingxiC = "用户" . $usrow['name'] . "试用您发布编号ID为:" . $usrow['id'] . "的产品完成,给平台支付" . $usrow['pt_meney'] . "元佣金"; $count2 = Jsmoney($usrow['buy_name'], -$usrow['pt_meney'], $mingxiC, 'debited', 0, 1, 0, '', 0); } $count = EditstatusT('user_shiyong', "status=6", "step6_time={$CCtimes},lasttime={$CCtimes}", "name='" . $usrow['buy_name'] . "'", $user_shiyongid); } } }
$usrow['coupon_price'] = $usrow['coupon_price'] + $usrow['hongbao'] - $usrow['hs_price']; } $mingxiA = "您试用编号ID为:" . $usrow['id'] . "的产品完成,平台给您退款" . ($usrow['coupon_price'] + $usrow['hongbao']) . "元"; //商家流动资金提示 $mingxiB = "用户" . $usrow['name'] . "试用您发布编号ID为:" . $usrow['id'] . "的产品完成,给该用户退款" . ($usrow['coupon_price'] + $usrow['hongbao']) . "元"; //商家流动资金提示 $count1 = Kmoney($usrow['name'], $usrow['coupon_price'] + $usrow['hongbao'], $mingxiA, 'transfer', 0, 1, 0); //审核时用户返款 $count2 = Jsmoney($usname, -($usrow['coupon_price'] + $usrow['hongbao']), $mingxiB, 'debited', 0, 1, 0, '', 0); //审核时商家扣押金 if ($usrow['pt_meney'] > 0) { $mingxiC = "用户" . $usrow['name'] . "试用您发布编号ID为:" . $usrow['id'] . "的产品完成,给平台支付" . $usrow['pt_meney'] . "元佣金"; $count2 = Jsmoney($usname, -$usrow['pt_meney'], $mingxiC, 'debited', 0, 1, 0, '', 0); } } $count = EditstatusT('user_shiyong', "status={$pass}", "step6_time={$CCtimes},lasttime={$CCtimes}", "name='{$usname}'", $value); } } if ($count > 0) { $arry['id'] = 216; //提交成功 $arry['msg'] = "提交成功"; } else { $arry['id'] = 0; //失败 $arry['msg'] = "提交失敗"; } } echo json_encode($arry); exit; case "list_arv":