本文整理汇总了PHP中payment::order_set_and方法的典型用法代码示例。如果您正苦于以下问题:PHP payment::order_set_and方法的具体用法?PHP payment::order_set_and怎么用?PHP payment::order_set_and使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类payment
的用法示例。
在下文中一共展示了payment::order_set_and方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_account_log
/**
* 查询会员余额的操作记录
*
* @access public
* @param int $user_id 会员ID
* @param int $num 每页显示数量
* @param int $start 开始显示的条数
* @return array
*/
function get_account_log($user_id, $num, $start)
{
$account_log = array();
$sql = 'SELECT * FROM ' . $GLOBALS['ecs']->table('user_account') . " WHERE user_id = '{$user_id}'" . " AND process_type " . db_create_in(array(SURPLUS_SAVE, SURPLUS_RETURN)) . " ORDER BY add_time DESC";
$res = $GLOBALS['db']->selectLimit($sql, $num, $start);
if ($res) {
include_once 'includes/modules/payment/payment.php';
$pay_obj = new payment();
while ($rows = $GLOBALS['db']->fetchRow($res)) {
$rows['add_time'] = local_date($GLOBALS['_CFG']['date_format'], $rows['add_time']);
$rows['admin_note'] = nl2br(htmlspecialchars($rows['admin_note']));
$rows['short_admin_note'] = $rows['admin_note'] > '' ? sub_str($rows['admin_note'], 30) : 'N/A';
$rows['user_note'] = nl2br(htmlspecialchars($rows['user_note']));
$rows['short_user_note'] = $rows['user_note'] > '' ? sub_str($rows['user_note'], 30) : 'N/A';
$rows['pay_status'] = $rows['is_paid'] == 0 ? $GLOBALS['_LANG']['un_confirm'] : $GLOBALS['_LANG']['is_confirm'];
$rows['amount'] = price_format(abs($rows['amount']), false);
/* 会员的操作类型: 冲值,提现 */
if ($rows['process_type'] == 0) {
$rows['type'] = $GLOBALS['_LANG']['surplus_type_0'];
} else {
$rows['type'] = $GLOBALS['_LANG']['surplus_type_1'];
}
/* 支付方式的ID */
/**2014-04-08 by hg/
/* $sql = 'SELECT pay_id FROM ' .$GLOBALS['ecs']->table('payment').
" WHERE pay_name = '$rows[payment]' AND enabled = 1";
$pid = $GLOBALS['db']->getOne($sql); */
$pay_static = $pay_obj->order_set_and($rows['pay_num']);
if (!empty($pay_static)) {
$pid = $rows['pay_num'];
} else {
$pid = '';
}
/*end*/
/* 如果是预付款而且还没有付款, 允许付款 */
if ($rows['is_paid'] == 0 && $rows['process_type'] == 0) {
$rows['handle'] = '<a href="user.php?act=pay&id=' . $rows['id'] . '&pid=' . $pid . '">' . $GLOBALS['_LANG']['pay'] . '</a>';
}
$account_log[] = $rows;
}
return $account_log;
} else {
return false;
}
}