当前位置: 首页>>代码示例>>PHP>>正文


PHP local_date函数代码示例

本文整理汇总了PHP中local_date函数的典型用法代码示例。如果您正苦于以下问题:PHP local_date函数的具体用法?PHP local_date怎么用?PHP local_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了local_date函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _get_data

 function _get_data()
 {
     $this->options = stripslashes_deep($this->options);
     $today = local_date('Y-m-d');
     $this->options['is_valid'] = (empty($this->options['start_date']) || $this->options['start_date'] <= $today) && (empty($this->options['end_date']) || $this->options['end_date'] >= $today);
     return $this->options;
 }
开发者ID:dongfeihu,项目名称:estore,代码行数:7,代码来源:main.widget.php

示例2: load_to

          messages.id="' . $id . '" and
          messages_to.person="' . $_SESSION['userid'] . '"
         ';
     $db->select($query);
     if ($db->num_rows == 1) {
         $this->data = $db->data[0];
     }
 }
 function load_to()
 {
     global $db;
     $query = 'person.id, 
          person.first_name, 
          person.last_name
         from messages_to
         left join person on
          messages_to.person=person.id
         where messages_to.message="' . $this->data['id'] . '"';
     $db->select($query);
     $this->to = $db->data;
 }
 function format()
 {
     $fdata = $this->data;
     $fdata['text_html'] = html_br($fdata['text']);
     $fdata['created_html'] = local_date($fdata['created'], 'ymdHi');
     $fdata['author_first_name_html'] = mask_html($fdata['author_first_name']);
     $fdata['author_last_name_html'] = mask_html($fdata['author_last_name']);
     $to_list = array();
     $seperator = array();
     foreach ($this->to as $i => $to) {
         $to['first_name'] = mask_html($to['first_name']);
         $to['last_name'] = mask_html($to['last_name']);
         $to['seperator'] = $seperator;
         $seperator = array(array());
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:35,代码来源:class.php

示例3: get_snatch

 /**
  * 取得当前活动信息
  *
  * @access  public
  *
  * @return 活动名称
  */
 function get_snatch($id)
 {
     $sql = "SELECT g.goods_id, g.goods_sn, g.is_real, g.goods_name, g.extension_code, g.market_price, g.shop_price AS org_price, product_id, " . "IFNULL(mp.user_price, g.shop_price * '{$_SESSION['discount']}') AS shop_price, " . "g.promote_price, g.promote_start_date, g.promote_end_date, g.goods_brief, g.goods_thumb,g.goods_img, " . "ga.act_name AS snatch_name, ga.start_time, ga.end_time, ga.ext_info, ga.act_desc AS `desc` " . "FROM " . $this->pre . "goods_activity AS ga " . "LEFT JOIN " . $this->pre . "goods AS g " . "ON g.goods_id = ga.goods_id " . "LEFT JOIN " . $this->pre . "member_price AS mp " . "ON mp.goods_id = g.goods_id AND mp.user_rank = '{$_SESSION['user_rank']}' " . "WHERE ga.act_id = '{$id}' AND g.is_delete = 0";
     $goods = $this->row($sql);
     if ($goods) {
         $promote_price = bargain_price($goods['promote_price'], $goods['promote_start_date'], $goods['promote_end_date']);
         $goods['formated_market_price'] = price_format($goods['market_price']);
         $goods['formated_shop_price'] = price_format($goods['shop_price']);
         $goods['formated_promote_price'] = $promote_price > 0 ? price_format($promote_price) : '';
         $goods['goods_thumb'] = get_image_path($goods['goods_id'], $goods['goods_thumb'], true);
         $goods['goods_img'] = get_image_path($goods['goods_id'], $goods['goods_img'], true);
         $goods['url'] = url('goods/index', array('id' => $goods['goods_id']));
         $goods['start_time'] = local_date(C('time_format'), $goods['start_time']);
         $info = unserialize($goods['ext_info']);
         if ($info) {
             foreach ($info as $key => $val) {
                 $goods[$key] = $val;
             }
             $goods['is_end'] = gmtime() > $goods['end_time'];
             $goods['formated_start_price'] = price_format($goods['start_price']);
             $goods['formated_end_price'] = price_format($goods['end_price']);
             $goods['formated_max_price'] = price_format($goods['max_price']);
         }
         /* 将结束日期格式化为格林威治标准时间时间戳 */
         $goods['gmt_end_time'] = $goods['end_time'];
         $goods['end_time'] = local_date(C('time_format'), $goods['end_time']);
         $goods['snatch_time'] = sprintf(L('snatch_start_time'), $goods['start_time'], $goods['end_time']);
         return $goods;
     } else {
         return false;
     }
 }
开发者ID:ChanHarold,项目名称:ecshop,代码行数:39,代码来源:SnatchModel.class.php

示例4: check_order

function check_order($con, $goods)
{
    $msg = '';
    $btime = "";
    $ntimestamp = gmtime() + 32 * 3600;
    //24小时后时间戳
    $now = gmtime();
    $tmd = date('Y-m-d', $now + 32 * 3600);
    if (empty($con)) {
        $msg .= '请您填写收货信息|';
    } else {
        $btime = $con['best_time'];
    }
    $btimestamp = strtotime($btime);
    if (empty($goods)) {
        $msg .= '购物车没有商品|';
    }
    if (empty($btime) || strlen($btime) < 19) {
        $msg .= '请填写送货时间|';
    }
    if ($btimestamp < gmtime() + 13.25 * 3600) {
        $msg .= '送货时间不足5小时,重新填写送货时间';
    }
    if (local_date('H', $now) > 21 && substr($btime, 0, 13) < $tmd . ' 14' && $con['country'] == '441') {
        $msg .= '请注意,此时订货最早14点送货,请修改送货时间 ';
    }
    if (local_date('H', $now) < 10 && substr($btime, 0, 13) < date('Y-m-d', $now + 8 * 3600) . ' 14' && $con['country'] == '441') {
        $msg .= '请注意,此时订货最早14点送货,请修改送货时间 ';
    }
    return $msg;
}
开发者ID:songtaiwu,项目名称:m-cmsold,代码行数:31,代码来源:check_order.php

示例5: get_user_orders_1

/**
 *  获取用户指定范围的订单列表
 *
 * @access  public
 * @param   int         $user_id        用户ID号
 * @param   int         $num            列表最大数量
 * @param   int         $start          列表起始位置
 * @return  array       $order_list     订单列表
 */
function get_user_orders_1($user_id, $num = 10, $start = 0, $where = '')
{
    /* 取得订单列表 */
    $arr = array();
    $sql = "SELECT o.*, ifnull(ssc.value,'网站自营') as shopname, " . "(goods_amount + shipping_fee + insure_fee + pay_fee + pack_fee + card_fee + tax - discount) AS total_fee " . " FROM " . $GLOBALS['ecs']->table('order_info') . ' as o ' . " LEFT JOIN " . $GLOBALS['ecs']->table('supplier_shop_config') . 'as ssc ' . " ON o.supplier_id=ssc.supplier_id AND ssc.code='shop_name' " . " WHERE user_id = '{$user_id}' {$where} ORDER BY add_time DESC";
    $res = $GLOBALS['db']->SelectLimit($sql, $num, $start);
    while ($row = $GLOBALS['db']->fetchRow($res)) {
        if ($row['order_status'] == OS_UNCONFIRMED) {
            $row['handler'] = "<a href=\"user.php?act=cancel_order&order_id=" . $row['order_id'] . "\" onclick=\"if (!confirm('" . $GLOBALS['_LANG']['confirm_cancel'] . "')) return false;\">" . $GLOBALS['_LANG']['cancel'] . "</a>";
        } else {
            if ($row['order_status'] == OS_SPLITED) {
                /* 对配送状态的处理 */
                if ($row['shipping_status'] == SS_SHIPPED) {
                    $back_num = $GLOBALS['db']->getOne("SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('back_order') . " WHERE order_id = " . $row['order_id'] . " AND status_back < 6 AND status_back != 3");
                    if ($back_num > 0) {
                        $back_info = "此单存在正在退货商品,确认收货退货申请将取消。";
                    } else {
                        $back_info = "";
                    }
                    @($okgoods_time = $GLOBALS['db']->getOne("select value from " . $GLOBALS['ecs']->table('shop_config') . " where code='okgoods_time'"));
                    @($row_time = $okgoods_time - (local_date('d', gmtime()) - local_date('d', $row['shipping_time'])));
                    @($row['handler'] = "<strong><img src='themesmobile/" . $GLOBALS['_CFG']['template'] . "/images/time.png' height='30px' style='vertical-align:middle;'/>还剩" . $row_time . "天自动收货</strong><a href=\"user.php?act=affirm_received&order_id=" . $row['order_id'] . "\" onclick=\"if (!confirm('" . $back_info . $GLOBALS['_LANG']['confirm_received'] . "')) return false;\" style='display:inline-block; margin-top:12px; width:80px; height:25px; font-size:14px; line-height:25px; border:1px solid #F60; color:#fff; text-align:center;border-radius:5px; background:#F60 '>" . $GLOBALS['_LANG']['received'] . "</a>");
                } elseif ($row['shipping_status'] == SS_RECEIVED) {
                    @($row['handler'] = '<span style="color:red">' . $GLOBALS['_LANG']['ss_received'] . '</span>');
                } else {
                    if ($row['pay_status'] == PS_UNPAYED) {
                        @($row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" . $row['order_id'] . '">' . $GLOBALS['_LANG']['pay_money'] . '</a>');
                    } else {
                        @($row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" . $row['order_id'] . '">' . $GLOBALS['_LANG']['view_order'] . '</a>');
                    }
                }
            } else {
                $row['handler'] = '<span style="color:red">' . $GLOBALS['_LANG']['os'][$row['order_status']] . '</span>';
            }
        }
        $row['shipping_status'] = $row['shipping_status'] == SS_SHIPPED_ING ? SS_PREPARING : $row['shipping_status'];
        $row['order_status1'] = $row['order_status'];
        $row['order_status'] = $GLOBALS['_LANG']['os'][$row['order_status']] . ',' . $GLOBALS['_LANG']['ps'][$row['pay_status']] . ',' . $GLOBALS['_LANG']['ss'][$row['shipping_status']];
        $cod_code = $GLOBALS['db']->getOne("select pay_code from " . $GLOBALS['ecs']->table('payment') . " where pay_id=" . $row['pay_id']);
        $weixiu_time = $GLOBALS['db']->getOne("select value from " . $GLOBALS['ecs']->table('ecsmart_shop_config') . " where code='weixiu_time'");
        $row['weixiu_time'] = $weixiu_time - (local_date('d', gmtime()) - local_date('d', $order['shipping_time_end'])) <= 0 ? 0 : 1;
        $back_can_a = 1;
        $comment_s = 0;
        $shaidan_s = 0;
        $goods_list_r = get_order_goods($row);
        foreach ($goods_list_r as $g_val) {
            if ($g_val['back_can'] == 0) {
                $back_can_a = 0;
            }
            if ($g_val['comment_state'] == 0 && $g_val['is_back'] == 0 && $comment_s == 0) {
                $comment_s = $g_val['rec_id'];
            }
            if ($g_val['shaidan_state'] == 0 && $g_val['is_back'] == 0 && $shaidan_s == 0) {
                $shaidan_s = $g_val['rec_id'];
            }
        }
        $arr[$row['order_id']] = array('order_id' => $row['order_id'], 'order_sn' => $row['order_sn'], 'shopname' => $row['shopname'], 'order_time' => local_date($GLOBALS['_CFG']['time_format'], $row['add_time']), 'order_status' => str_replace(',', ' ', $row['order_status']), 'order_status1' => $row['order_status1'], 'back_can_a' => $back_can_a, 'comment_s' => $comment_s, 'shaidan_s' => $shaidan_s, 'total_fee' => price_format($row['total_fee'], false), 'goods_list' => $goods_list_r, 'pay_online' => $row['pay_online'], 'is_suborder' => $row['parent_order_id'] ? "(子订单)" : "", 'pay_status' => $row['pay_status'], 'handler' => $row['handler'], 'shipping_id' => $row['shipping_id'], 'shipping_name' => $row['shipping_name'], 'shipping_status' => $row['shipping_status'], 'pay_id' => $cod_code == 'cod' ? '' : $row['pay_id'], 'invoice_no' => $row['invoice_no'], 'weixiu_time' => $row['weixiu_time'], 'supplier_id' => $row['supplier_id'], 'count' => count($goods_list_r));
    }
    return $arr;
}
开发者ID:moonlight-wang,项目名称:feilun,代码行数:69,代码来源:lib_transaction_1.php

示例6: index_comments

 function index_comments($num)
 {
     /*$sql = 'SELECT a.*,b.goods_id,b.goods_thumb,b.goods_name FROM '. $GLOBALS['ecs']->table('comment') .
       ' AS a,'. $GLOBALS['ecs']->table('goods') .'AS b WHERE a.status = 1 AND a.parent_id = 0 and a.comment_type=0 and a.id_value=b.goods_id'.
       ' GROUP BY a.id_value ORDER by a.comment_id DESC';*/
     $sql = 'SELECT DISTINCT a.id_value,b.goods_id,b.goods_thumb,b.goods_name,b.shop_price FROM ' . $GLOBALS['ecs']->table('comment') . ' AS a,' . $GLOBALS['ecs']->table('goods') . 'AS b WHERE a.status = 1 AND a.parent_id = 0 and a.comment_type=0 and a.id_value=b.goods_id' . ' ORDER by a.comment_id DESC';
     if ($num > 0) {
         $sql .= ' LIMIT ' . $num;
     }
     $res = $GLOBALS['db']->getAll($sql);
     $comments = array();
     foreach ($res as $idx => $row) {
         $comments[$idx]['id_value'] = $row['id_value'];
         $sqli = 'SELECT add_time,content,user_name FROM ' . $GLOBALS['ecs']->table('comment') . ' where id_value=' . $row['id_value'] . ' and status = 1 AND parent_id = 0 and comment_type=0 ORDER by add_time desc';
         $resi = $GLOBALS['db']->getRow($sqli);
         $result = mysql_query($sqli);
         $getall = $GLOBALS['db']->num_rows($result);
         $comments[$idx]['number'] = $getall;
         //条数
         $comments[$idx]['add_time'] = local_date('Y-m-d', $resi['add_time']);
         $comments[$idx]['content'] = $resi['content'];
         $comments[$idx]['user_name'] = $resi['user_name'];
         $comments[$idx]['goods_thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
         $comments[$idx]['goods_name'] = $row['goods_name'];
         $comments[$idx]['shop_price'] = $row['shop_price'];
         $comments[$idx]['url'] = build_uri('goods', array('gid' => $row['goods_id']), $row['goods_name']);
     }
     return $comments;
 }
开发者ID:norain2050,项目名称:mhFault,代码行数:29,代码来源:diyfile.php

示例7: assign_comment

 /**
  * 查询评论内容
  *
  * @access  public
  * @params  integer     $id
  * @params  integer     $type
  * @params  integer     $page
  * @return  array
  */
 function assign_comment($id, $type, $rank = 0, $page = 1) {
     $rank_info = '';
     if ($rank == '1') {
         $rank_info = ' AND (comment_rank= 5 OR comment_rank = 4)';
     }
     if ($rank == '2') {
         $rank_info = ' AND (comment_rank= 2 OR comment_rank = 3)';
     }
     if ($rank == '3') {
         $rank_info = ' AND comment_rank= 1 ';
     }
     /* 取得评论列表 */
     $res = $this->row('SELECT COUNT(*) as count FROM ' . $this->pre .
             "comment WHERE id_value = '$id' AND comment_type = '$type' AND status = 1 AND parent_id = 0" . $rank_info);
     $count = $res['count'];
     $size = C('comments_number') > 0 ? C('comments_number') : 5;
     $page_count = ($count > 0) ? intval(ceil($count / $size)) : 1;
     $start = ($page - 1) * $size;
     $sql = 'SELECT * FROM ' . $this->pre .
             "comment WHERE id_value = '$id' AND comment_type = '$type' AND status = 1 AND parent_id = 0" . $rank_info .
             " ORDER BY comment_id DESC LIMIT $start , $size";
     $res = $this->query($sql);
     $arr = array();
     $ids = '';
     foreach ($res as $key => $row) {
         $ids .= $ids ? ",$row[comment_id]" : $row['comment_id'];
         $arr[$row['comment_id']]['id'] = $row['comment_id'];
         $arr[$row['comment_id']]['email'] = $row['email'];
         $arr[$row['comment_id']]['username'] = $row['user_name'];
         $arr[$row['comment_id']]['content'] = str_replace('\r\n', '<br />', htmlspecialchars($row['content']));
         $arr[$row['comment_id']]['content'] = nl2br(str_replace('\n', '<br />', $arr[$row['comment_id']]['content']));
         $arr[$row['comment_id']]['rank'] = $row['comment_rank'];
         $arr[$row['comment_id']]['add_time'] = local_date(C('time_format'), $row['add_time']);
     }
     /* 取得已有回复的评论 */
     if ($ids) {
         $sql = 'SELECT * FROM ' . $this->pre .
                 "comment WHERE parent_id IN( $ids )";
         $res = $this->query($sql);
         foreach ($res as $row) {
             $arr[$row['parent_id']]['re_content'] = nl2br(str_replace('\n', '<br />', htmlspecialchars($row['content'])));
             $arr[$row['parent_id']]['re_add_time'] = local_date(C('time_format'), $row['add_time']);
             $arr[$row['parent_id']]['re_email'] = $row['email'];
             $arr[$row['parent_id']]['re_username'] = $row['user_name'];
         }
     }
     /* 分页样式 */
     //$pager['styleid'] = isset(C('page_style'))? intval(C('page_style')) : 0;
     $pager['page'] = $page;
     $pager['size'] = $size;
     $pager['record_count'] = $count;
     $pager['page_count'] = $page_count;
     $pager['page_first'] = "javascript:gotoPage(1,$id,$type,$rank)";
     $pager['page_prev'] = $page > 1 ? "javascript:gotoPage(" . ($page - 1) . ",$id,$type,$rank)" : 'javascript:;';
     $pager['page_next'] = $page < $page_count ? 'javascript:gotoPage(' . ($page + 1) . ",$id,$type,$rank)" : 'javascript:;';
     $pager['page_last'] = $page < $page_count ? 'javascript:gotoPage(' . $page_count . ",$id,$type,$rank)" : 'javascript:;';
     $cmt = array('comments' => $arr, 'pager' => $pager);
     return $cmt;
 }
开发者ID:sayi21cn,项目名称:ecshopAndEctouch,代码行数:68,代码来源:CommentModel.class.php

示例8: PaySubmit

 /**
  * 支付提交方法
  * @param array $data 支付相关参数
  */
 public function PaySubmit($data = array())
 {
     /**************************请求参数**************************/
     //商户用户唯一编号
     $user_id = $data['user_id'];
     //支付类型
     $busi_partner = 101001;
     //商户订单号
     $no_order = $data['TransID'];
     //商户网站订单系统中唯一订单号,必填
     //付款金额
     $money_order = $data['OrderMoney'];
     //必填
     //商品名称
     $name_goods = '用户充值';
     //订单地址
     $url_order = '';
     //订单描述
     $info_order = '';
     //银行网银编码
     $bank_code = '';
     //支付方式
     $pay_type = 'D';
     //卡号
     $card_no = '';
     //银行账号姓名
     $acct_name = $data['acct_name'];
     //身份证号
     $id_no = $data['id_no'];
     //协议号
     $no_agree = '';
     //修改标记
     $flag_modify = '';
     //风险控制参数
     $risk_item = $data['risk_item'];
     //分账信息数据
     $shareing_data = '';
     //返回修改信息地址
     $back_url = '';
     //订单有效期
     $valid_order = $this->llpay_config['valid_order'];
     //服务器异步通知页面路径
     $notify_url = $data['ReturnUrl'];
     //需http://格式的完整路径,不能加?id=123这类自定义参数
     //页面跳转同步通知页面路径
     $return_url = $data['PageUrl'];
     //需http://格式的完整路径,不能加?id=123这类自定义参数,不能写成http://localhost/
     /************************************************************/
     date_default_timezone_set('PRC');
     //构造要请求的参数数组,无需改动
     $parameter = array("version" => trim($this->llpay_config['version']), "oid_partner" => trim($this->llpay_config['oid_partner']), "sign_type" => trim($this->llpay_config['sign_type']), "userreq_ip" => trim($this->llpay_config['userreq_ip']), "id_type" => trim($this->llpay_config['id_type']), "valid_order" => trim($this->llpay_config['valid_order']), "user_id" => $user_id, "timestamp" => local_date('YmdHis', time()), "busi_partner" => $busi_partner, "no_order" => $no_order, "dt_order" => local_date('YmdHis', $data['dt_order']), "name_goods" => $name_goods, "info_order" => $info_order, "money_order" => $money_order, "notify_url" => $notify_url, "url_return" => $return_url, "url_order" => $url_order, "bank_code" => $bank_code, "pay_type" => $pay_type, "no_agree" => $no_agree, "shareing_data" => $shareing_data, "risk_item" => $risk_item, "id_no" => $id_no, "acct_name" => $acct_name, "flag_modify" => $flag_modify, "card_no" => $card_no, "back_url" => $back_url);
     //建立请求
     $llpaySubmit = new LLpaySubmit($this->llpay_config);
     $html_text = $llpaySubmit->buildRequestForm($parameter, "post", "确认");
     echo $html_text;
     exit;
 }
开发者ID:shuai959980629,项目名称:TTDV1,代码行数:61,代码来源:Pay.php

示例9: get_footer

/**
 * 返回尾文件
 *
 * @return  string
 */
function get_footer()
{
    if (substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '/')) == '/index.php') {
        $footer = "<br/>Powered by ECShop[" . local_date('H:i') . "]";
    } else {
        $footer = "<br/><select><option onpick='index.php'>快速通道</option><option onpick='goods_list.php?type=best'>精品推荐</option><option onpick='goods_list.php?type=promote'>商家促销</option><option onpick='goods_list.php?type=hot'>热门商品</option><option onpick='goods_list.php?type=new'>最新产品</option></select>";
    }
    return $footer;
}
开发者ID:BGCX262,项目名称:zuyii-svn-to-git,代码行数:14,代码来源:lib_main.php

示例10: get_footer

/**
 * 返回尾文件
 *
 * @return  string
 */
function get_footer()
{
    if (substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '/')) == '/index.php') {
        $footer = "<br/>Phát triển bởi ECMS.ASIA [" . local_date('H:i') . "]";
    } else {
        $footer = "<br/><select><option onpick='index.php'>Chuyển nhanh</option><option onpick='goods_list.php?type=best'>Sản phẩm tốt nhất</option><option onpick='goods_list.php?type=promote'>Sản phẩm k.mại</option><option onpick='goods_list.php?type=hot'>Sản phẩm hot</option><option onpick='goods_list.php?type=new'>Sản phẩm mới</option></select>";
    }
    return $footer;
}
开发者ID:duynhan07,项目名称:ecshop-vietnam,代码行数:14,代码来源:lib_main.php

示例11: get_code

 /**
  * 生成支付代码
  * @param   array   $order      订单信息
  * @param   array   $payment    支付方式信息
  */
 function get_code($order, $payment)
 {
     $c_mid = trim($payment['c_mid']);
     //商户编号,在申请商户成功后即可获得,可以在申请商户成功的邮件中获取该编号
     $c_order = $order['order_sn'];
     //商户网站依照订单号规则生成的订单号,不能重复
     $c_name = "";
     //商户订单中的收货人姓名
     $c_address = "";
     //商户订单中的收货人地址
     $c_tel = "";
     //商户订单中的收货人电话
     $c_post = "";
     //商户订单中的收货人邮编
     $c_email = "";
     //商户订单中的收货人Email
     $c_orderamount = $order['order_amount'];
     //商户订单总金额
     if (!empty($order['add_time'])) {
         $c_ymd = local_date('Ymd', $order['add_time']);
     } else {
         $c_ymd = local_date('Ymd', gmtime());
     }
     //$c_ymd      = substr($order['order_sn'], 0, 8); //商户订单的产生日期,格式为"yyyymmdd",如20050102
     $c_moneytype = $payment['c_moneytype'];
     //支付币种,0为人民币
     $c_retflag = "1";
     //商户订单支付成功后是否需要返回商户指定的文件,0:不用返回 1:需要返回
     $c_paygate = empty($payment['c_paygate']) ? '' : trim($payment['c_paygate']);
     //如果在商户网站选择银行则设置该值,具体值可参见《云网支付@网技术接口手册》附录一;如果来云网支付@网选择银行此项为空值。
     $c_returl = return_url(basename(__FILE__, '.php'));
     //如果c_retflag为1时,该地址代表商户接收云网支付结果通知的页面,请提交完整文件名(对应范例文件:GetPayNotify.php)
     $c_memo1 = abs(crc32(trim($payment['c_memo1'])));
     //商户需要在支付结果通知中转发的商户参数一
     if (empty($order['order_id'])) {
         $c_memo2 = "voucher";
         //商户需要在支付结果通知中转发的商户参数二
     } else {
         $c_memo2 = '';
     }
     $c_pass = trim($payment['c_pass']);
     //支付密钥,请登录商户管理后台,在帐户信息-基本信息-安全信息中的支付密钥项
     $notifytype = "0";
     //0普通通知方式/1服务器通知方式,空值为普通通知方式
     $c_language = trim($payment['c_language']);
     //对启用了国际卡支付时,可使用该值定义消费者在银行支付时的页面语种,值为:0银行页面显示为中文/1银行页面显示为英文
     $srcStr = $c_mid . $c_order . $c_orderamount . $c_ymd . $c_moneytype . $c_retflag . $c_returl . $c_paygate . $c_memo1 . $c_memo2 . $notifytype . $c_language . $c_pass;
     //说明:如果您想指定支付方式(c_paygate)的值时,需要先让用户选择支付方式,然后再根据用户选择的结果在这里进行MD5加密,也就是说,此时,本页面应该拆分为两个页面,分为两个步骤完成。
     //--对订单信息进行MD5加密
     //商户对订单信息进行MD5签名后的字符串
     $c_signstr = md5($srcStr);
     $def_url = '<form name="payForm1" action="https://www.cncard.net/purchase/getorder.asp" method="POST" target="_blank">' . "<input type=\"hidden\" name=\"c_mid\" value=\"{$c_mid}\" />" . "<input type=\"hidden\" name=\"c_order\" value=\"{$c_order}\" />" . "<input type=\"hidden\" name=\"c_name\" value=\"{$c_name}\" />" . "<input type=\"hidden\" name=\"c_address\" value=\"{$c_address}\" />" . "<input type=\"hidden\" name=\"c_tel\" value=\"{$c_tel}\" />" . "<input type=\"hidden\" name=\"c_post\" value=\"{$c_post}\" />" . "<input type=\"hidden\" name=\"c_email\" value=\"{$c_email}\" />" . "<input type=\"hidden\" name=\"c_orderamount\" value=\"{$c_orderamount}\" />" . "<input type=\"hidden\" name=\"c_ymd\" value=\"{$c_ymd}\" />" . "<input type=\"hidden\" name=\"c_moneytype\" value=\"{$c_moneytype}\" />" . "<input type=\"hidden\" name=\"c_retflag\" value=\"{$c_retflag}\" />" . "<input type=\"hidden\" name=\"c_paygate\" value=\"{$c_paygate}\" />" . "<input type=\"hidden\" name=\"c_returl\" value=\"{$c_returl}\" />" . "<input type=\"hidden\" name=\"c_memo1\" value=\"{$c_memo1}\" />" . "<input type=\"hidden\" name=\"c_memo2\" value=\"{$c_memo2}\" />" . "<input type=\"hidden\" name=\"c_language\" value=\"{$c_language}\" />" . "<input type=\"hidden\" name=\"notifytype\" value=\"{$notifytype}\" />" . "<input type=\"hidden\" name=\"c_signstr\" value=\"{$c_signstr}\" />" . "<input type=\"submit\" name=\"submit\" value=\"" . $GLOBALS['_LANG']['cncard_button'] . "\" />" . "</form>";
     return $def_url;
 }
开发者ID:a494008974,项目名称:bzbshop,代码行数:59,代码来源:cncard.php

示例12: favourable_list

 private function favourable_list($offset = '0, 12')
 {
     /* 查询 */
     $sql = "SELECT * " . "FROM " . $this->model->pre . "favourable_activity WHERE 1" . " ORDER BY act_id  DESC  LIMIT {$offset}";
     $res = $this->model->query($sql);
     $list = array();
     foreach ($res as $row) {
         $row['start_time'] = local_date('Y-m-d H:i', $row['start_time']);
         $row['end_time'] = local_date('Y-m-d H:i', $row['end_time']);
         $list[] = $row;
     }
     return $list;
 }
开发者ID:noikiy,项目名称:shop-3,代码行数:13,代码来源:FavourableController.class.php

示例13: get_article_info

function get_article_info($article_id)
{
    $sql = "SELECT a.*, IFNULL(AVG(r.comment_rank), 0) AS comment_rank " . "FROM " . $GLOBALS['ecs']->table('article') . " AS a " . "LEFT JOIN " . $GLOBALS['ecs']->table('comment') . " AS r ON r.id_value = a.article_id AND comment_type = 1 " . "WHERE a.is_open = 1 AND a.article_id = '{$article_id}' GROUP BY a.article_id";
    $row = $GLOBALS['db']->getRow($sql);
    if ($row !== false) {
        $row['comment_rank'] = ceil($row['comment_rank']);
        $row['add_time'] = local_date($GLOBALS['_CFG']['date_format'], $row['add_time']);
        if (empty($row['author']) || $row['author'] == '_SHOPHELP') {
            $row['author'] = $GLOBALS['_CFG']['shop_name'];
        }
    }
    return $row;
}
开发者ID:seanguo166,项目名称:microdistribution,代码行数:13,代码来源:ectouch.php

示例14: get_deposit_by_user_id

function get_deposit_by_user_id($user_id, $page, $size)
{
    $sql = "SELECT * FROM " . $GLOBALS['ecs']->table('deposit') . " WHERE user_id = '{$user_id}'";
    $res = $GLOBALS['db']->selectLimit($sql, $size, ($page - 1) * $size);
    $arr = array();
    while ($row = $GLOBALS['db']->fetchRow($res)) {
        $arr[$row['id']]['id'] = $row['id'];
        $arr[$row['id']]['add_time'] = local_date('Y-m-d', $row['add_time']);
        $arr[$row['id']]['deposit_money'] = price_format($row['deposit_money']);
        $arr[$row['id']]['status'] = $row['status'];
    }
    return $arr;
}
开发者ID:moonlight-wang,项目名称:feilun,代码行数:13,代码来源:v_user_tixianmore.php

示例15: get_package_info

 /**
  * 获取指定id package 的信息
  *
  * @access  public
  * @param   int         $id         package_id
  *
  * @return array       array(package_id, package_name, goods_id,start_time, end_time, min_price, integral)
  */
 function get_package_info($id)
 {
     global $ecs, $db, $_CFG;
     $id = is_numeric($id) ? intval($id) : 0;
     $now = gmtime();
     $sql = "SELECT act_id AS id,  act_name AS package_name, goods_id , goods_name, start_time, end_time, act_desc, ext_info" . " FROM " . $this->pre . "goods_activity WHERE act_id='{$id}' AND act_type = " . GAT_PACKAGE;
     $package = $this->row($sql);
     /* 将时间转成可阅读格式 */
     if ($package['start_time'] <= $now && $package['end_time'] >= $now) {
         $package['is_on_sale'] = "1";
     } else {
         $package['is_on_sale'] = "0";
     }
     $package['start_time'] = local_date('Y-m-d H:i', $package['start_time']);
     $package['end_time'] = local_date('Y-m-d H:i', $package['end_time']);
     $row = unserialize($package['ext_info']);
     unset($package['ext_info']);
     if ($row) {
         foreach ($row as $key => $val) {
             $package[$key] = $val;
         }
     }
     $sql = "SELECT pg.package_id, pg.goods_id, pg.goods_number, pg.admin_id, " . " g.goods_sn, g.goods_name, g.market_price, g.goods_thumb, g.is_real, " . " IFNULL(mp.user_price, g.shop_price * '{$_SESSION['discount']}') AS rank_price " . " FROM " . $this->pre . "package_goods AS pg " . "   LEFT JOIN " . $this->pre . "goods AS g " . "   ON g.goods_id = pg.goods_id " . " LEFT JOIN " . $this->pre . "member_price AS mp " . "ON mp.goods_id = g.goods_id AND mp.user_rank = '{$_SESSION['user_rank']}' " . " WHERE pg.package_id = " . $id . " " . " ORDER BY pg.package_id, pg.goods_id";
     $goods_res = $this->query($sql);
     $market_price = 0;
     $real_goods_count = 0;
     $virtual_goods_count = 0;
     foreach ($goods_res as $key => $val) {
         $goods_res[$key]['goods_thumb'] = get_image_path($val['goods_id'], $val['goods_thumb'], true);
         $goods_res[$key]['market_price_format'] = price_format($val['market_price']);
         $goods_res[$key]['rank_price_format'] = price_format($val['rank_price']);
         $market_price += $val['market_price'] * $val['goods_number'];
         /* 统计实体商品和虚拟商品的个数 */
         if ($val['is_real']) {
             $real_goods_count++;
         } else {
             $virtual_goods_count++;
         }
     }
     if ($real_goods_count > 0) {
         $package['is_real'] = 1;
     } else {
         $package['is_real'] = 0;
     }
     $package['goods_list'] = $goods_res;
     $package['market_package'] = $market_price;
     $package['market_package_format'] = price_format($market_price);
     $package['package_price_format'] = price_format($package['package_price']);
     return $package;
 }
开发者ID:m7720647,项目名称:demo,代码行数:58,代码来源:PackageBaseModel.class.php


注:本文中的local_date函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。