本文整理匯總了PHP中uk86_cthumb函數的典型用法代碼示例。如果您正苦於以下問題:PHP uk86_cthumb函數的具體用法?PHP uk86_cthumb怎麽用?PHP uk86_cthumb使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了uk86_cthumb函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getBuyStepData
/**
* 得到虛擬商品購買數據(商品、店鋪、會員)
* @param int $goods_id 商品ID
* @param int $quantity 購買數量
* @param int $member_id 會員ID
* @return array
*/
public function getBuyStepData($goods_id, $quantity, $member_id)
{
$goods_info = Model('goods')->getVirtualGoodsOnlineInfoByID($goods_id);
if (empty($goods_info)) {
return uk86_callback(false, '該商品不符合購買條件,可能的原因有:下架、不存在、過期等');
}
if ($goods_info['virtual_limit'] > $goods_info['goods_storage']) {
$goods_info['virtual_limit'] = $goods_info['goods_storage'];
}
//取得搶購信息
$goods_info = $this->_getGroupbuyInfo($goods_info);
$quantity = abs(intval($quantity));
$quantity = $quantity == 0 ? 1 : $quantity;
$quantity = $quantity > $goods_info['virtual_limit'] ? $goods_info['virtual_limit'] : $quantity;
if ($quantity > $goods_info['goods_storage']) {
return uk86_callback(false, '該商品庫存不足');
}
$goods_info['quantity'] = $quantity;
$goods_info['goods_total'] = uk86_ncPriceFormat($goods_info['goods_price'] * $goods_info['quantity']);
$goods_info['goods_image_url'] = uk86_cthumb($goods_info['goods_image'], 240, $goods_info['store_id']);
$return = array();
$return['goods_info'] = $goods_info;
$return['store_info'] = Model('store')->getStoreOnlineInfoByID($goods_info['store_id'], 'store_name,store_id,member_id');
$return['member_info'] = Model('member')->getMemberInfoByID($member_id);
// $model_payment = Model('payment');
// $pd_payment_info = Model('payment')->getPaymentOpenInfo(array('payment_code'=>'predeposit'));
// if (empty($pd_payment_info)) {
// $return['member_info']['available_predeposit'] = 0;
// $return['member_info']['available_rc_balance'] = 0;
// }
return uk86_callback(true, '', $return);
}
示例2: getMansongRuleListByID
/**
* 讀取滿即送規則列表
* @param array $mansong_id 查詢條件
* @param int $page 分頁數
* @param string $order 排序
* @param string $field 所需字段
* @return array 滿即送套餐列表
*
*/
public function getMansongRuleListByID($mansong_id)
{
$condition = array();
$condition['mansong_id'] = $mansong_id;
$mansong_rule_list = $this->where($condition)->order('price desc')->select();
if (!empty($mansong_rule_list)) {
$model_goods = Model('goods');
for ($i = 0, $j = count($mansong_rule_list); $i < $j; $i++) {
$goods_id = intval($mansong_rule_list[$i]['goods_id']);
if (!empty($goods_id)) {
$goods_info = $model_goods->getGoodsOnlineInfoByID($goods_id);
if (!empty($goods_info)) {
if (empty($mansong_rule_list[$i]['mansong_goods_name'])) {
$mansong_rule_list[$i]['mansong_goods_name'] = $goods_info['goods_name'];
}
$mansong_rule_list[$i]['goods_image'] = $goods_info['goods_image'];
$mansong_rule_list[$i]['goods_image_url'] = uk86_cthumb($goods_info['goods_image'], $goods_info['store_id']);
$mansong_rule_list[$i]['goods_storage'] = $goods_info['goods_storage'];
$mansong_rule_list[$i]['goods_id'] = $goods_id;
$mansong_rule_list[$i]['goods_url'] = uk86_urlShop('goods', 'index', array('goods_id' => $goods_id));
}
}
}
}
return $mansong_rule_list;
}
示例3: cart_listOp
/**
* 購物車列表
*/
public function cart_listOp()
{
$model_cart = Model('cart');
$condition = array('buyer_id' => $this->member_info['member_id']);
$cart_list = $model_cart->listCart('db', $condition);
$sum = 0;
foreach ($cart_list as $key => $value) {
$cart_list[$key]['goods_image_url'] = uk86_cthumb($value['goods_image'], $value['store_id']);
$cart_list[$key]['goods_sum'] = uk86_ncPriceFormat($value['goods_price'] * $value['goods_num']);
$sum += $cart_list[$key]['goods_sum'];
}
output_data(array('cart_list' => $cart_list, 'sum' => uk86_ncPriceFormat($sum)));
}
示例4: order_listOp
/**
* 訂單列表
*/
public function order_listOp()
{
$model_order = Model('order');
$condition = array();
$condition['buyer_id'] = $this->member_info['member_id'];
$order_list_array = $model_order->getNormalOrderList($condition, $this->page, '*', 'order_id desc', '', array('order_goods'));
$order_group_list = array();
$order_pay_sn_array = array();
foreach ($order_list_array as $value) {
//顯示取消訂單
$value['if_cancel'] = $model_order->getOrderOperateState('buyer_cancel', $value);
//顯示收貨
$value['if_receive'] = $model_order->getOrderOperateState('receive', $value);
//顯示鎖定中
$value['if_lock'] = $model_order->getOrderOperateState('lock', $value);
//顯示物流跟蹤
$value['if_deliver'] = $model_order->getOrderOperateState('deliver', $value);
//商品圖
foreach ($value['extend_order_goods'] as $k => $goods_info) {
$value['extend_order_goods'][$k]['goods_image_url'] = uk86_cthumb($goods_info['goods_image'], 240, $value['store_id']);
}
$order_group_list[$value['pay_sn']]['order_list'][] = $value;
//如果有在線支付且未付款的訂單則顯示合並付款鏈接
if ($value['order_state'] == ORDER_STATE_NEW) {
$order_group_list[$value['pay_sn']]['pay_amount'] += $value['order_amount'] - $value['rcb_amount'] - $value['pd_amount'];
}
$order_group_list[$value['pay_sn']]['add_time'] = $value['add_time'];
//記錄一下pay_sn,後麵需要查詢支付單表
$order_pay_sn_array[] = $value['pay_sn'];
}
$new_order_group_list = array();
foreach ($order_group_list as $key => $value) {
$value['pay_sn'] = strval($key);
$new_order_group_list[] = $value;
}
$page_count = $model_order->gettotalpage();
$array_data = array('order_group_list' => $new_order_group_list);
if (isset($_GET['getpayment']) && $_GET['getpayment'] == "true") {
$model_mb_payment = Model('mb_payment');
$payment_list = $model_mb_payment->getMbPaymentOpenList();
$payment_array = array();
if (!empty($payment_list)) {
foreach ($payment_list as $value) {
$payment_array[] = array('payment_code' => $value['payment_code'], 'payment_name' => $value['payment_name']);
}
}
$array_data['payment_list'] = $payment_array;
}
//output_data(array('order_group_list' => $array_data), mobile_page($page_count));
output_data($array_data, mobile_page($page_count));
}
示例5: indexOp
/**
* 發貨列表
*
*/
public function indexOp()
{
$model_order = Model('order');
if (!in_array($_GET['state'], array('deliverno', 'delivering', 'delivered'))) {
$_GET['state'] = 'deliverno';
}
$order_state = str_replace(array('deliverno', 'delivering', 'delivered'), array(ORDER_STATE_PAY, ORDER_STATE_SEND, ORDER_STATE_SUCCESS), $_GET['state']);
$condition = array();
$condition['store_id'] = $_SESSION['store_id'];
$condition['order_state'] = $order_state;
if ($_GET['buyer_name'] != '') {
$condition['buyer_name'] = $_GET['buyer_name'];
}
if ($_GET['order_sn'] != '') {
$condition['order_sn'] = $_GET['order_sn'];
}
$if_start_date = preg_match('/^20\\d{2}-\\d{2}-\\d{2}$/', $_GET['query_start_date']);
$if_end_date = preg_match('/^20\\d{2}-\\d{2}-\\d{2}$/', $_GET['query_end_date']);
$start_unixtime = $if_start_date ? strtotime($_GET['query_start_date']) : null;
$end_unixtime = $if_end_date ? strtotime($_GET['query_end_date']) : null;
if ($start_unixtime || $end_unixtime) {
$condition['add_time'] = array('time', array($start_unixtime, $end_unixtime));
}
$order_list = $model_order->getOrderList($condition, 5, '*', 'order_id desc', '', array('order_goods', 'order_common', 'member'));
foreach ($order_list as $key => $order_info) {
foreach ($order_info['extend_order_goods'] as $value) {
$value['image_60_url'] = uk86_cthumb($value['goods_image'], 60, $value['store_id']);
$value['image_240_url'] = uk86_cthumb($value['goods_image'], 240, $value['store_id']);
$value['goods_type_cn'] = uk86_orderGoodsType($value['goods_type']);
$value['goods_url'] = uk86_urlShop('goods', 'index', array('goods_id' => $value['goods_id']));
if ($value['goods_type'] == 5) {
$order_info['zengpin_list'][] = $value;
} else {
$order_info['goods_list'][] = $value;
}
}
if (empty($order_info['zengpin_list'])) {
$order_info['goods_count'] = count($order_info['goods_list']);
} else {
$order_info['goods_count'] = count($order_info['goods_list']) + 1;
}
$order_list[$key] = $order_info;
}
Tpl::output('order_list', $order_list);
Tpl::output('show_page', $model_order->showpage());
self::profile_menu('deliver', $_GET['state']);
Tpl::showpage('store_order.deliver');
}
示例6: order_listOp
/**
* 訂單列表
*/
public function order_listOp()
{
$model_vr_order = Model('vr_order');
$condition = array();
$condition['buyer_id'] = $this->member_info['member_id'];
$order_list = $model_vr_order->getOrderList($condition, $this->page, '*', 'order_id desc');
foreach ($order_list as $key => $order) {
//顯示取消訂單
$order_list[$key]['if_cancel'] = $model_vr_order->getOrderOperateState('buyer_cancel', $order);
//顯示支付
$order_list[$key]['if_pay'] = $model_vr_order->getOrderOperateState('payment', $order);
$order_list[$key]['goods_image_url'] = uk86_cthumb($order['goods_image'], 240, $order['store_id']);
}
$page_count = $model_vr_order->gettotalpage();
output_data(array('order_list' => $order_list), mobile_page($page_count));
}
示例7: favorites_listOp
/**
* 收藏列表
*/
public function favorites_listOp()
{
$model_favorites = Model('favorites');
$favorites_list = $model_favorites->getGoodsFavoritesList(array('member_id' => $this->member_info['member_id']), '*', $this->page);
$page_count = $model_favorites->gettotalpage();
$favorites_id = '';
foreach ($favorites_list as $value) {
$favorites_id .= $value['fav_id'] . ',';
}
$favorites_id = rtrim($favorites_id, ',');
$model_goods = Model('goods');
$field = 'goods_id,goods_name,goods_price,goods_image,store_id';
$goods_list = $model_goods->getGoodsList(array('goods_id' => array('in', $favorites_id)), $field);
foreach ($goods_list as $key => $value) {
$goods_list[$key]['fav_id'] = $value['goods_id'];
$goods_list[$key]['goods_image_url'] = uk86_cthumb($value['goods_image'], 240, $value['store_id']);
}
output_data(array('favorites_list' => $goods_list), mobile_page($page_count));
}
示例8: foreach
foreach ($cart_info['gift_list'] as $goods_info) {
?>
<li nc_group="<?php
echo $cart_info['cart_id'];
?>
"><a href="<?php
echo uk86_urlShop('goods', 'index', array('goods_id' => $goods_info['gift_goodsid']));
?>
" target="_blank" class="uk86_thumb" title="贈品:<?php
echo $goods_info['gift_goodsname'];
?>
* <?php
echo $goods_info['gift_amount'] * $cart_info['goods_num'];
?>
"><img src="<?php
echo uk86_cthumb($goods_info['gift_goodsimage'], 60, $store_id);
?>
" alt="<?php
echo $goods_info['gift_goodsname'];
?>
"/></a> </li>
<?php
}
?>
</ul>
</dd>
<?php
}
?>
</dl></td>
<td class="w120"><em><?php
示例9: foreach
<?php
if ($item_edit_flag) {
?>
<h5>內容:</h5>
<?php
}
?>
<?php
if (!empty($item_data['item']) && is_array($item_data['item'])) {
?>
<?php
foreach ($item_data['item'] as $item_value) {
?>
<div nctype="item_image" class="item">
<div class="goods-pic"><img nctype="goods_image" src="<?php
echo uk86_cthumb($item_value['goods_image']);
?>
" alt=""></div>
<div class="goods-name" nctype="goods_name"><?php
echo $item_value['goods_name'];
?>
</div>
<div class="goods-price" nctype="goods_price">¥<?php
echo $item_value['goods_promotion_price'];
?>
</div>
<?php
if ($item_edit_flag) {
?>
<input nctype="goods_id" name="item_data[item][]" type="hidden" value="<?php
echo $item_value['goods_id'];
示例10: uk86_urlShop
<h4>商品信息</h4>
</div>
<div class="content">
<dl class="ncs-comment-goods">
<dt class="goods-name"> <a href="<?php
echo uk86_urlShop('goods', 'index', array('goods_id' => $output['goods']['goods_id']));
?>
"> <?php
echo $output['goods']['goods_name'];
?>
</a> </dt>
<dd class="goods-pic"><a href="<?php
echo uk86_urlShop('goods', 'index', array('goods_id' => $output['goods']['goods_id']));
?>
"> <img src="<?php
echo uk86_cthumb($output['goods']['goods_image'], 240);
?>
" alt="<?php
echo $output['goods']['goods_name'];
?>
"> </a> </dd>
<dd class="goods-price"><?php
echo $lang['goods_index_goods_price'] . $lang['nc_colon'];
?>
<em class="saleP"><?php
echo $lang['currency'] . $output['goods']['goods_price'];
?>
</em></dd>
<dd class="goods-raty"><?php
echo $lang['goods_index_evaluation'] . $lang['nc_colon'];
?>
示例11: uk86_cthumb
?>
<span><?php
echo $lang['text_not_join'];
?>
</span>
<?php
} else {
?>
<a href="<?php
echo $val['goods_url'];
?>
" title="<?php
echo $val['mansong_goods_name'];
?>
" target="_blank" class="goods-thumb"> <img src="<?php
echo uk86_cthumb($val['goods_image']);
?>
"/> </a>
<?php
}
?>
</li>
<?php
}
?>
<?php
}
?>
</ul></td>
<td class="align-center"><?php
echo $output['mansong_info']['mansong_state_text'];
示例12: getMansongRuleCartListByTotal
/**
* 取得店鋪級優惠 - 跟據商品金額返回每個店鋪當前符合的一條活動規則,如果有贈品,則自動追加到購買列表,價格為0
* @param unknown $store_goods_total 每個店鋪的商品金額小計,以店鋪ID為下標
* @return array($premiums_list,$mansong_rule_list) 分別為贈品列表[下標自增],店鋪滿送規則列表[店鋪ID為下標]
*/
public function getMansongRuleCartListByTotal($store_goods_total)
{
if (!C('promotion_allow') || empty($store_goods_total) || !is_array($store_goods_total)) {
return array(array(), array());
}
$model_mansong = Model('p_mansong');
$model_goods = Model('goods');
//定義贈品數組,下標為店鋪ID
$premiums_list = array();
//定義滿送活動數組,下標為店鋪ID
$mansong_rule_list = array();
foreach ($store_goods_total as $store_id => $goods_total) {
$rule_info = $model_mansong->getMansongRuleByStoreID($store_id, $goods_total);
if (is_array($rule_info) && !empty($rule_info)) {
//即不減金額,也找不到促銷商品時(已下架),此規則無效
if (empty($rule_info['discount']) && empty($rule_info['mansong_goods_name'])) {
continue;
}
$rule_info['desc'] = $this->_parseMansongRuleDesc($rule_info);
$rule_info['discount'] = uk86_ncPriceFormat($rule_info['discount']);
$mansong_rule_list[$store_id] = $rule_info;
//如果贈品在售,有庫存,則追加到購買列表
if (!empty($rule_info['mansong_goods_name']) && !empty($rule_info['goods_storage'])) {
$data = array();
$data['goods_id'] = $rule_info['goods_id'];
$data['goods_name'] = $rule_info['mansong_goods_name'];
$data['goods_num'] = 1;
$data['goods_price'] = 0.0;
$data['goods_image'] = $rule_info['goods_image'];
$data['goods_image_url'] = uk86_cthumb($rule_info['goods_image']);
$data['goods_storage'] = $rule_info['goods_storage'];
$premiums_list[$store_id][] = $data;
}
}
}
return array($premiums_list, $mansong_rule_list);
}
示例13: foreach
if (is_array($output['goodsevallist']) && !empty($output['goodsevallist'])) {
?>
<div class="ncm-evaluation-list">
<?php
foreach ((array) $output['goodsevallist'] as $k => $v) {
?>
<div class="ncm-evaluation-timeline">
<div class="date"><?php
echo @date('Y-m-d H:i:s', $v['geval_addtime']);
?>
</div>
<div class="goods-thumb"><a target="_blank" href="<?php
echo uk86_urlShop('goods', 'index', array('goods_id' => $v['geval_goodsid']));
?>
"> <img src="<?php
echo uk86_cthumb($v['geval_goodsimage'], 60);
?>
"> </a></div>
<dl class="detail">
<dt><a target="_blank" href="<?php
echo uk86_urlShop('goods', 'index', array('goods_id' => $v['geval_goodsid']));
?>
"><?php
echo $v['geval_goodsname'];
?>
</a> </dt>
<dd>商品評分:
<div class="raty" style="display:inline-block;" data-score="<?php
echo $v['geval_scores'];
?>
"></div>
示例14: foreach
?>
<?php
if ($output['goods']['have_gift'] == 'gift' && !empty($output['gift_array'])) {
?>
<ul class="clearfixd">
<li>
<label>贈品</label>
<div><h2>贈下方熱賣商品,贈完為止</h2></div>
<div class="select_show hidden">
<?php
foreach ($output['gift_array'] as $val) {
?>
<dl style="display:inline-block; width:6rem;">
<dt>
<img style="border:0.02rem solid #ccc; margin-bottom:0.1rem; float:left; width:0.6rem; height:0.6rem;" src="<?php
echo uk86_cthumb($val['gift_goodsimage'], '60', $output['goods']['store_id']);
?>
">
<em style="float:left; margin-left:0.3rem;"><a style="color:#0080c2; font-size:0.25rem; line-height:0.6rem;" href="<?php
echo uk86_urlShop('wap_goods_info', 'index', array('goods_id' => $val['gift_goodsid']));
?>
"><?php
echo $val['gift_goodsname'];
?>
</a><font style="color:#fcb44e; margin-left:0.3rem; font-size:0.2rem;">X<?php
echo $val['gift_amount'];
?>
</font></em>
</dt>
</dl>
<?php
示例15: foreach
if (!empty($output['list']) && is_array($output['list'])) {
?>
<?php
foreach ($output['list'] as $k => $v) {
?>
<tr class="hover edit">
<td><input value="<?php
echo $v['aclass_id'];
?>
" class="checkitem" type="checkbox" name="aclass_id[]"></td>
<td>
<?php
if ($v['aclass_cover'] != '') {
?>
<img src="<?php
echo uk86_cthumb($v['aclass_cover'], 60, $v['store_id']);
?>
" onload="javascript:DrawImage(this,70,70);">
<?php
} else {
?>
<img src="<?php
echo ADMIN_SITE_URL . '/templates/' . TPL_NAME . '/images/member/default_image.png';
?>
" onload="javascript:DrawImage(this,70,70);">
<?php
}
?>
</td>
<td class="name"><?php
echo $v['aclass_name'];