本文整理汇总了PHP中trade_getstatus函数的典型用法代码示例。如果您正苦于以下问题:PHP trade_getstatus函数的具体用法?PHP trade_getstatus怎么用?PHP trade_getstatus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了trade_getstatus函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: trade_notifycheck
function trade_notifycheck($type)
{
global $_G;
if (!empty($_POST)) {
$notify = $_POST;
$location = FALSE;
} elseif (!empty($_GET)) {
$notify = $_GET;
$location = TRUE;
} else {
exit('Access Denied');
}
unset($notify['diy']);
if (dfsockopen("http://notify.alipay.com/trade/notify_query.do?partner=" . DISCUZ_PARTNER . "¬ify_id=" . $notify['notify_id'], 60) !== 'true') {
exit('Access Denied');
}
if ($type == 'trade') {
$urlstr = '';
foreach ($notify as $key => $val) {
MAGIC_QUOTES_GPC && ($val = stripslashes($val));
$urlstr .= $key . '=' . rawurlencode(stripslashes($val)) . '&';
}
} else {
ksort($notify);
$sign = '';
foreach ($notify as $key => $val) {
if ($key != 'sign' and $key != 'sign_type') {
$sign .= "&{$key}={$val}";
}
}
if ($notify['sign'] != md5(substr($sign, 1) . DISCUZ_SECURITYCODE)) {
exit('Access Denied');
}
}
if ($type == 'credit' && (!DISCUZ_DIRECTPAY && $notify['notify_type'] == 'trade_status_sync' && ($notify['trade_status'] == 'WAIT_SELLER_SEND_GOODS' || $notify['trade_status'] == 'TRADE_FINISHED') || DISCUZ_DIRECTPAY && ($notify['trade_status'] == 'TRADE_FINISHED' || $notify['trade_status'] == 'TRADE_SUCCESS')) || $type == 'trade' && $notify['notify_type'] == 'trade_status_sync') {
return array('validator' => TRUE, 'status' => trade_getstatus(!empty($notify['refund_status']) ? $notify['refund_status'] : $notify['trade_status'], 1), 'order_no' => $notify['out_trade_no'], 'price' => !DISCUZ_DIRECTPAY && $notify['price'] ? $notify['price'] : $notify['total_fee'], 'trade_no' => $notify['trade_no'], 'notify' => 'success', 'location' => $location);
} else {
return array('validator' => FALSE, 'notify' => 'fail', 'location' => $location);
}
}
开发者ID:v998,项目名称:discuzx-en,代码行数:40,代码来源:api_alipay.php
示例2: dgmdate
$price = $tradelog['baseprice'] * $tradelog['number'];
} else {
$price = $tradelog['baseprice'] * $tradelog['number'];
}
if ($_G['setting']['creditstransextra'][5] != -1 && ($oldnumber != $newnumber || $oldbasecredit != $tradelog['basecredit'])) {
$tradelog['credit'] = $newnumber * $tradelog['basecredit'];
$update['credit'] = $tradelog['credit'];
}
$update['price'] = $price + ($tradelog['transport'] == 2 ? $tradelog['transportfee'] : 0);
C::t('forum_tradelog')->update($orderid, $update);
$tradelog = C::t('forum_tradelog')->fetch($orderid);
}
}
}
$tradelog['lastupdate'] = dgmdate($tradelog['lastupdate'], 'u');
$tradelog['statusview'] = trade_getstatus($tradelog['status']);
$messagelist = array();
if ($tradelog['offline']) {
$offlinenext = trade_offline($tradelog, 1, $trade_message);
$message = explode("\t\t\t", $tradelog['message']);
foreach ($message as $row) {
$row = explode("\t", $row);
$row[2] = dgmdate($row[2], 'u');
$row[0] && ($messagelist[] = $row);
}
} else {
$loginurl = trade_getorderurl($tradelog['tradeno']);
}
$trade = C::t('forum_trade')->fetch_goods($tradelog['tid'], $tradelog['pid']);
include template('forum/trade_view');
} else {
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:forum_trade.php
示例3: exit
exit('Access Denied');
}
require_once libfile('function/trade');
$language = lang('forum/misc');
cpheader();
$ppp = 20;
$start_limit = ($page - 1) * $ppp;
$filter = !isset($_G['gp_filter']) ? -1 : $_G['gp_filter'];
$sqlfilter = $filter >= 0 ? "WHERE status='{$filter}'" : '';
$count = DB::fetch_first("SELECT SUM(price) AS pricesum, SUM(credit) AS creditsum, sum(tax) AS taxsum FROM " . DB::table('forum_tradelog') . " {$sqlfilter}");
$num = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_tradelog') . " {$sqlfilter}");
$multipage = multi($num, $ppp, $page, ADMINSCRIPT . "?action=tradelog&filter={$filter}");
$query = DB::query("SELECT * FROM " . DB::table('forum_tradelog') . " {$sqlfilter} ORDER BY lastupdate DESC LIMIT {$start_limit}, {$ppp}");
shownav('extended', 'nav_ec');
showsubmenu('nav_ec', array(array('nav_ec_config', 'setting&operation=ec&mod=forum', 0), array('nav_ec_tenpay', 'ec&operation=tenpay&mod=forum', 0), array('nav_ec_alipay', 'ec&operation=alipay&mod=forum', 0), array('nav_ec_credit', 'ec&operation=credit&mod=forum', 0), array('nav_ec_orders', 'ec&operation=orders&mod=forum', 0), array('nav_ec_tradelog', 'tradelog&mod=forum', 1)));
showtableheader();
showsubtitle(array('tradelog_trade_no', 'tradelog_trade_name', 'tradelog_buyer', 'tradelog_seller', 'tradelog_money', $lang['tradelog_credit'] . "({$_G[setting][extcredits][$_G['setting']['creditstransextra'][5]][title]})", 'tradelog_fee', 'tradelog_order_status'));
while ($tradelog = DB::fetch($query)) {
$tradelog['status'] = trade_getstatus($tradelog['status']);
$tradelog['lastupdate'] = dgmdate($tradelog['lastupdate']);
$tradelog['tradeno'] = $tradelog['offline'] ? $lang['tradelog_offline'] : $tradelog['tradeno'];
showtablerow('', '', array($tradelog['tradeno'], '<a target="_blank" href="forum.php?mod=viewthread&do=tradeinfo&tid=' . $tradelog['tid'] . '&pid=' . $tradelog['pid'] . '">' . $tradelog['subject'] . '</a>', '<a target="_blank" href="home.php?mod=space&uid=' . $tradelog['buyerid'] . '">' . $tradelog['buyer'] . '</a>', '<a target="_blank" href="home.php?mod=space&uid=' . $tradelog['sellerid'] . '">' . $tradelog['seller'] . '</a>', $tradelog['price'], $tradelog['credit'], $tradelog['tax'], '<a target="_blank" href="forum.php?mod=trade&orderid=' . $tradelog['orderid'] . '">' . $tradelog['status'] . '<br />' . $tradelog['lastupdate']));
}
$statusselect = $lang['tradelog_order_status'] . ': <select onchange="location.href=\'' . ADMINSCRIPT . '?action=tradelog&filter=\' + this.value"><option value="-1">' . $lang['tradelog_all_order'] . '</option>';
$statuss = trade_getstatus(0, -1);
foreach ($statuss as $key => $value) {
$statusselect .= "<option value=\"{$key}\" " . ($filter == $key ? 'selected' : '') . ">{$value}</option>";
}
$statusselect .= '</select>';
showsubmit('', '', "{$lang['tradelog_order_count']} {$num}, {$lang['tradelog_trade_total']} {$count['pricesum']} {$lang['rmb_yuan']}, {$lang['tradelog_trade_totalcredit']} {$_G[setting][extcredits][$_G['setting']['creditstransextra'][5]][title]} {$count['creditsum']} {$_G[setting][extcredits][$_G['setting']['creditstransextra'][5]][unit]}, {$lang['tradelog_fee_total']} {$count['taxsum']} {$lang['rmb_yuan']}", '', $multipage . $statusselect);
showtablefooter();
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_tradelog.php
注:本文中的trade_getstatus函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论