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


PHP Templates::Display方法代码示例

本文整理汇总了PHP中Templates::Display方法的典型用法代码示例。如果您正苦于以下问题:PHP Templates::Display方法的具体用法?PHP Templates::Display怎么用?PHP Templates::Display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Templates的用法示例。


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

示例1: edit

function edit($userid, $addrid)
{
    $addrs = ReceiverAddress::getData($addrid);
    $provinces = Countys::getCountys();
    $n = isset($_REQUEST['n']) ? (int) $_REQUEST['n'] : 0;
    Templates::Assign('n', $n);
    Templates::Assign('addrs', $addrs);
    Templates::Assign('provinces', $provinces);
    Templates::Display('addressnew.html');
}
开发者ID:isonz,项目名称:fxptpcn,代码行数:10,代码来源:address.php

示例2: save

function save()
{
    $ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : array();
    $order_code = isset($_REQUEST['order_code']) ? $_REQUEST['order_code'] : '';
    $user_code = isset($_SESSION['user_code']) ? $_SESSION['user_code'] : '';
    $bh_order_code = str_replace('SK', 'BH', $order_code);
    $order_bh = Orders::getOne(array('order_code' => $bh_order_code));
    if ($order_bh) {
        $time = $order_bh['create_time'];
        $time = date('Y-m-d H:i:s', $time);
        Templates::Assign('errormsg', "订单已在 {$time} 补过一次货,不能再补货了。");
        Templates::Display('error.html');
        exit;
    }
    $orders = Orders::getOne(array('order_code' => $order_code, 'order_status' => 5), 'id, order_status');
    $order_status = isset($orders['order_status']) ? (int) $orders['order_status'] : 0;
    if (!$orders) {
        Templates::Assign('errormsg', "订单未找到,请核对该订单能补货 ,订单号: {$order_code}, order_status : {$order_status}");
        Templates::Display('error.html');
        exit;
    }
    DB::Debug();
    DB::tranBegin('replen');
    //事务开始
    Orders::createBHOrder($order_code);
    //生成补货订单
    foreach ($ids as $id) {
        $replen = OrdersBH::getData($id);
        $qt = $replen['num'];
        $sku = $replen['sku'];
        $status = ProductsStock::outStockInsertOrderProduct($bh_order_code, $sku, $qt);
        if (!$status) {
            DB::rollBack();
            Templates::Assign('errormsg', "补货保存失败,[{$sku}] 库存不足,错误代码 BH001");
            Templates::Display('error.html');
            exit;
        }
        OrdersBH::update($id, array('status' => 1));
    }
    $commit_status = DB::tranEnd('replen');
    header("Location: /order/?order_code={$order_code}");
}
开发者ID:isonz,项目名称:fxptpcn,代码行数:42,代码来源:replen.php

示例3:

<?php

//物流信息
Templates::Display('waybill.html');
开发者ID:isonz,项目名称:fxptpcn,代码行数:4,代码来源:waybill.php

示例4: array

            }
        }
        $products[$i]['outstock'][] = array('product_num' => $products[$i]['product_num'], 'exp_date' => $products[$i]['exp_date']);
        unset($products[$i]['product_num'], $products[$i]['exp_date']);
    }
    foreach ($tmp as $pk => $v) {
        if (isset($products[$pk])) {
            unset($products[$pk]);
        }
    }
    ProductsSku::getProductsPic($products);
    $orders[$k]['products'] = $products;
    $status_name = OrdersStatus::getName($order['order_status']);
    $orders[$k]['status_name'] = $status_name;
}
if ((int) $stardate > 0 && (int) $enddate > 0) {
    $stardate = date('Y-m-d', $stardate);
    $enddate = date('Y-m-d', $enddate);
}
Templates::Assign('stardate', $stardate);
Templates::Assign('enddate', $enddate);
Templates::Assign('keyword', $keyword);
Templates::Assign('paged', $paged);
Templates::Assign('orders', $orders);
Templates::Assign('ordercount', Orders::getUserOrderNum($user_code));
Templates::Assign('status', $status);
Templates::Assign('product_num', $product_num);
Templates::Assign('userlevel', $userlevel);
Templates::Assign('userinfo', $userinfo);
Templates::Display('home.html');
开发者ID:isonz,项目名称:fxptpcn,代码行数:30,代码来源:home.php

示例5: BCCL

function BCCL()
{
    $user = isset($_SESSION['user']) ? $_SESSION['user'] : null;
    if (!$user) {
        header('Location: /');
        exit;
    }
    $userid = isset($_SESSION['userid']) ? (int) $_SESSION['userid'] : 0;
    $usertype = isset($_SESSION['usertype']) ? (int) $_SESSION['usertype'] : 0;
    $name = isset($_SESSION['name']) ? $_SESSION['name'] : '';
    $userstatus = isset($_SESSION['userstatus']) ? (int) $_SESSION['userstatus'] : 0;
    if ($userstatus) {
        header('Location: /');
        exit;
    }
    //状态为0时才显示本页
    $savestatus = 0;
    $errormsg = '';
    $data['sales_channel'] = $sales_channel = isset($_POST['sales_channel']) ? $_POST['sales_channel'] : '';
    $data['how_to_kown_we'] = $how_to_kown_we = isset($_POST['how_to_kown_we']) ? $_POST['how_to_kown_we'] : '';
    $data['certification_photo'] = $certification_photo = isset($_POST['certification_photo_val']) ? $_POST['certification_photo_val'] : '';
    $data['person_hold_photo'] = $person_hold_photo = isset($_POST['person_hold_photo_val']) ? $_POST['person_hold_photo_val'] : '';
    $data['others_photo'] = $others_photo = isset($_POST['others_photo_val']) ? $_POST['others_photo_val'] : '';
    if ($sales_channel && $how_to_kown_we && $certification_photo && $person_hold_photo) {
        if (1 == $usertype) {
            $data['enterprise_legal_photo'] = $enterprise_legal_photo = isset($_POST['enterprise_legal_photo_val']) ? $_POST['enterprise_legal_photo_val'] : '';
            $data['enterprise_grant_photo'] = $enterprise_grant_photo = isset($_POST['enterprise_grant_photo_val']) ? $_POST['enterprise_grant_photo_val'] : '';
            $data['enterprise_tax_photo'] = $enterprise_tax_photo = isset($_POST['enterprise_tax_photo_val']) ? $_POST['enterprise_tax_photo_val'] : '';
            if (!$enterprise_legal_photo) {
                $errormsg = '信息未填写完整。';
                $savestatus = -1;
            } else {
                Users::update($userid, $data);
                $savestatus = 1;
            }
        } else {
            Users::update($userid, $data);
            $savestatus = 1;
        }
    }
    if (!$savestatus) {
        $userinfo = Users::getData($userid, 'certification_photo');
        $savestatus = isset($userinfo['certification_photo']) ? $userinfo['certification_photo'] : '';
        if ($savestatus) {
            $savestatus = 1;
        }
    }
    Templates::Assign('user', $user);
    Templates::Assign('usertype', $usertype);
    Templates::Assign('userid', $userid);
    Templates::Assign('name', $name);
    Templates::Assign('errormsg', $errormsg);
    Templates::Assign('savestatus', $savestatus);
    Templates::Display('signbccl.html');
}
开发者ID:isonz,项目名称:fxptpcn,代码行数:55,代码来源:sign.php

示例6: isset

            if (!$sku_id) {
                ABase::toJson(1, 'error 001');
            }
            if (Favorite::add($userid, $sku_id)) {
                ABase::toJson(0, 'ok');
            }
            ABase::toJson(1, 'error 009');
            break;
        case 'remove':
            $id = isset($_POST['id']) ? (int) $_POST['id'] : 0;
            if ($id) {
                if (Favorite::del($id)) {
                    ABase::toJson(0, 'ok');
                } else {
                    ABase::toJson(1, 'error 010');
                }
            }
            ABase::toJson(1, 'error 011');
            break;
        default:
            ABase::toJson(1, 'action error');
    }
} else {
    $page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
    $page_size = isset($_GET['page_size']) ? (int) $_GET['page_size'] : 16;
    $favorites = Favorite::getLists($userid, $page, $page_size);
    //var_dump($favorites);exit;
    Templates::Assign('favorites', $favorites['data']);
    Templates::Assign('paged', $favorites['page']);
    Templates::Display('favorite.html');
}
开发者ID:isonz,项目名称:fxptpcn,代码行数:31,代码来源:favorite.php

示例7: header

    if (!$item) {
        header("Location: /html/404.html?005");
        exit;
    }
    $sku['iteminfo'] = $item;
    $sku_code = $sku['sku'];
    $pics = ProductsPic::getSkuPics($sku_code, 'path', 'sort DESC LIMIT 0,3');
    $sku['pics'] = $pics;
    $sku['order_num'] = OrdersProducts::getSkuAllNum($sku_code);
    $sku['stock'] = ProductsStock::getSkuStock($sku_code);
    $skus = ProductsSku::getItemSkus($item_code, "id,sku,sku_name");
    $skus = ProductsSku::getProductsPic($skus);
    $sku['skus'] = $skus;
    $userid = isset($_SESSION['userid']) ? (int) $_SESSION['userid'] : 0;
    $history = array();
    if ($userid) {
        $history = UsersHistory::getProductViewLog($userid, $id);
    }
    if (!$history) {
        $history = ProductsSku::getRand($item_code);
    }
    $history = ProductsSku::getProductsPic($history);
    $history = ProductsSku::getProductsItemTitle($history);
    ProductsSku::increase("id={$id}", 'view_num');
    $log = array('op' => 'view', 'id' => $id, 'url' => Func::getCurrentURL());
    $log = json_encode($log);
    UsersHistory::addLog($userid, ProductsSku::$module_id, $log);
    Templates::Assign('history', $history);
    Templates::Assign('sku', $sku);
    Templates::Display('product.html');
}
开发者ID:isonz,项目名称:fxptpcn,代码行数:31,代码来源:product.php

示例8:

<?php

//申请支持
Templates::Display('support.html');
开发者ID:isonz,项目名称:fxptpcn,代码行数:4,代码来源:support.php

示例9: foreach

foreach ($product_ids as $sku_id => $product_id) {
    $qt = isset($qts[$sku_id]) ? (int) $qts[$sku_id] : 0;
    if ($qt < 1) {
        continue;
    }
    $skus[$sku_id]['qt'] = $qt;
    $skus[$sku_id]['info'] = $info = ProductsSku::getData($sku_id);
    $current_price = isset($info['current_price']) ? $info['current_price'] : 0.0;
    $pic = ProductsPic::getOne(array('sku' => $info['sku']), 'path', 'sort DESC');
    $skus[$sku_id]['info']['pic'] = $pic['path'];
    $item = ProductsSku::getSkuItem($info['item'], 'title');
    $skus[$sku_id]['info']['title'] = $item['title'];
    $total = $total + $qt * $current_price;
}
//var_dump($product_ids,$skus);exit;
$userlevel = Users::getLevel($userid);
$discount = $userlevel['discount'];
$newtotal = $total * $discount;
$address = ReceiverAddress::getInfoByUser($userid);
//var_dump($address);
$yunfei = 0.0;
$token = ABase::token();
Templates::Assign('yunfei', $yunfei);
Templates::Assign('token', $token);
Templates::Assign('address', $address);
Templates::Assign('userlevel', $userlevel);
Templates::Assign('newtotal', $newtotal);
Templates::Assign('total', $total);
Templates::Assign('skus', $skus);
Templates::Display('buy.html');
开发者ID:isonz,项目名称:fxptpcn,代码行数:30,代码来源:buy.php

示例10: isset

<?php

//用户信息
$userid = isset($_SESSION['userid']) ? (int) $_SESSION['userid'] : 0;
$user = Users::getData($userid);
$address = ReceiverAddress::getInfo($user['receiver_address_id']);
$provinces = Countys::getCountys();
$city = Countys::getName($address['receiver_city']);
$county = Countys::getName($address['receiver_county']);
//var_dump($address);
//var_dump($provinces);
Templates::Assign('provinces', $provinces);
Templates::Assign('city', $city);
Templates::Assign('county', $county);
Templates::Assign('address', $address);
Templates::Assign('user', $user);
Templates::Display('user.html');
开发者ID:isonz,项目名称:fxptpcn,代码行数:17,代码来源:user.php

示例11: time

        }
    }
    if (!$orders) {
        Templates::Assign('errormsg', "未获取到相应的订单,或订单已支付,或订单已过期, 请核对后再试");
        Templates::Display('error.html');
        exit;
    }
    $redirect = 1;
}
$sign = _PTPPAYTOKEN . "-1001-" . $order_code . "-1001-" . time();
$sign = Func::encode($sign, _PTPPAYKEY);
if (!$sign) {
    Templates::Assign('errormsg', "加密失败,请到订单列表页面继续完成支付");
    Templates::Display('error.html');
    exit;
}
$host = $_SERVER['HTTP_HOST'];
$md = md5($sign . $host . $rate);
$payurl = _PTPPAYURL . "?sign={$sign}&host={$host}&rate={$rate}&md={$md}";
if ($redirect) {
    header("Location: {$payurl}");
    exit;
}
Templates::Assign('payurl', $payurl);
$rate = 1;
$md = md5($sign . $host . $rate);
$payurl_all = _PTPPAYURL . "?sign={$sign}&host={$host}&rate={$rate}&md={$md}";
Templates::Assign('payurl_all', $payurl_all);
Templates::Assign('order_code', $order_code);
Templates::Display('pay.html');
开发者ID:isonz,项目名称:fxptpcn,代码行数:30,代码来源:pay.php

示例12:

<?php

//联系我们
Templates::Display('contactus.html');
开发者ID:isonz,项目名称:fxptpcn,代码行数:4,代码来源:contactus.php

示例13: isset

            $qt = isset($_POST['qt']) ? (int) $_POST['qt'] : 0;
            $sku_id = isset($_POST['sku_id']) ? (int) $_POST['sku_id'] : 0;
            if (!$qt || !$sku_id) {
                ABase::toJson(1, 'error 001');
            }
            if (Cart::add($userid, $sku_id, $qt)) {
                ABase::toJson(0, 'ok');
            }
            ABase::toJson(1, 'error 009');
            break;
        case 'remove':
            $sku_id = isset($_POST['sku_id']) ? (int) $_POST['sku_id'] : 0;
            if ($sku_id) {
                if (Cart::del(0, array('user_id' => $userid, 'sku_id' => $sku_id))) {
                    ABase::toJson(0, 'ok');
                } else {
                    ABase::toJson(1, 'error 010');
                }
            }
            ABase::toJson(1, 'error 011');
            break;
        default:
            ABase::toJson(1, 'action error');
    }
} else {
    $products = Cart::getProducts($userid);
    $userlevel = Users::getLevel($userid);
    Templates::Assign('userlevel', $userlevel);
    Templates::Assign('products', $products);
    Templates::Display('cart.html');
}
开发者ID:isonz,项目名称:fxptpcn,代码行数:31,代码来源:cart.php

示例14: array

        $YK_orders['yk_pay_method'] = PaymentMethod::getData($yk_paymethodid);
    }
    $BH_orders = array();
    $BH_products = array();
    $bh_order_code = str_replace('SK', 'BH', $order_code);
    $BH_orders = Orders::getOne(array('order_code' => $bh_order_code));
    if ($BH_orders) {
        $BH_products = Orders::getOrderPrducts($bh_order_code);
    }
    $receiver_address_id = (int) $orders['receiver_address_id'];
    $address = ReceiverAddress::getInfo($receiver_address_id);
    $paymethodid = $orders['pay_method'];
    $paymethod = PaymentMethod::getData($paymethodid);
    $userlevel = Users::getLevel($userid);
    $discount = $userlevel['discount'];
    $products = Orders::getOrderPrducts($order_code);
    //获取order status 名称
    $statusname = OrdersStatus::getData($order_status);
    $orders['order_statusname'] = $statusname['name'];
    //var_dump($orders);
    Templates::Assign('order_code', $order_code);
    Templates::Assign('orders', $orders);
    Templates::Assign('YK_orders', $YK_orders);
    Templates::Assign('discount', $discount);
    Templates::Assign('address', $address);
    Templates::Assign('products', $products);
    Templates::Assign('BH_orders', $BH_orders);
    Templates::Assign('BH_products', $BH_products);
    Templates::Assign('paymethod', $paymethod);
    Templates::Display('order.html');
}
开发者ID:isonz,项目名称:fxptpcn,代码行数:31,代码来源:order.php


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