Example #1
0
    $smarty->assign('url', $_SERVER["HTTP_REFERER"]);
    $smarty->assign('payment', get_adv_order_one($_GET['id']));
    $smarty->display('ads/admin_adv_order_show.htm');
} elseif ($act == 'order_notes_save') {
    check_token();
    $link[0]['text'] = "返回列表";
    $link[0]['href'] = $_POST['url'];
    //填写管理员日志
    write_log("后台修改广告订单", $_SESSION['admin_name'], 3);
    !$db->query("UPDATE " . table('adv_order') . " SET  notes='" . $_POST['notes'] . "' WHERE id='" . intval($_GET['id']) . "'") ? adminmsg('操作失败', 1) : adminmsg("操作成功!", 2, $link);
} elseif ($act == 'order_set') {
    get_token();
    check_permissions($_SESSION['admin_purview'], "ord_set");
    $smarty->assign('pageheader', "广告订单");
    $smarty->assign('url', $_SERVER["HTTP_REFERER"]);
    $smarty->assign('payment', get_adv_order_one($_GET['id']));
    $smarty->display('ads/admin_adv_order_set.htm');
} elseif ($act == 'order_set_save') {
    check_token();
    check_permissions($_SESSION['admin_purview'], "ord_set");
    if (adv_order_paid(trim($_POST['oid']))) {
        $link[0]['text'] = "返回列表";
        $link[0]['href'] = $_POST['url'];
        !$db->query("UPDATE " . table('adv_order') . " SET notes='" . $_POST['notes'] . "' WHERE id=" . intval($_GET['id']) . "  LIMIT 1 ") ? adminmsg('操作失败', 1) : adminmsg("操作成功!", 2, $link);
    } else {
        adminmsg('操作失败', 1);
    }
} elseif ($act == 'management') {
    $id = intval($_GET['id']);
    $u = get_adv_user($id);
    if (!empty($u)) {
Example #2
0
                showmsg("在线支付参数错误!", 0);
            }
        } elseif ($myorder['payment_name'] == 'weixinpay') {
            require_once QISHI_ROOT_PATH . 'include/payment/native.php';
            $smarty->assign('w_url', urlencode($url2));
            fopen(QISHI_ROOT_PATH . 'data/wxpay/' . $myorder['oid'] . '.tmp', "w") or die("无法打开缓存文件!");
            $_SESSION['wxpay_no'] = $myorder['oid'];
        }
    }
    if ($myorder['payment_name'] == "points") {
        $myorder['amount'] = intval($myorder['amount']);
    }
    $myorder['payment_name_'] = get_payment_info($myorder['payment_name'], true);
    $smarty->assign('myorder', $myorder);
    $smarty->assign('fee', $fee);
    $smarty->assign('title', '付款 - 企业会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('byname', $payment);
    $smarty->assign('payment_form', $payment_form);
    $smarty->display('member_company/company_adv_order_pay.htm');
} elseif ($act == "adv_order_pay") {
    $orderid = intval($_GET['order_id']) ? intval($_GET['order_id']) : showmsg("您没有选择订单!", 1);
    $myorder = get_adv_order_one($_SESSION['uid'], $orderid);
    if (adv_order_paid($myorder['oid'])) {
        $link[0]['text'] = "查看订单";
        $link[0]['href'] = 'company_service.php?act=order_list';
        $link[1]['text'] = "会员中心首页";
        $link[1]['href'] = 'company_index.php?act=';
        showmsg("操作成功,请等待管理员审核!", 2, $link);
    }
}
unset($smarty);