function adv_order_paid($v_oid) { global $db, $timestamp, $_CFG; $order = $db->getone("select * from " . table('adv_order') . " WHERE oid ='{$v_oid}' AND is_paid= '1' LIMIT 1 "); if ($order) { $user = get_adv_user($order['uid']); $sql = "UPDATE " . table('adv_order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 "; if (!$db->query($sql)) { return false; } //填写管理员日志 write_log("后台开通订单", $_SESSION['admin_name'], 3); //发送邮件 $mailconfig = get_cache('mailconfig'); if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1") { dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment"); } //发送邮件完毕 //sms $sms = get_cache('sms_config'); if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1") { dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment"); } //微信通知 set_payment($order['uid'], "广告订单", $order['oid'], $order['amount']); return true; } return true; }
updatetable(table('ad'), $adaliasarr, $wheresql); } adminmsg("修改成功!", 2, $link); } else { adminmsg("修改失败!", 0); } } elseif ($act == 'del_ad_category') { check_permissions($_SESSION['admin_purview'], "ad_category"); check_token(); $id = !empty($_GET['id']) ? $_GET['id'] : adminmsg("你没有选择广告位!", 1); if ($id) { !del_ad_category($id) ? adminmsg("删除失败!", 0) : adminmsg("删除成功!", 2); } } elseif ($act == 'management') { $id = intval($_GET['id']); $u = get_adv_user($id); if (!empty($u)) { unset($_SESSION['uid']); unset($_SESSION['username']); unset($_SESSION['utype']); unset($_SESSION['uqqid']); setcookie("QS[uid]", "", time() - 3600, $QS_cookiepath, $QS_cookiedomain); setcookie("QS[username]", "", time() - 3600, $QS_cookiepath, $QS_cookiedomain); setcookie("QS[password]", "", time() - 3600, $QS_cookiepath, $QS_cookiedomain); setcookie("QS[utype]", "", time() - 3600, $QS_cookiepath, $QS_cookiedomain); unset($_SESSION['activate_username']); unset($_SESSION['activate_email']); $_SESSION['uid'] = $u['uid']; $_SESSION['username'] = $u['username']; $_SESSION['utype'] = $u['utype']; $_SESSION['uqqid'] = "1";