• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pigcms_tips函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: personal

 public function personal()
 {
     if (IS_POST) {
         $data = array();
         $data['nickname'] = isset($_POST['nickname']) ? trim($_POST['nickname']) : '';
         $data['avatar'] = isset($_POST['avatar']) ? trim($_POST['avatar']) : '';
         $data['intro'] = isset($_POST['intro']) ? trim($_POST['intro']) : '';
         M('User')->save_user(array('uid' => $this->user_session['uid']), $data);
         $_SESSION['user']['nickname'] = $data['nickname'];
         json_return(0, '设置成功');
     } else {
         if (empty($this->store_session)) {
             $condition_store['uid'] = $this->user_session['uid'];
             $store = D('Store')->where($condition_store)->order('`store_id` DESC')->find();
             if ($store) {
                 if (empty($store['logo'])) {
                     $store['logo'] = 'default_shop_2.jpg';
                 }
                 $_SESSION['store'] = $store;
             } else {
                 pigcms_tips('您需要先创建一个店铺', url('store:select'));
             }
         }
     }
     $this->display();
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:26,代码来源:account_controller.php


示例2: case_load

 public function case_load()
 {
     if (empty($_POST['page'])) {
         pigcms_tips('非法访问!', 'none');
     }
     if ($_POST['page'] == 'attachment_content') {
         $get_result = M('Attachment')->getListByStoreId($this->store_session['store_id']);
         $this->assign('get_result', $get_result);
     } else {
         if ($_POST['page'] == 'ad_content') {
             $this->_ad_content();
         } else {
             if ($_POST['page'] == 'ad_edit_content') {
                 $this->_ad_edit_content();
             } else {
                 if ($_POST['page'] == 'page_content') {
                     $this->_page_content();
                 } else {
                     if ($_POST['page'] == 'create_page_content') {
                         $this->_create_page_content();
                     } else {
                         if ($_POST['page'] == 'edit_page_content') {
                             $this->_edit_page_content();
                         }
                     }
                 }
             }
         }
     }
     $this->display($_POST['page']);
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:31,代码来源:case_controller.php


示例3: load

 public function load()
 {
     $action = strtolower(trim($_POST['page']));
     if (empty($action)) {
         pigcms_tips('非法访问!', 'none');
     }
     switch ($action) {
         case 'dashboard_content':
             //应用营销概况
             $this->_index_content();
             break;
         case 'present_index':
             $this->_present_index();
             break;
         case 'present_create':
             $this->_present_create();
             break;
         case 'present_edit':
             $this->_present_edit();
             break;
         case 'product_list':
             $this->_product_list();
             breka;
         default:
             //满减/送
         //满减/送
         case 'reward_index':
             $this->_reward_index();
         case 'reward_create':
             $this->_reward_create();
         default:
             break;
     }
     $this->display($_POST['page']);
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:35,代码来源:appmarket_controller.php


示例4: load

 public function load()
 {
     $action = strtolower(trim($_POST['page']));
     if (empty($action)) {
         pigcms_tips('非法访问!', 'none');
     }
     switch ($action) {
         //优惠券
         case 'coupon_index':
             $this->_coupon_index();
             break;
             //优惠券添加
         //优惠券添加
         case 'coupon_create':
             $this->_coupon_create();
             break;
         case 'coupon_edit':
             $this->_coupon_edit();
             break;
         case 'fetchlist':
             $this->_fetchlist();
             break;
         default:
             break;
     }
     $this->display($_POST['page']);
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:27,代码来源:preferential_controller.php


示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $cate_id = $_GET['id'];
     if (!$cate_id) {
         pigcms_tips('非法访问!', 'none');
     }
     $this->cate_id = $cate_id;
     $this->assign('cid', $cate_id);
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:10,代码来源:category_controller.php


示例6: load

 public function load()
 {
     $action = strtolower(trim($_POST['page']));
     $start_time = isset($_POST['start_time']) ? trim($_POST['start_time']) : '';
     $stop_time = isset($_POST['stop_time']) ? trim($_POST['stop_time']) : '';
     $store_id = isset($_POST['store_id']) ? trim($_POST['store_id']) : $this->store_session['store_id'];
     if (empty($action)) {
         pigcms_tips('非法访问!', 'none');
     }
     switch ($action) {
         case 'index_content':
             $this->_index_content();
             break;
         case 'market_content':
             $this->_market_content();
             break;
         case 'goods_content':
             $this->_goods_content();
             break;
         case 'orders_content':
             $this->_orders_content();
             break;
         case 'order_detail_content':
             $this->_order_detail_content();
             break;
         case 'pay_order_content':
             $this->_pay_order_content();
             break;
         case 'supplier_content':
             $this->_supplier_content();
             break;
         case 'supplier_goods_content':
             $this->_supplier_goods_content();
             break;
         case 'goods_fx_setting_content':
             $this->_goods_fx_setting_content();
             break;
         case 'supplier_market_content':
             $this->_supplier_market_content();
             break;
         case 'edit_goods_content':
             $this->_edit_goods_content();
             break;
         case 'seller_content':
             $this->_seller_content();
             break;
         case 'statistics_content':
             $this->_statistics_content(array('start_time' => $start_time, 'stop_time' => $stop_time, 'store_id' => $store_id));
             break;
         case 'setting_content':
             $this->_setting_content();
             break;
     }
     $this->display($_POST['page']);
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:55,代码来源:fx_controller.php


示例7: shows

function shows()
{
    $store_id = isset($_GET['id']) ? $_GET['id'] : pigcms_tips('您输入的网址有误', 'none');
    //店铺资料
    $now_store = M('Store')->wap_getStore($store_id);
    if (empty($now_store)) {
        pigcms_tips('您访问的店铺不存在', 'none');
    }
    $action = isset($_GET['action']) ? $_GET['action'] : 'all';
    $orderList = array();
    include display('my_coupon');
    echo ob_get_clean();
}
开发者ID:fkssei,项目名称:pigcms10,代码行数:13,代码来源:my_coupon.php


示例8: __construct

 public function __construct()
 {
     import('source.class.checkFunc');
     $checkFunc = new checkFunc();
     if (!function_exists('fdsrejsie3qklwewerzdagf4ds')) {
         exit('error-4');
     }
     $checkFunc->cfdwdgfds3skgfds3szsd3idsj();
     parent::__construct();
     if (!empty($_GET['sessid']) && !empty($_GET['token'])) {
         $_SESSION['sync_store'] = true;
         $user = M('User');
         $userinfo = $user->checkUser(array('session_id' => trim($_GET['sessid']), 'token' => trim($_GET['token'])));
         if (!empty($userinfo)) {
             $_SESSION['user'] = $userinfo;
         }
         if (!empty($_GET['store_id'])) {
             $tmp_store = M('Store')->getStoreById($_GET['store_id'], $userinfo['uid']);
             if ($tmp_store) {
                 if (empty($tmp_store['logo'])) {
                     $tmp_store['logo'] = 'default_shop_2.jpg';
                 }
                 $_SESSION['store'] = $tmp_store;
             } else {
                 pigcms_tips('该店铺不存在!');
             }
         }
         setcookie('session', serialize($_SESSION), $_SERVER['REQUEST_TIME'] + 10000000, '/');
     }
     if (empty($_SESSION['user'])) {
         if (!empty($_COOKIE['session'])) {
             $_SESSION = unserialize($_COOKIE['session']);
         } else {
             redirect('./account.php');
         }
     }
     $this->store_session = $_SESSION['store'];
     $this->assign('store_session', $_SESSION['store']);
     $this->user_session = $_SESSION['user'];
     $this->assign('user_session', $_SESSION['user']);
     $open_store_drp = option('config.open_store_drp');
     if (!$this->checkFx(true) && !$open_store_drp) {
         $this->assign('enabled_drp', false);
         $this->enabled_drp = false;
     } else {
         $this->assign('enabled_drp', true);
         $this->enabled_drp = true;
     }
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:49,代码来源:base_controller_bak.php


示例9: get_usercoupon_list

function get_usercoupon_list($wap_user, $store_id)
{
    $store_id = isset($store_id) ? $store_id : pigcms_tips('您输入的网址有误', 'none');
    $page = $_POST['page'] ? $_POST['page'] : '1';
    $type = $_REQUEST['type'];
    $time = time();
    //$type = 'used';
    $type_arr = array('all', 'used', 'unused');
    if (!in_array($type, $type_arr)) {
        $type = 'all';
    }
    $where = array();
    //$where['uid'] = $wap_user['uid'];
    $where['store_id'] = $store_id;
    $where['status'] = 1;
    $where['type'] = 1;
    $where['total_amount'] = array('>', number);
    $where['start_time'] = array('<', $time);
    $where['end_time'] = array('>', $time);
    if ($page == 1) {
        $json_return['count'] = D('Coupon')->where($where)->count('id');
    }
    //$order_by = "";
    $limit = 10;
    $offset = ($page - 1) * $limit;
    $order_by = '';
    $coupon_list = M('Coupon')->getList($where, $order_by, $limit, $offset);
    $store_id_list = array();
    foreach ($coupon_list as $coupon) {
        $store_id_list[$coupon['store_id']] = $coupon['store_id'];
    }
    $store_list = M('Store')->getStoreName($store_id_list);
    $json_return['list'] = $coupon_list;
    if (count($json_return['list']) < 10) {
        $json_return['noNextPage'] = true;
    }
    json_return(0, $json_return);
}
开发者ID:fkssei,项目名称:pigcms10,代码行数:38,代码来源:store_coupon.php


示例10: load

 public function load()
 {
     $action = strtolower(trim($_POST['page']));
     if (empty($action)) {
         pigcms_tips('非法访问!', 'none');
     }
     switch ($action) {
         case 'reward_list':
             $this->_reward_list();
             break;
         case 'product_list':
             $this->_product_list();
             break;
         case 'reward_create':
             $this->_reward_create();
             break;
         case 'reward_edit':
             $this->_reward_edit();
             break;
         default:
             break;
     }
     $this->display($_POST['page']);
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:24,代码来源:reward_controller.php


示例11: dirname

 */
require_once dirname(__FILE__) . '/global.php';
if (empty($wap_user)) {
    redirect('./login.php?referer=' . urlencode($_SERVER['REQUEST_URI']));
}
//分享配置 start
$share_conf = array('title' => option('config.site_name') . '-收货地址', 'desc' => str_replace(array("\r", "\n"), array('', ''), option('config.seo_description')), 'link' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'imgUrl' => option('config.site_logo'), 'type' => '', 'dataUrl' => '');
import('WechatShare');
$share = new WechatShare();
$shareData = $share->getSgin($share_conf);
//分享配置 end
//店铺资料
$action = isset($_GET['action']) ? $_GET['action'] : 'all';
if ($action == 'all') {
    $address_list = M('User_address')->getMyAddress($wap_user['uid']);
    include display('my_address');
} else {
    if ($action == 'add') {
        include display('my_address_add');
    } else {
        if ($action == 'edit') {
            $address_id = isset($_GET['id']) ? $_GET['id'] : pigcms_tips('您输入的网址有误', 'none');
            $now_address = M('User_address')->getAdressById('', $wap_user['uid'], $address_id);
            if (empty($now_address)) {
                pigcms_tips('您编辑的收货地址不存在', 'none');
            }
            include display('my_address_edit');
        }
    }
}
echo ob_get_clean();
开发者ID:fkssei,项目名称:pigcms10,代码行数:31,代码来源:my_address.php


示例12: index

 public function index()
 {
     $product_model = M('Product');
     $this->product = $product_model->get(array('product_id' => $this->id, 'status' => 1));
     if (empty($this->product) || $this->product['status'] != 1) {
         pigcms_tips('未找到相应产品', 'none');
     }
     $this->product['wx_image'] = option('config.site_url') . '/source/qrcode.php?type=good&id=' . $this->product['product_id'];
     $is_preview = $_GET['is_preview'];
     if (!is_mobile() && $this->user_session && $this->product['uid'] == $this->user_session['uid']) {
         $this->assign('is_preview', $is_preview);
     }
     // 猜你喜欢,抽取方法为同类型的热销产品
     $condition_arr = array();
     //$condition_arr['category_id'] = $this->product['category_id'];
     $condition_arr['status'] = 1;
     $condition_arr['product_id'] = array('!=', $this->product['product_id']);
     $condition_arr['store_id'] = $this->product['store_id'];
     $similar_product_list = $product_model->getSelling($condition_arr, 'sort', 'desc', 0, 6);
     //->where($condition_arr)->order('sort desc')->limit('0, 6')->select();
     // 本店铺热卖产品,抽取方法本店铺同类型热买
     //$hot_product_list = $product_model->getSelling($condition_arr, 'sales', 'desc', 0, 6);
     // 检查商品库存情况
     $product_sku_list = array();
     $property_new_list = array();
     if ($this->product['has_property']) {
         //$product_sku_list = D('Product_sku')->field('`sku_id`, `properties`, `quantity`, `price`')->where(array('product_id' => $this->id, 'quantity'=>array('!=', '0')))->order('`sku_id` ASC')->select();
         $product_sku_list = D('Product_sku')->field('`sku_id`, `properties`, `quantity`, `price`')->where(array('product_id' => $this->id))->order('`sku_id` ASC')->select();
         $sku_price_arr = $sku_property_arr = array();
         foreach ($product_sku_list as $value) {
             $sku_price_arr[] = $value['price'];
             $sku_property_arr[$value['properties']] = true;
         }
         $property_list = D('')->field('`pp`.`pid`,`pp`.`name`')->table(array('Product_to_property' => 'ptp', 'Product_property' => 'pp'))->where("`ptp`.`product_id`='" . $this->id . "' AND `pp`.`pid`=`ptp`.`pid`")->order('`ptp`.`pigcms_id` ASC')->select();
         if (!empty($property_list)) {
             $property_value_list = D('')->field('`ppv`.`vid`,`ppv`.`value`,`ppv`.`pid`, `ppv`.`image`')->table(array('Product_to_property_value' => 'ptpv', 'Product_property_value' => 'ppv'))->where("`ptpv`.`product_id`='" . $this->id . "' AND `ppv`.`vid`=`ptpv`.`vid`")->order('`ptpv`.`pigcms_id` ASC')->select();
             if (!empty($property_value_list)) {
                 foreach ($property_value_list as $value) {
                     $propertyValueList[$value['pid']][] = array('vid' => $value['vid'], 'value' => $value['value'], 'image' => getAttachmentUrl($value['image']));
                 }
                 foreach ($property_list as $value) {
                     $property_new_list[] = array('pid' => $value['pid'], 'name' => $value['name'], 'image' => getAttachmentUrl($value['image']), 'values' => $propertyValueList[$value['pid']]);
                 }
                 if (count($property_new_list) == 1) {
                     foreach ($property_new_list[0]['values'] as $key => $value) {
                         $tmpKey = $property_new_list[0]['pid'] . ':' . $value['vid'];
                         if (empty($sku_property_arr[$tmpKey])) {
                             unset($property_new_list[0]['values'][$key]);
                         }
                     }
                 }
                 $returnArr['sku_list'] = $product_sku_list;
                 $returnArr['property_list'] = $property_new_list;
             }
         }
     }
     // 抽出店铺
     $store = M('Store')->getStore($this->product['store_id']);
     if (empty($store) || $store['status'] != 1) {
         pigcms_tips('未找到相应的店铺或已关闭', 'none');
     }
     $store_contact = array();
     if ($this->product['supplier_id']) {
         $store_contact = M('Store_contact')->get($this->product['supplier_id']);
     } else {
         $store_contact = M('Store_contact')->get($this->product['store_id']);
     }
     // 设置浏览记录,只记录产品的product_id,只记录最近5条记录
     $history_product_list = $_COOKIE['history_product_list'];
     if (empty($history_product_list)) {
         setcookie('history_product_list', $this->id, $_SERVER['REQUEST_TIME'] + 86400 * 365, '/');
     } else {
         $tmp_product_list = explode(',', $history_product_list);
         array_unshift($tmp_product_list, $this->id);
         $tmp_product_list = array_slice($tmp_product_list, 0, 6);
         $tmp_product_list = array_unique($tmp_product_list);
         $tmp_product_list = array_slice($tmp_product_list, 0, 5);
         $product_id_str = join(',', $tmp_product_list);
         setcookie('history_product_list', $product_id_str, $_SERVER['REQUEST_TIME'] + 86400 * 365, '/');
     }
     // 更改浏览次数
     M('Product')->analytics(array('product_id' => $this->id));
     // 主营分类
     $sale_category = M('Store')->getSaleCategory($this->product['store_id'], $this->product['uid']);
     // 检查是否已经收藏
     $user_collect = array('click' => 'userCollect', 'title' => '收藏');
     if (!empty($this->user_session)) {
         $collect = D('User_collect')->where(array('type' => 1, 'user_id' => $this->user_session['uid'], 'dataid' => $this->id))->find();
         if (!empty($collect)) {
             $user_collect = array('click' => 'cancelCollect', 'title' => '取消收藏');
         }
     }
     // 查看本产品是否参与活动
     $reward = '';
     if ($this->product['source_product_id'] == 0) {
         $reward = M('Reward')->getRewardByProduct($this->product);
     }
     // 查找产品的图片
     $product_image_list = M('Product_image')->getImages($this->id);
     // 查找评论TAG数量
//.........这里部分代码省略.........
开发者ID:fkssei,项目名称:pigcms10,代码行数:101,代码来源:goods_controller.php


示例13: pigcms_tips

     }
 }
 $flag1 = true;
 /*if (!empty($tmp_store['drp_limit_share'])) { //分享满多少
       $flag1 = true;
   }*/
 //if (!empty($tmp_store['drp_limit_condition'])) { // 两个条件必须满足才可分销
 if (!($flag && $flag1)) {
     if (!empty($tmp_store['drp_limit_buy']) && !empty($tmp_store['drp_limit_share'])) {
         pigcms_tips('亲,还差一步哦,在本店消费满 ' . $tmp_store['drp_limit_buy'] . '元,同时分享本店 ' . $tmp_store['drp_limit_share'] . '次,即可申请成为本店分销商。', 'none');
     } else {
         if (!empty($tmp_store['drp_limit_buy'])) {
             pigcms_tips('亲,还差一步哦,在本店消费满 ' . $tmp_store['drp_limit_buy'] . '元,即可申请成为本店分销商。', 'none');
         } else {
             if (!empty($tmp_store['drp_limit_share'])) {
                 pigcms_tips('亲,还差一步哦,分享本店 ' . $tmp_store['drp_limit_buy'] . '次,即可申请成为本店分销商。', 'none');
             }
         }
     }
 }
 /*} else {
       if (!($flag || $flag1)) {
           if (!empty($tmp_store['drp_limit_buy']) && !empty($tmp_store['drp_limit_share'])) {
               pigcms_tips('亲,还差一步哦,在本店消费满 ' . $tmp_store['drp_limit_buy'] . '元,或分享本店 ' . $tmp_store['drp_limit_share'] . '次,即可申请成为本店分销商。', 'none');
           } else if (!empty($tmp_store['drp_limit_buy'])) {
               pigcms_tips('亲,还差一步哦,在本店消费满 ' . $tmp_store['drp_limit_buy'] . '元,即可申请成为本店分销商。', 'none');
           } else if (!empty($tmp_store['drp_limit_share'])) {
               pigcms_tips('亲,还差一步哦,分享本店 ' . $tmp_store['drp_limit_buy'] . '次,即可申请成为本店分销商。', 'none');
           }
       }
   }*/
开发者ID:fkssei,项目名称:pigcms10,代码行数:31,代码来源:drp_check.php


示例14: dirname

 * 分销商品分享
 * User: pigcms_21
 * Date: 2015/7/9
 * Time: 13:54
 */
require_once dirname(__FILE__) . '/global.php';
$product_id = isset($_GET['id']) ? $_GET['id'] : pigcms_tips('您输入的网址有误', 'none');
$product_model = M('Product');
$user = M('User');
$product = $product_model->get(array('product_id' => $product_id, 'uid' => $_SESSION['wap_user']['uid']));
$store = M('Store')->wap_getStore($product['supplier_id']);
if (empty($store)) {
    pigcms_tips('您访问的店铺不存在', 'none');
}
if (empty($product)) {
    pigcms_tips('您访问的商品不存在', 'none');
}
$source_product = $product_model->get(array('product_id' => $product['source_product_id']), 'cost_price');
$original_product = $product_model->get(array('product_id' => $product['original_product_id']), 'sales,drp_seller_qty,drp_profit');
$profit = $product['price'] - $source_product['cost_price'];
if ($profit < 0) {
    $profit = 0;
}
$profit = !empty($profit) ? number_format($profit, 2, '.', '') : '0.00';
$sales = !empty($original_product['sales']) ? $original_product['sales'] : 0;
$drp_seller_qty = !empty($original_product['drp_seller_qty']) ? $original_product['drp_seller_qty'] : 0;
$drp_profit = !empty($original_product['drp_profit']) ? number_format($original_product['drp_profit'], 2, '.', '') : '0.00';
$avater = $user->getAvatarById($_SESSION['wap_user']['uid']);
$username = !empty($_SESSION['wap_user']['nickname']) ? $_SESSION['wap_user']['nickname'] : '游客';
//分享配置 start
/*$share_conf 	= array(
开发者ID:fkssei,项目名称:pigcms10,代码行数:31,代码来源:drp_product_share.php


示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $open_store = true;
     if (!empty($_GET['sessid'])) {
         $_SESSION['sync_store'] = true;
         $user = M('User');
         $userinfo = $user->checkUser(array('session_id' => trim($_GET['sessid'])));
         if (!empty($userinfo)) {
             $_SESSION['user'] = $userinfo;
         } else {
             pigcms_tips('该用户不存在!');
         }
         if (!empty($_GET['store_id'])) {
             $tmp_store = M('Store')->getStoreById($_GET['store_id'], $userinfo['uid']);
             if ($tmp_store) {
                 if (empty($tmp_store['logo'])) {
                     $tmp_store['logo'] = 'default_shop_2.jpg';
                 }
                 $_SESSION['store'] = $tmp_store;
             } else {
                 pigcms_tips('该店铺不存在!');
             }
         }
         setcookie('session', serialize($_SESSION), $_SERVER['REQUEST_TIME'] + 10000000, '/');
     }
     if (empty($_SESSION['user'])) {
         if (!empty($_COOKIE['session'])) {
             $_SESSION = unserialize($_COOKIE['session']);
         } else {
             redirect('./account.php');
         }
     }
     if (empty($_SESSION['store']['store_id'])) {
         //选择的店铺session过期
         $open_store = false;
     }
     $store_info = M('Store')->getStoreById($_SESSION['store']['store_id'], $_SESSION['store']['uid']);
     if (!empty($_SESSION['store']['drp_supplier_id'])) {
         if (empty($store_info['drp_approve'])) {
             //未审核店铺不能打开
             $open_store = false;
         }
     }
     if (empty($_SESSION['store']['drp_approve'])) {
         $_SESSION['store']['drp_approve'] = $store_info['drp_approve'];
     }
     $this->store_session = $_SESSION['store'];
     $this->assign('store_session', $_SESSION['store']);
     $this->user_session = $_SESSION['user'];
     $this->assign('user_session', $_SESSION['user']);
     $this->assign('open_store', $open_store);
     //是否能打开店铺
     $this->assign('store_select', url('store:select'));
     //店铺打不开跳转地址
     //是否启用分销
     $open_store_drp = option('config.open_store_drp');
     if (!$this->checkFx(true) && !$open_store_drp) {
         $this->assign('enabled_drp', false);
         $this->enabled_drp = false;
     } else {
         $this->assign('enabled_drp', true);
         $this->enabled_drp = true;
     }
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:65,代码来源:base_controller.php


示例16: store

 public function store()
 {
     if (IS_POST) {
         $store = M('Store');
         $name = isset($_POST['name']) ? trim($_POST['name']) : '';
         if (isset($_POST['logo'])) {
             $logo = getAttachment($_POST['logo']);
             //str_replace(array(option('config.site_url').'/upload/images/','./upload/images/'),'',trim($_POST['logo']));
         } else {
             $logo = '';
         }
         $intro = isset($_POST['intro']) ? trim($_POST['intro']) : '';
         $linkman = isset($_POST['linkman']) ? trim($_POST['linkman']) : '';
         $qq = isset($_POST['qq']) ? trim($_POST['qq']) : '';
         $mobile = isset($_POST['mobile']) ? trim($_POST['mobile']) : '';
         $open_service = isset($_POST['open_service']) ? intval(trim($_POST['open_service'])) : 0;
         $data = array();
         if ($name) {
             $data['name'] = $name;
         }
         if ($logo) {
             $data['logo'] = $logo;
         }
         $data['intro'] = $intro;
         $data['linkman'] = $linkman;
         $data['qq'] = $qq;
         $data['tel'] = $mobile;
         $data['open_service'] = $open_service;
         if ($_SESSION['store']['name'] != $name) {
             $data['edit_name_count'] = $_SESSION['store']['edit_name_count'] + 1;
             //店铺名称修改次数
         }
         $where = array();
         $where['store_id'] = $this->store_session['store_id'];
         if ($store->setting($where, $data)) {
             $_SESSION['store']['name'] = $name;
             $_SESSION['store']['logo'] = $_POST['logo'];
             $_SESSION['store']['edit_name_count'] += 1;
         }
         json_return(0, url('store:index'));
     }
     $id = $_GET['id'] + 0;
     if (!empty($id)) {
         $store = M('Store')->getStoreById($id, $_SESSION['user']['uid']);
         if (empty($store)) {
             pigcms_tips('未找到相应的店铺', 'none');
         }
         $_SESSION['store'] = $store;
     }
     $this->display();
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:51,代码来源:setting_controller.php


示例17: info

 public function info()
 {
     $weixin_bind_type = M('Weixin_bind')->get_account_type_Bydata($this->weixin_bind_info);
     if ($weixin_bind_type['errcode']) {
         pigcms_tips($weixin_bind_type['errmsg']);
     } else {
         $this->weixin_bind_info['service_type_txt'] = $weixin_bind_type['errmsg'];
     }
     $this->assign('weixin_bind', $this->weixin_bind_info);
     $this->display();
 }
开发者ID:fkssei,项目名称:pigcms10,代码行数:11,代码来源:weixin_controller.php


示例18: goods

 /**
  * 搜索产品页
  */
 function goods()
 {
     $id = $_GET['id'];
     $keyword = $_GET['keyword'];
     $start_price = $_GET['start_price'];
     $end_price = $_GET['end_price'];
     $page = max(1, $_GET['page']);
     $order = $_GET['order'];
     $sort = $_GET['sort'];
     $limit = 20;
     $WebUserInfo = $this->user_location;
     if (empty($keyword)) {
         pigcms_tips('请输入搜索关键词');
     }
     if ($order == 'juli') {
         if (!$WebUserInfo['long']) {
             $order = "";
         }
     }
     // 产品分类
     if (!empty($id)) {
         // 顶级分类和子分类
         $product_category_model = M('Product_category');
         $category_detail = $product_category_model->getCategory($id);
         // 目前产品分类只支持两级
         $cid = $category_detail['cat_id'];
         // 当访问的不是首分类时,修正为父级分类ID
         if ($category_detail['cat_fid'] != 0) {
             $cid = $category_detail['cat_fid'];
         }
         // 父类分类
         $f_category = array();
         $s_category = array();
         // 搜索分类id
         $search_cat_id_arr = array();
         $s_category = D('Product_category')->where(array('cat_fid' => $cid))->order('cat_sort desc, cat_id asc')->select();
         if ($cid == $category_detail['cat_id']) {
             $f_category = $category_detail;
             foreach ($s_category as $tmp) {
                 $search_cat_id_arr[] = $tmp['cat_id'];
             }
             $search_cat_id_arr[] = $cid;
         } else {
             $f_category = $product_category_model->getCategory($cid);
         }
     } else {
         $s_category = D('Product_category')->where(array('cat_fid' => 0))->order('cat_sort desc, cat_id asc')->select();
     }
     // 修正排序
     $order_arr = array('sort', 'sales', 'price', 'juli');
     $sort_arr = array('desc', 'asc');
     if (!in_array($order, $order_arr)) {
         $order = 'sort';
     }
     if (!in_array($sort, $sort_arr)) {
         $sort = 'asc';
     }
     if (!empty($start_price) && !empty($end_price) && $start_price > $end_price) {
         $tmp_price = $start_price;
         $start_price = $end_price;
         $end_price = $tmp_price;
     }
     $where_sql = "`status` = 1 AND `name` like '%" . $keyword . "%'";
     $where_sql2[] = "  `p`.`name` like '%" . $keyword . "%'";
     if (!empty($start_price)) {
         $where_sql .= " AND `price` >= '" . $start_price . "'";
         $where_sql2[] = "  `p`.`price` >= '" . $start_price . "'";
     }
     if (!empty($end_price)) {
         $where_sql .= " AND `price` <= '" . $end_price . "'";
         $where_sql2[] = "  p.`price` <= '" . $end_price . "'";
     }
     if (!empty($id)) {
         if (empty($search_cat_id_arr)) {
             $where_sql .= " AND `category_id` = '" . $id . "'";
             $where_sql2[] = "  `p`.`category_id` = '" . $id . "'";
         } else {
             $where_sql .= " AND `category_id` in (" . join(',', $search_cat_id_arr) . ")";
             $where_sql2[] = " `p`.`category_id` in (" . join(',', $search_cat_id_arr) . ")";
         }
     }
     // 不出现分销
     $where_sql .= " AND `supplier_id` = '0'";
     //$where_sql2 .= " AND p.`supplier_id` = '0'";
     if ($order == 'juli') {
         if ($where_sql2) {
             $where_sql2 = implode(" and ", $where_sql2);
         }
         $count = M('Product')->getSellingBydistanceCount($where_sql2);
     } else {
         $count = D('Product')->where($where_sql)->count('product_id');
     }
     $product_list = array();
     $store_list = array();
     $pages = '';
     $total_pages = 0;
     if ($count > 0) {
//.........这里部分代码省略.........
开发者ID:fkssei,项目名称:pigcms10,代码行数:101,代码来源:search_controller.php


示例19: array

     if (!empty($_SESSION['wap_drp_store'])) {
         $where['store_id'] = array('!=', $_SESSION['wap_drp_store']['store_id']);
     }
     $where['name'] = isset($_POST['name']) ? trim($_POST['name']) : '';
     $where['status'] = 1;
     if ($store->checkStoreExist($where)) {
         echo false;
     } else {
         echo true;
     }
     exit;
 } else {
     if (strtolower($_GET['a']) == 'reset_pwd') {
         //重置为初始密码
         if (empty($_SESSION['wap_drp_store'])) {
             pigcms_tips('您没有权限访问,<a href="./home.php?id=' . $_COOKIE['wap_store_id'] . '">返回首页</a>', 'none');
         }
         $user = M('User');
         $store = $_SESSION['wap_drp_store'];
         $user_info = $user->checkUser(array('uid' => $store['uid']));
         if (D('User')->where(array('uid' => $user_info['uid']))->data(array('password' => md5($user_info['phone'])))->save()) {
             redirect('./drp_ucenter.php');
         } else {
             redirect('./drp_store.php?a=account');
         }
     } else {
         if (IS_GET && $_GET['a'] == 'logout') {
             $store_id = $_SESSION['wap_drp_store']['store_id'];
             unset($_SESSION['wap_drp_store']);
             redirect('./ucenter.php?id=' . $store_id);
         }
开发者ID:fkssei,项目名称:pigcms10,代码行数:31,代码来源:drp_store.php


示例20: M

    }
    //首页推荐商品
    $product_list = M('Product')->getSelling('quantity>0 AND status=1 AND is_recommend = 1', '', '', 0, 4);
    //D('Product')->where('quantity>0 AND status=1 AND is_recommend = 1')->limit('4')->select();
    //首页推荐活动
    $active_list = D('Activity_recommend')->order("is_rec desc,ucount desc")->limit(4)->select();
    $activity = M('activity');
    foreach ($active_list as $k => $value) {
        $active_list[$k]["url"] = $activity->createUrl($value, $value['model'], '1');
        $active_list[$k]["image"] = getAttachmentUrl($value['image']);
    }
} else {
    if (empty($config['platform_mall_index_page'])) {
        pigcms_tips('请管理员在管理后台【系统设置】=》【站点配置】=》【平台商城配置】选取微页面', 'none');
    }
    //首页的微杂志
    $homePage = D('Wei_page')->where(array('page_id' => $config['platform_mall_index_page']))->find();
    if (empty($homePage)) {
        pigcms_tips('您访问的店铺没有首页', 'none');
    }
}
$imUrl = getImUrl($_SESSION['wap_user']['uid'], $store_id);
$is_have_activity = option('config.is_have_activity');
//分享配置 start
$share_conf = array('title' => option('config.site_name'), 'desc' => str_replace(array("\r", "\n"), array('', ''), option('config.seo_description')), 'link' => option('config.wap_site_url'), 'imgUrl' => option('config.site_logo'), 'type' => '', 'dataUrl' => '');
import('WechatShare');
$share = new WechatShare();
$shareData = $share->getSgin($share_conf);
//分享配置 end
include display('index');
echo ob_get_clean();
开发者ID:fkssei,项目名称:pigcms10,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP piklist函数代码示例发布时间:2022-05-15
下一篇:
PHP pieform函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap