本文整理汇总了PHP中to_date函数的典型用法代码示例。如果您正苦于以下问题:PHP to_date函数的具体用法?PHP to_date怎么用?PHP to_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了to_date函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['biz_email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['biz_pwd']);
//密码
//检查用户,用户密码
$biz_user = biz_check($email, $pwd);
$supplier_id = intval($biz_user['supplier_id']);
$deal_id = intval($GLOBALS['request']['deal_id']);
//团购商品id
if ($supplier_id > 0) {
$page = intval($GLOBALS['request']['page']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * PAGE_SIZE . "," . PAGE_SIZE;
$list = $GLOBALS['db']->getAll("select d.sn,d.password,d.confirm_time from " . DB_PREFIX . "deal_coupon as d where d.confirm_account > 0 and d.is_valid = 1 and d.is_delete = 0 and d.deal_id = " . $deal_id . " and d.supplier_id = " . $supplier_id . " order by d.confirm_time desc limit " . $limit);
foreach ($list as $k => $v) {
$list[$k]['confirm_time_format'] = to_date($v['confirm_time'], 'Y-m-d H:i');
}
$count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "deal_coupon as d where d.confirm_account > 0 and d.is_valid = 1 and d.is_delete = 0 and d.deal_id = " . $deal_id . " and d.supplier_id = " . $supplier_id);
$root['page'] = array("page" => $page, "page_total" => ceil($count / PAGE_SIZE), "page_size" => PAGE_SIZE);
$root['item'] = $list;
$root['return'] = 1;
}
output($root);
}
开发者ID:macall,项目名称:jsd,代码行数:29,代码来源:biz_coupon.action.php
示例2: export_csv
public function export_csv($page = 1)
{
set_time_limit(0);
$limit = ($page - 1) * intval(app_conf("BATCH_PAGE_SIZE")) . "," . intval(app_conf("BATCH_PAGE_SIZE"));
$map['ecv_type_id'] = intval($_REQUEST['ecv_type_id']);
$list = M(MODULE_NAME)->where($map)->limit($limit)->findAll();
if ($list) {
register_shutdown_function(array(&$this, 'export_csv'), $page + 1);
$ecv_value = array('sn' => '""', 'password' => '""', 'money' => '""', 'use_limit' => '""', 'begin_time' => '""', 'end_time' => '""');
if ($page == 1) {
$content = iconv("utf-8", "gbk", "序列号,密码,面额,使用数量,生效时间,过期时间");
$content = $content . "\n";
}
foreach ($list as $k => $v) {
$ecv_value['sn'] = '"' . iconv('utf-8', 'gbk', $v['sn']) . '"';
$ecv_value['password'] = '"' . iconv('utf-8', 'gbk', $v['password']) . '"';
$ecv_value['money'] = '"' . iconv('utf-8', 'gbk', format_price($v['money'])) . '"';
$ecv_value['use_limit'] = '"' . iconv('utf-8', 'gbk', $v['use_limit']) . '"';
$ecv_value['begin_time'] = '"' . iconv('utf-8', 'gbk', to_date($v['begin_time'])) . '"';
$ecv_value['end_time'] = '"' . iconv('utf-8', 'gbk', to_date($v['end_time'])) . '"';
$content .= implode(",", $ecv_value) . "\n";
}
header("Content-Disposition: attachment; filename=voucher_list.csv");
echo $content;
} else {
if ($page == 1) {
$this->error(L("NO_RESULT"));
}
}
}
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:30,代码来源:EcvAction.class.php
示例3: get_payment_code
public function get_payment_code($payment_notice_id)
{
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
//$order_sn = $GLOBALS['db']->getOne("select order_sn from ".DB_PREFIX."deal_order where id = ".$payment_notice['order_id']);
$money = round($payment_notice['money'], 2);
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
/* 银行类型 */
//$bank_id = $GLOBALS['db']->getOne("select bank_id from ".DB_PREFIX."deal_order where id = ".$payment_notice['order_id']);
$bank_id = $payment_notice['bank_id'];
$payChannel = $this->config['sdo_paychannel'];
$defaultChannel = $this->config['sdo_defaultchannel'];
if ($bank_id == '0' || trim($bank_id) == 'SDO1' || trim($bank_id) == 'SDO') {
$bank_id = '';
}
$postBackURL = SITE_DOMAIN . APP_ROOT . '/index.php?ctl=payment&act=response&class_name=Sdo';
//付款完成后的跳转页面
$notifyURL = SITE_DOMAIN . APP_ROOT . '/index.php?ctl=payment&act=notify&class_name=Sdo';
//通知发货页面
$shengpay = new shengpay();
$array = array('Name' => 'B2CPayment', 'Version' => 'V4.1.1.1.1', 'Charset' => 'UTF-8', 'MsgSender' => $payment_info['config']['sdo_account'], 'SendTime' => to_date(get_gmtime(), 'YmdHis'), 'OrderTime' => to_date(get_gmtime(), 'YmdHis'), 'PayType' => 'PT001', 'PayChannel' => '14,18,19,20', 'InstCode' => $bank_id, 'PageUrl' => $postBackURL, 'NotifyUrl' => $notifyURL, 'ProductName' => $payment_notice_id, 'BuyerContact' => '', 'BuyerIp' => '', 'Ext1' => '', 'Ext2' => '', 'SignType' => 'MD5');
$shengpay->init($array);
$shengpay->setKey($payment_info['config']['sdo_key']);
/*
/*
商家自行检测传入的价格与数据库订单需支付金额是否相同
*/
$code = $shengpay->takeOrder($payment_notice_id, $money, $payment_info);
$code .= "<br /><span class='red'>" . $GLOBALS['lang']['PAY_TOTAL_PRICE'] . ":" . format_price($money) . "</span>";
return $code;
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:31,代码来源:Sdo_payment.php
示例4: payment_paid
/**
* 付款单的支付
* @param unknown_type $payment_notice_id
* 当超额付款时在此进行退款处理
*/
function payment_paid($payment_notice_id, $outer_notice_sn = '')
{
$payment_notice_id = intval($payment_notice_id);
$now = TIME_UTC;
$GLOBALS['db']->query("update " . DB_PREFIX . "payment_notice set pay_time = " . $now . ", pay_date = '" . to_date($now, 'Y-m-d') . "',outer_notice_sn = '" . $outer_notice_sn . "',is_paid = 1 where id = " . $payment_notice_id . " and is_paid = 0");
$rs = $GLOBALS['db']->affected_rows();
if ($rs) {
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$payment_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment where id = " . $payment_notice['payment_id']);
$GLOBALS['db']->query("update " . DB_PREFIX . "payment set total_amount = total_amount + " . $payment_notice['money'] . " where class_name = '" . $payment_info['class_name'] . "'");
if (intval($payment_notice['order_id']) == 0) {
//充值
require_once APP_ROOT_PATH . "system/libs/user.php";
if ($payment_info['online_pay'] == 0) {
$msg = '线下充值';
// sprintf($GLOBALS['lang']['PAYMENT_INCHARGE'],$payment_notice['notice_sn']);
} else {
$msg = '在线充值';
// sprintf($GLOBALS['lang']['PAYMENT_INCHARGE'],$payment_notice['notice_sn']);
}
$fee_amount = $payment_notice['fee_amount'];
$money = $payment_notice['money'];
modify_account(array('money' => $money - $fee_amount, 'fee_amount' => $fee_amount, 'score' => 0), $payment_notice['user_id'], $msg, 1);
//在此处开始生成付款的短信及邮件
send_payment_sms($payment_notice_id);
send_payment_mail($payment_notice_id);
}
}
return $rs;
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:35,代码来源:cart.php
示例5: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
$root['user_login_status'] = 1;
$root['response_code'] = 1;
$page_size = $GLOBALS['m_config']['page_size'];
$page = intval($_REQUEST['p']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * $page_size . "," . $page_size;
$record_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "payment_notice where user_id = " . intval($GLOBALS['user_info']['id']) . " and order_id=0 AND deal_id=0 AND deal_item_id=0 AND deal_name='' order by create_time desc limit " . $limit);
foreach ($record_list as $k => $v) {
$record_list[$k]['create_time'] = to_date($v['create_time'], 'Y-m-d');
}
$record_count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "payment_notice where user_id = " . intval($GLOBALS['user_info']['id']) . " and order_id=0 AND deal_id=0 AND deal_item_id=0 AND deal_name=''");
$root['record_list'] = $record_list;
$root['page'] = array("page" => $page, "page_total" => ceil($record_count / $page_size), "page_size" => intval($page_size), 'total' => intval($record_count));
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
output($root);
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:33,代码来源:uc_account_record.action.php
示例6: payment_paid
/**
* 付款单的支付
* @param unknown_type $payment_notice_id
* 当超额付款时在此进行退款处理
*/
function payment_paid($payment_notice_id, $outer_notice_sn = '')
{
$payment_notice_id = intval($payment_notice_id);
$now = TIME_UTC;
$GLOBALS['db']->query("update " . DB_PREFIX . "payment_notice set pay_time = " . $now . ", pay_date = " . to_date($now, 'Y-m-d') . ",outer_notice_sn = '" . $outer_notice_sn . "',is_paid = 1 where id = " . $payment_notice_id . " and is_paid = 0");
$rs = $GLOBALS['db']->affected_rows();
if ($rs) {
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$payment_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment where id = " . $payment_notice['payment_id']);
$GLOBALS['db']->query("update " . DB_PREFIX . "payment set total_amount = total_amount + " . $payment_notice['money'] . " where class_name = '" . $payment_info['class_name'] . "'");
//if (intval($payment_notice['order_id']) == 0){
//充值
require_once APP_ROOT_PATH . "system/libs/user.php";
$msg = sprintf($GLOBALS['lang']['PAYMENT_INCHARGE'], $payment_notice['notice_sn']);
modify_account(array('money' => $payment_notice['money'], 'score' => 0), $payment_notice['user_id'], $msg, 1);
// 充值奖励
if ($payment_notice['money'] > intval(app_conf("USER_RECHARGE_LIMIT_MONEY"))) {
$award = $payment_notice['money'] * floatval(app_conf("USER_RECHARGE_PERCENT")) * 0.01;
modify_account(array('money' => $award, 'score' => 0), $payment_notice['user_id'], "充值奖励", 1);
}
//在此处开始生成付款的短信及邮件
send_payment_sms($payment_notice_id);
send_payment_mail($payment_notice_id);
//}
}
return $rs;
}
开发者ID:neteasy-work,项目名称:fanwei_xindai_3.2,代码行数:32,代码来源:cart.php
示例7: index
public function index()
{
$page = intval($_REQUEST['p']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
$user_id = $GLOBALS['user_info']['id'];
$status = isset($_REQUEST['stauts']) ? intval($_REQUEST['stauts']) : 3;
$time = isset($_REQUEST['time']) ? to_timespan($_REQUEST['time'], "Ymd") : "";
$deal_name = strim($_REQUEST['deal_name']);
$condition = "";
if ($deal_name != "") {
$condition .= " and d.name = '" . $deal_name . "' ";
$GLOBALS['tmpl']->assign('deal_name', $deal_name);
}
if ($time != "") {
$condition .= " and dlr.repay_time = " . $time . " ";
$GLOBALS['tmpl']->assign('time', to_date($time, "Y-m-d"));
}
$result = getUcRepayPlan($user_id, $status, $limit, $condition);
if ($result['rs_count'] > 0) {
$page = new Page($result['rs_count'], app_conf("PAGE_SIZE"));
//初始化分页对象
$p = $page->show();
$GLOBALS['tmpl']->assign('pages', $p);
$GLOBALS['tmpl']->assign('list', $result['list']);
}
$GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['UC_REPAY_PLAN']);
$GLOBALS['tmpl']->assign("inc_file", "inc/uc/uc_repay_plan.html");
$GLOBALS['tmpl']->assign("status", $status);
$GLOBALS['tmpl']->display("page/uc.html");
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:33,代码来源:uc_repay_planModule.class.php
示例8: get_payment_code
public function get_payment_code($payment_notice_id)
{
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$order = $GLOBALS['db']->getRow("select order_sn,bank_id from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
$_TransID = $order['order_sn'];
$_OrderMoney = round($payment_notice['money'], 2);
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
$_Merchant_url = SITE_DOMAIN . APP_ROOT . '/baofoo_callback.php?act=response';
$_Return_url = SITE_DOMAIN . APP_ROOT . '/baofoo_callback.php?act=notify';
/* 交易日期 */
$_TradeDate = to_date($payment_notice['create_time'], 'YmdHis');
$_MerchantID = $payment_info['config']['baofoo_account'];
$_PayID = $order['bank_id'];
if (intval($_PayID) == 1000 || intval($_PayID) == 0) {
$_PayID = "";
}
$_NoticeType = 1;
$_Md5Key = $payment_info['config']['baofoo_key'];
$_TerminalID = $payment_info['config']['baofoo_terminal'];
$_AdditionalInfo = $payment_notice_id;
$_Md5_OrderMoney = $_OrderMoney * 100;
$MARK = "|";
$_Signature = md5($_MerchantID . $MARK . $_PayID . $MARK . $_TradeDate . $MARK . $_TransID . $MARK . $_Md5_OrderMoney . $MARK . $_Merchant_url . $MARK . $_Return_url . $MARK . $_NoticeType . $MARK . $_Md5Key);
/*交易参数*/
$parameter = array('MemberID' => $_MerchantID, 'TransID' => $_TransID, 'PayID' => $_PayID, 'TradeDate' => $_TradeDate, 'OrderMoney' => $_OrderMoney * 100, 'ProductName' => $_TransID, 'Amount' => 1, 'ProductLogo' => '', 'Username' => '', 'AdditionalInfo' => $_AdditionalInfo, 'PageUrl' => $_Merchant_url, 'ReturnUrl' => $_Return_url, 'NoticeType' => $_NoticeType, 'Signature' => $_Signature, 'TerminalID' => $_TerminalID, 'InterfaceVersion' => "4.0", 'KeyType' => "1");
$def_url = '<form style="text-align:center;" action="http://gw.baofoo.com/payindex" target="_blank" style="margin:0px;padding:0px" method="POST" >';
foreach ($parameter as $key => $val) {
$def_url .= "<input type='hidden' name='{$key}' value='{$val}' />";
}
$def_url .= "<input type='submit' class='paybutton' value='前往" . $this->payment_lang['baofoo_gateway_' . intval($_PayID)] . "' />";
$def_url .= "</form>";
$def_url .= "<br /><div style='text-align:center' class='red'>" . $GLOBALS['lang']['PAY_TOTAL_PRICE'] . ":" . format_price($_OrderMoney) . "</div>";
return $def_url;
}
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:35,代码来源:Baofoo_payment.php
示例9: index
public function index()
{
$page = intval($GLOBALS['request']['page']);
$city_name = strim($GLOBALS['request']['city_name']);
//城市名称
if ($page == 0) {
$page = 1;
}
$page_size = PAGE_SIZE;
$limit = ($page - 1) * $page_size . "," . $page_size;
$event_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_event order by sort desc limit " . $limit);
$count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "deal_event");
foreach ($event_list as $k => $v) {
$now = get_gmtime();
$event_list[$k]['end_time'] = $v['event_end_time'];
$event_list[$k]['url'] = url("shop", "deal_event#show", array("id" => $v['id']));
$event_list[$k]['event_end_time'] = to_date($v['event_end_time'], 'Y-m-d');
$event_list[$k]['icon'] = get_abs_img_root(make_img($v['icon'], 592, 215, 1));
$event_list[$k]['sheng_time_format'] = to_date($v['event_end_time'] - $now, "d天h小时i分");
}
$page_total = ceil($count / $page_size);
$root = array();
$root['return'] = 1;
$root['item'] = $event_list;
$root['page'] = array("page" => $page, "page_total" => $page_total, "page_size" => $page_size);
$root['page_title'] = "活动专题";
$root['city_name'] = $city_name;
output($root);
}
开发者ID:macall,项目名称:jsd,代码行数:29,代码来源:deal_eventlist.action.php
示例10: index
public function index()
{
$order_sn = strim($_REQUEST['order_sn']);
$time = isset($_REQUEST['time']) ? to_date(to_timespan($_REQUEST['time'], "Y-m-d"), "Y-m-d") : "";
$page = intval($_REQUEST['p']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
$condition = " 1=1 ";
if ($order_sn != "") {
$condition .= " and go.order_sn = '" . $order_sn . "' ";
}
if ($time != "") {
$condition .= " and go.ex_date = '" . $time . "' ";
$GLOBALS['tmpl']->assign('time', $time);
}
$user_id = $GLOBALS['user_info']['id'];
$result = get_order($limit, $user_id, $condition);
$page = new Page($result['count'], app_conf("PAGE_SIZE"));
//初始化分页对象
$p = $page->show();
$GLOBALS['tmpl']->assign('pages', $p);
$GLOBALS['tmpl']->assign("order_sn", $order_sn);
$GLOBALS['tmpl']->assign("order_info", $result['list']);
$GLOBALS['tmpl']->assign("inc_file", "inc/uc/uc_goods_order.html");
$GLOBALS['tmpl']->display("page/uc.html");
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:28,代码来源:uc_goods_orderModule.class.php
示例11: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
$page = intval($GLOBALS['request']['page']);
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
require APP_ROOT_PATH . 'app/Lib/uc_func.php';
$root['user_login_status'] = 1;
$root['response_code'] = 1;
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
$result = get_user_log($limit, $GLOBALS['user_info']['id'], 'money');
$list = $result['list'];
foreach ($list as $k => $v) {
$list[$k]['log_time_format'] = to_date($v['log_time'], "Y-m-d H:i:s");
$list[$k]['money_format'] = format_price($v['money']);
$list[$k]['lock_money_format'] = format_price($v['lock_money']);
}
$root['item'] = $list;
$root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("PAGE_SIZE")));
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
output($root);
}
开发者ID:workplayteam,项目名称:P2P,代码行数:35,代码来源:uc_money_log.action.php
示例12: get_payment_code
public function get_payment_code($payment_notice_id)
{
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
//$order = $GLOBALS['db']->getRow("select order_sn,bank_id from ".DB_PREFIX."deal_order where id = ".$payment_notice['order_id']);
$order_sn = $payment_notice['notice_sn'];
$money = round($payment_notice['money'], 2);
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
/*$data_front_url = SITE_DOMAIN.APP_ROOT.'/index.php?ctl=payment&act=notify&class_name=Guofubao';
$data_front_url="";
$data_return_url = SITE_DOMAIN.APP_ROOT.'/index.php?ctl=payment&act=response&class_name=Guofubao';
*/
//新
$data_front_url = SITE_DOMAIN . APP_ROOT . '/callback/pay/guofubao_callback.php?act=notify';
//$data_front_url="";
$data_return_url = SITE_DOMAIN . APP_ROOT . '/callback/pay/guofubao_callback.php?act=response';
$tranCode = '8888';
//$spbill_create_ip = $_SERVER['REMOTE_ADDR'];
$spbill_create_ip = CLIENT_IP;
/* 交易日期 */
$today = to_date($payment_notice['create_time'], 'YmdHis');
$bank_id = $payment_notice['bank_id'];
if ($bank_id == '0') {
$bank_id = '';
}
$desc = $order_sn;
include_once APP_ROOT_PATH . "system/libs/iconv.php";
$chinese = new Chinese();
$desc = $chinese->Convert("UTF-8", "GBK", $desc);
/* 货币类型 */
$currencyType = '156';
/* 数字签名 */
$version = '2.1';
$tranCode = $tranCode;
$merchant_id = $payment_info['config']['merchant_id'];
$merOrderNum = $order_sn;
$tranAmt = $money;
// 总金额
$feeAmt = '';
$tranDateTime = $today;
$frontMerUrl = $data_front_url;
$backgroundMerUrl = $data_return_url;
//返回的路径
$tranIP = $spbill_create_ip != "" ? $spbill_create_ip : '';
//商户识别码
$verficationCode = $payment_info['config']['VerficationCode'];
$gopayServerTime = trim(file_get_contents("https://www.gopay.com.cn/PGServer/time"));
$signValue = 'version=[' . $version . ']tranCode=[' . $tranCode . ']merchantID=[' . $merchant_id . ']merOrderNum=[' . $merOrderNum . ']tranAmt=[' . $tranAmt . ']feeAmt=[' . $feeAmt . ']tranDateTime=[' . $tranDateTime . ']frontMerUrl=[' . $frontMerUrl . ']backgroundMerUrl=[' . $backgroundMerUrl . ']orderId=[]gopayOutOrderId=[]tranIP=[' . $tranIP . ']respCode=[]gopayServerTime=[' . $gopayServerTime . ']VerficationCode=[' . $verficationCode . ']';
$signValue = md5($signValue);
/*交易参数*/
$parameter = array('version' => '2.1', 'charset' => '2', 'language' => '1', 'signType' => '1', 'tranCode' => '8888', 'merchantID' => $merchant_id, 'virCardNoIn' => $payment_info['config']['virCardNoIn'], 'merOrderNum' => $merOrderNum, 'tranAmt' => $tranAmt, 'currencyType' => $currencyType, 'tranDateTime' => $tranDateTime, 'tranIP' => $spbill_create_ip, 'goodsName' => $desc, 'goodsDetail' => '', 'buyerName' => '', 'buyerContact' => '', 'frontMerUrl' => $frontMerUrl, 'backgroundMerUrl' => $backgroundMerUrl, 'signValue' => $signValue, 'gopayServerTime' => $gopayServerTime, 'bankCode' => $bank_id, 'userType' => 1, 'feeAmt' => '', 'isRepeatSubmit' => '', 'merRemark1' => $payment_notice_id, 'merRemark2' => '');
$def_url = '<form style="text-align:center;" action="https://gateway.gopay.com.cn/Trans/WebClientAction.do" target="_blank" style="margin:0px;padding:0px" method="get" >';
foreach ($parameter as $key => $val) {
$def_url .= "<input type='hidden' name='{$key}' value='{$val}' />";
}
$def_url .= "<input type='submit' class='paybutton' value='前往国付宝在线支付' />";
$def_url .= "</form>";
$def_url .= "<br /><div style='text-align:center' class='red'>" . $GLOBALS['lang']['PAY_TOTAL_PRICE'] . ":" . format_price($money) . "</div>";
return $def_url;
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:60,代码来源:Guofubao_payment.php
示例13: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
// require APP_ROOT_PATH.'app/Lib/uc_func.php';
$root['user_login_status'] = 1;
$root['response_code'] = 1;
$page_size = $GLOBALS['m_config']['page_size'];
$page = intval($_REQUEST['p']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * $page_size . "," . $page_size;
$log_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "user_log where user_id = " . intval($GLOBALS['user_info']['id']) . " order by log_time desc limit " . $limit);
foreach ($log_list as $k => $v) {
$log_list[$k]['log_time'] = to_date($v['log_time'], 'Y-m-d');
}
$log_count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user_log where user_id = " . intval($GLOBALS['user_info']['id']));
$root['page'] = array("page" => $page, "page_total" => ceil($log_count / $page_size), "page_size" => intval($page_size), 'total' => intval($log_count));
$root['log_list'] = $log_list;
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
output($root);
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:34,代码来源:uc_money_log.action.php
示例14: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
$id = intval($GLOBALS['request']['id']);
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
require APP_ROOT_PATH . 'app/Lib/deal.php';
$root['user_login_status'] = 1;
$deal = get_deal($id);
$root['deal'] = $deal;
//还款列表
$loan_list = $GLOBALS['db']->getAll("SELECT * FROM " . DB_PREFIX . "deal_repay where deal_id={$id} ORDER BY repay_time ASC");
$manage_fee = 0;
$impose_money = 0;
$repay_money = 0;
foreach ($loan_list as $k => $v) {
$manage_fee += $v['manage_money'];
$impose_money += $v['impose_money'];
$repay_money += $v['repay_money'];
//还款日
$loan_list[$k]['repay_time_format'] = to_date($v['repay_time'], 'Y-m-d');
$loan_list[$k]['true_repay_time_format'] = to_date($v['true_repay_time'], 'Y-m-d');
//待还本息
$loan_list[$k]['repay_money_format'] = format_price($v['repay_money']);
//借款管理费
$loan_list[$k]['manage_money_format'] = format_price($v['manage_money']);
//逾期费用
$loan_list[$k]['impose_money_format'] = format_price($v['impose_money']);
//状态
if ($v['status'] == 0) {
$loan_list[$k]['status_format'] = '提前还款';
} elseif ($v['status'] == 1) {
$loan_list[$k]['status_format'] = '准时还款';
} elseif ($v['status'] == 2) {
$loan_list[$k]['status_format'] = '逾期还款';
} elseif ($v['status'] == 3) {
$loan_list[$k]['status_format'] = '严重逾期';
}
}
$root['manage_fee'] = $manage_fee;
$root['impose_money'] = $impose_money;
$root['repay_money'] = $repay_money;
$root['loan_list'] = $loan_list;
$inrepay_info = $GLOBALS['db']->getRow("SELECT * FROM " . DB_PREFIX . "deal_inrepay_repay WHERE deal_id={$id}");
$root['inrepay_info'] = $inrepay_info;
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
$root['program_title'] = "提前还款";
output($root);
}
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:59,代码来源:uc_refund_detail.action.php
示例15: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['biz_email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['biz_pwd']);
//密码
//检查用户,用户密码
$biz_user = biz_check($email, $pwd);
$supplier_id = intval($biz_user['supplier_id']);
$type = strim($GLOBALS['request']['type']);
//0:全部评价;1:差评;2:未读
$deal_id = strim($GLOBALS['request']['deal_id']);
//团购商品id
if ($supplier_id > 0) {
$root['user_login_status'] = 1;
//用户登陆状态:1:成功登陆;0:未成功登陆
$page = intval($GLOBALS['request']['page']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * PAGE_SIZE . "," . PAGE_SIZE;
$sql = "select m.id,m.content,m.create_time,m.update_time, m.point,m.admin_reply,m.admin_id,u.user_name from " . DB_PREFIX . "message m left join fanwe_user u on u.id = m.user_id where m.rel_id = " . $deal_id . " and m.rel_table = 'deal' and m.pid = 0 and m.is_buy = 1";
$count_sql = "select count(*) from " . DB_PREFIX . "message m left join fanwe_user u on u.id = m.user_id where m.rel_id = " . $deal_id . " and m.rel_table = 'deal' and m.pid = 0 and m.is_buy = 1";
//0:全部评价;1:差评;2:未读
if ($type == 1) {
$sql .= " and m.point <= 2 ";
$count_sql .= " and m.point <= 2 ";
} else {
if ($type == 2) {
$sql .= " and m.is_read = 0 ";
$count_sql .= " and m.is_read = 0 ";
}
}
$count = $GLOBALS['db']->getOne($count_sql);
$sql .= " order by m.create_time desc limit " . $limit;
$deal_list = $GLOBALS['db']->getAll($sql);
//$root['sql'] = $sql;
//echo $sql; exit;
foreach ($deal_list as $k => $v) {
$deal_list[$k]['create_time_format'] = to_date($v['create_time'], 'Y-m-d H:i');
$deal_list[$k]['update_time_format'] = to_date($v['update_time'], 'Y-m-d H:i');
}
$root['page'] = array("page" => $page, "page_total" => ceil($count / PAGE_SIZE), "page_size" => PAGE_SIZE);
if ($deal_list == false || $deal_list == null) {
$deal_list = array();
}
//$root['count'] = count($deal_list);
//$root['22'] = print_r($deal_list,1);
$root['item'] = $deal_list;
$root['return'] = 1;
} else {
$root['return'] = 0;
$root['user_login_status'] = 0;
//用户登陆状态:1:成功登陆;0:未成功登陆
$root['info'] = "商户不存在或密码错误";
}
output($root);
}
开发者ID:macall,项目名称:jsd,代码行数:59,代码来源:biz_tuan_msg.action.php
示例16: index
public function index()
{
$payment_id = intval($GLOBALS['request']['payment']);
$money = floatval($GLOBALS['request']['money']);
if ($money <= 0) {
$root['status'] = 2;
$root['info'] = $GLOBALS['lang']['PLEASE_INPUT_CORRECT_INCHARGE'];
output($root);
}
$payment_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment where id = " . $payment_id);
if (!$payment_info) {
$root['status'] = 2;
$root['info'] = $GLOBALS['lang']['PLEASE_SELECT_PAYMENT'];
output($root);
}
if ($payment_info['fee_type'] == 0) {
//定额
$payment_fee = $payment_info['fee_amount'];
} else {
//比率
$payment_fee = $money * $payment_info['fee_amount'];
}
//开始生成订单
$now = NOW_TIME;
$order['type'] = 1;
//充值单
$order['user_id'] = $GLOBALS['user_info']['id'];
$order['create_time'] = $now;
$order['total_price'] = $money + $payment_fee;
$order['deal_total_price'] = $money;
$order['pay_amount'] = 0;
$order['pay_status'] = 0;
$order['delivery_status'] = 5;
$order['order_status'] = 0;
$order['payment_id'] = $payment_id;
$order['payment_fee'] = $payment_fee;
// $order['bank_id'] = strim($_REQUEST['bank_id']);
do {
$order['order_sn'] = to_date(get_gmtime(), "Ymdhis") . rand(100, 999);
$GLOBALS['db']->autoExecute(DB_PREFIX . "deal_order", $order, 'INSERT', '', 'SILENT');
$order_id = intval($GLOBALS['db']->insert_id());
} while ($order_id == 0);
require_once APP_ROOT_PATH . "system/model/cart.php";
$payment_notice_id = make_payment_notice($order['total_price'], $order_id, $payment_info['id']);
//创建支付接口的付款单
if ($payment_notice_id) {
$root['order_id'] = $order_id;
$root['info'] = 1;
}
// print_r($root);exit;
output($root);
// $rs = order_paid($order_id);
// if ($rs) {
// app_redirect(url("index", "payment#incharge_done", array("id" => $order_id))); //充值支付成功
// } else {
// app_redirect(url("index", "payment#pay", array("id" => $payment_notice_id)));
// }
}
开发者ID:macall,项目名称:jishida,代码行数:58,代码来源:incharge_done.action.php
示例17: get_payment_code
public function get_payment_code($payment_notice_id)
{
$upop_evn = $this->upop_evn;
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$order_sn = $GLOBALS['db']->getOne("select order_sn from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
$money = round($payment_notice['money'], 2);
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
// 商户名称
quickpay_conf::$pay_params['merAbbr'] = $payment_info['config']['upop_merAbbr'];
foreach (Upop_payment::$api_url[$upop_evn] as $key => $value) {
quickpay_conf::${$key} = $value;
}
if ($upop_evn == '2') {
quickpay_conf::$security_key = $payment_info['config']['upop_security_key'];
quickpay_conf::$pay_params['merId'] = $payment_info['config']['upop_account'];
} else {
if ($upop_evn == '1') {
quickpay_conf::$security_key = $payment_info['config']['upop_security_key_pm'];
quickpay_conf::$pay_params['merId'] = $payment_info['config']['upop_account_pm'];
} else {
if ($upop_evn == '0') {
quickpay_conf::$security_key = $payment_info['config']['upop_security_key'];
quickpay_conf::$pay_params['merId'] = $payment_info['config']['upop_account'];
}
}
}
$frontEndUrl = SITE_DOMAIN . APP_ROOT . '/callback/payment/upop_response.php';
$backEndUrl = SITE_DOMAIN . APP_ROOT . '/callback/payment/upop_notify.php';
mt_srand(quickpay_service::make_seed());
$param = array();
$param['transType'] = quickpay_conf::CONSUME;
// 交易类型,CONSUME or PRE_AUTH
$param['orderAmount'] = $money * 100;
// 交易金额 转化为分
$param['orderNumber'] = $payment_notice['notice_sn'];
// 订单号,必须唯一
$param['orderTime'] = to_date(NOW_TIME, 'YmdHis');
// 交易时间, YYYYmmhhddHHMMSS
$param['orderCurrency'] = quickpay_conf::CURRENCY_CNY;
//交易币种,CURRENCY_CNY=>人民币
$param['customerIp'] = $_SERVER['REMOTE_ADDR'];
// 用户IP
$param['frontEndUrl'] = $frontEndUrl;
// 前台回调URL
$param['backEndUrl'] = $frontEndUrl;
// 后台回调URL
/* 可填空字段
$param['commodityUrl'] = "http://www.example.com/product?name=商品"; //商品URL
$param['commodityName'] = '商品名称'; //商品名称
$param['commodityUnitPrice'] = 11000; //商品单价
$param['commodityQuantity'] = 1; //商品数量
*/
$button = "<button class='ui-button paybutton' rel='blue' type='submit'>去网银在线支付</button>";
$pay_service = new quickpay_service($param, quickpay_conf::FRONT_PAY);
$html = $pay_service->create_html($button);
return $html;
}
开发者ID:macall,项目名称:jsd,代码行数:58,代码来源:Upop_payment.php
示例18: DoDpTrade
function DoDpTrade($cfg, $user_id, $pTrdAmt, $post_url)
{
$merchant_id = $cfg['merchant_id'];
$terminal_id = $cfg['terminal_id'];
$key = $cfg['key'];
$iv = $cfg['iv'];
$pWebUrl = SITE_DOMAIN . APP_ROOT . "/index.php?ctl=collocation&act=response&class_name=Baofoo&class_act=DoDpTrade&from=" . $_REQUEST['from'];
//web方式返回
$pS2SUrl = SITE_DOMAIN . APP_ROOT . "/index.php?ctl=collocation&act=notify&class_name=Baofoo&class_act=DoDpTrade&from=" . $_REQUEST['from'];
//s2s方式返回
$user = array();
$user = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $user_id);
$data = array();
$data['merchant_id'] = $merchant_id;
//商户号
$data['terminal_id'] = $terminal_id;
//终端号
$data['order_id'] = 0;
//订单号 (唯一不可重复)
$data['user_id'] = $user_id;
$data['amount'] = $pTrdAmt;
//充值金额,单位:元
$data['mer_fee'] = 0;
//商户收取的手续费
$data['fee_taken_on'] = '1';
//费用承担方(宝付收取的费用),1平台2用户自担
$data['additional_info'] = '';
//其它信息
$GLOBALS['db']->autoExecute(DB_PREFIX . "baofoo_recharge", $data, 'INSERT');
$id = $GLOBALS['db']->insert_id();
$data_update = array();
$da
|
请发表评论