本文整理汇总了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'];