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


PHP rkcache函数代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Language::read('member_groupbuy,home_cart_index');
     //检查抢购功能是否开启
     if (intval(C('groupbuy_allow')) !== 1) {
         showMessage(Language::get('groupbuy_unavailable'), urlShop(), '', 'error');
     }
     //分类导航
     $nav_link = array(0 => array('title' => Language::get('homepage'), 'link' => SHOP_SITE_URL), 1 => array('title' => Language::get('nc_groupbuy')));
     Tpl::output('nav_link_list', $nav_link);
     Tpl::setLayout('home_groupbuy_layout');
     Tpl::output('index_sign', 'groupbuy');
     if ($_GET['op'] != 'groupbuy_detail') {
         // 抢购价格区间
         $this->groupbuy_price = rkcache('groupbuy_price', true);
         Tpl::output('price_list', $this->groupbuy_price);
         $model_groupbuy = Model('groupbuy');
         // 线上抢购分类
         $this->groupbuy_classes = $model_groupbuy->getGroupbuyClasses();
         Tpl::output('groupbuy_classes', $this->groupbuy_classes);
         // 虚拟抢购分类
         $this->groupbuy_vr_classes = $model_groupbuy->getGroupbuyVrClasses();
         Tpl::output('groupbuy_vr_classes', $this->groupbuy_vr_classes);
         // 虚拟抢购城市
         $this->groupbuy_vr_cities = $model_groupbuy->getGroupbuyVrCities();
         Tpl::output('groupbuy_vr_cities', $this->groupbuy_vr_cities);
         Tpl::output('city_name', $this->groupbuy_vr_cities['name'][cookie('city_id')]);
     }
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:31,代码来源:show_groupbuy.php

示例2: consultingOp

 /**
  * 咨询管理
  */
 public function consultingOp()
 {
     $condition = array();
     if (chksubmit()) {
         $member_name = trim($_GET['member_name']);
         if ($member_name != '') {
             $condition['member_name'] = array('like', '%' . $member_name . '%');
             Tpl::output('member_name', $member_name);
         }
         $consult_content = trim($_GET['consult_content']);
         if ($consult_content != '') {
             $condition['consult_content'] = array('like', '%' . $consult_content . '%');
             Tpl::output('consult_content', $consult_content);
         }
         $ctid = intval($_GET['ctid']);
         if ($ctid > 0) {
             $condition['ct_id'] = $ctid;
             Tpl::output('ctid', $ctid);
         }
     }
     $model_consult = Model('consult');
     $consult_list = $model_consult->getConsultList($condition, '*', 0, 10);
     Tpl::output('show_page', $model_consult->showpage());
     Tpl::output('consult_list', $consult_list);
     // 咨询类型
     $consult_type = rkcache('consult_type', true);
     Tpl::output('consult_type', $consult_type);
     Tpl::showpage('consulting.index');
 }
开发者ID:flying3615,项目名称:chuniang,代码行数:32,代码来源:consulting.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     Language::read('stat');
     import('function.statistics');
     import('function.datehelper');
     $model = Model('stat');
     //存储参数
     $this->search_arr = $_REQUEST;
     //处理搜索时间
     if (in_array($_REQUEST['op'], array('hotrank', 'storesales'))) {
         $this->search_arr = $model->dealwithSearchTime($this->search_arr);
         //获得系统年份
         $year_arr = getSystemYearArr();
         //获得系统月份
         $month_arr = getSystemMonthArr();
         //获得本月的周时间段
         $week_arr = getMonthWeekArr($this->search_arr['week']['current_year'], $this->search_arr['week']['current_month']);
         Tpl::output('year_arr', $year_arr);
         Tpl::output('month_arr', $month_arr);
         Tpl::output('week_arr', $week_arr);
     }
     Tpl::output('search_arr', $this->search_arr);
     //店铺分类
     $this->store_class = rkcache('store_class', true);
     Tpl::output('store_class', $this->store_class);
 }
开发者ID:noikiy,项目名称:ejia,代码行数:27,代码来源:stat_store.php

示例4: getOwnShopIds

    /**
     * 获取自营店铺的ID
     *
     * @param boolean $bind_all_gc = false 是否只获取绑定全部类目的自营店 默认否(即全部自营店)
     * @return array
     */
    public function getOwnShopIds($bind_all_gc = false) {

        $data = $this->ownShopIds;

        // 属性为空则取缓存
        if (!$data) {
            $data = rkcache('own_shop_ids');

            // 缓存为空则查库
            if (!$data) {
                $data = array();
                $all_own_shops = $this->table('store')->field('store_id,bind_all_gc')->where(array(
                    'is_own_shop' => 1,
                ))->select();
                foreach ((array) $all_own_shops as $v) {
                    $data[$v['store_id']] = (int) (bool) $v['bind_all_gc'];
                }

                // 写入缓存
                wkcache('own_shop_ids', $data);
            }

            // 写入属性
            $this->ownShopIds = $data;
        }

        return array_keys($bind_all_gc ? array_filter($data) : $data);
    }
开发者ID:noikiy,项目名称:ejia,代码行数:34,代码来源:store.model.php

示例5: send

 public function send($param = array())
 {
     $msg_tpl = rkcache('store_msg_tpl', true);
     if (!isset($msg_tpl[$this->code]) || $this->store_id <= 0) {
         return false;
     }
     $tpl_info = $msg_tpl[$this->code];
     $setting_info = Model('store_msg_setting')->getStoreMsgSettingInfo(array('smt_code' => $this->code, 'store_id' => $this->store_id));
     // 发送站内信
     if ($tpl_info['smt_message_switch'] && ($tpl_info['smt_message_forced'] || $setting_info['sms_message_switch'])) {
         $message = ncReplaceText($tpl_info['smt_message_content'], $param);
         $this->sendMessage($message);
     }
     // 发送短消息
     if ($tpl_info['smt_short_switch'] && $setting_info['sms_short_number'] != '' && ($tpl_info['smt_short_forced'] || $setting_info['sms_short_switch'])) {
         $param['site_name'] = C('site_name');
         $message = ncReplaceText($tpl_info['smt_short_content'], $param);
         $this->sendShort($setting_info['sms_short_number'], $message);
     }
     // 发送邮件
     if ($tpl_info['smt_mail_switch'] && $setting_info['sms_mail_number'] != '' && ($tpl_info['smt_mail_forced'] || $setting_info['sms_mail_switch'])) {
         $param['site_name'] = C('site_name');
         $param['mail_send_time'] = date('Y-m-d H:i:s');
         $subject = ncReplaceText($tpl_info['smt_mail_subject'], $param);
         $message = ncReplaceText($tpl_info['smt_mail_content'], $param);
         $this->sendMail($setting_info['sms_mail_number'], $subject, $message);
     }
 }
开发者ID:1290800466,项目名称:mac_win,代码行数:28,代码来源:sendstoremsg.php

示例6: consult_listOp

    /**
     * 商品咨询列表页
     */
    public function consult_listOp(){
        $consult	= Model('consult');
        $list_consult	= array();
        $where = array();
        if (trim($_GET['type']) == 'to_reply') {
            $where['consult_reply'] = array('eq', '');
        } elseif (trim($_GET['type'] == 'replied')) {
            $where['consult_reply'] = array('neq', '');
        }
        if (intval($_GET['ctid']) > 0) {
            $where['ct_id'] = intval($_GET['ctid']);
        }
        $where['store_id'] = $_SESSION['store_id'];
        $list_consult	= $consult->getConsultList($where,'*', 0, 10);
        Tpl::output('show_page',$consult->showpage());
        Tpl::output('list_consult',$list_consult);

        // 咨询类型
        $consult_type = rkcache('consult_type', true);
        Tpl::output('consult_type', $consult_type);

        $_GET['type']	= empty($_GET['type'])?'consult_list':$_GET['type'];
        self::profile_menu('consult',$_GET['type']);
        Tpl::showpage('store_consult_manage');
    }
开发者ID:noikiy,项目名称:ejia,代码行数:28,代码来源:store_consult.php

示例7: __construct

 /**
  * 构造函数
  */
 public function __construct()
 {
     /**
      * 读取通用、布局的语言包
      */
     Language::read('common');
     Language::read('microshop');
     /**
      * 判断微商城是否关闭
      */
     if (C('microshop_isuse') != '1') {
         header('location: ' . SHOP_SITE_URL);
         die;
     }
     /**
      * 设置布局文件内容
      */
     Tpl::setLayout('microshop_layout');
     /**
      * 转码
      */
     if ($_GET['column'] && strtoupper(CHARSET) == 'GBK') {
         $_GET = Language::getGBK($_GET);
     }
     /**
      * 获取导航
      */
     Tpl::output('nav_list', rkcache('nav', true));
     /**
      * 搜索类型列表
      */
     $search_type = array();
     $search_type['goods'] = Language::get('nc_microshop_goods');
     $search_type['personal'] = Language::get('nc_microshop_personal');
     $search_type['store'] = Language::get('nc_microshop_store');
     //$search_type['album'] = Language::get('nc_microshop_album');
     Tpl::output('search_type', $search_type);
     /**
      * 登录后读取用户头像
      */
     if (!empty($_SESSION['member_id']) && intval($_SESSION['member_id']) > 0) {
         self::get_member_avatar($_SESSION['member_id']);
     }
     /**
      * 系统状态检查
      */
     if (!C('site_status')) {
         halt(C('closed_reason'));
     }
     /**
      * seo
      */
     Tpl::output('html_title', Language::get('nc_microshop') . '-' . C('site_name') . ' ');
     Tpl::output('seo_keywords', C('microshop_seo_keywords'));
     Tpl::output('seo_description', C('microshop_seo_description'));
 }
开发者ID:1290800466,项目名称:mac_win,代码行数:59,代码来源:control.php

示例8: mb_home_listOp

 /**
  * 列表
  */
 public function mb_home_listOp()
 {
     $model = Model('mb_home');
     $h_list = $model->getMbHomeList(array());
     Tpl::output('h_list', $h_list);
     //商品分类
     $goods_class = ($nav = F('goods_class')) ? $nav : rkcache('goods_class', true, 'file');
     Tpl::output('goods_class', $goods_class);
     Tpl::showpage('mb_home.list');
 }
开发者ID:1290800466,项目名称:mac_win,代码行数:13,代码来源:mb_home.php

示例9: get_zt_listOp

 /**
  * 自提物流列表
  */
 public function get_zt_listOp()
 {
     $express_list = rkcache('express', true);
     foreach ($express_list as $k => $v) {
         if ($v['e_zt_state'] == '0') {
             unset($express_list[$k]);
         }
     }
     output_data(array('express_array' => $express_list));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:13,代码来源:seller_express.php

示例10: getExpressListByID

 /**
  * 根据编号查询快递列表
  */
 public function getExpressListByID($id = null)
 {
     $express_list = rkcache('express', true);
     if (!empty($id)) {
         $id_array = explode(',', $id);
         foreach ($express_list as $key => $value) {
             if (!in_array($key, $id_array)) {
                 unset($express_list[$key]);
             }
         }
         return $express_list;
     } else {
         return array();
     }
 }
开发者ID:flying3615,项目名称:chuniang,代码行数:18,代码来源:express.model.php

示例11: parse_conf

 /**
  * get setting
  */
 private static function parse_conf(&$setting_config)
 {
     $nc_config = $GLOBALS['config'];
     if (is_array($nc_config['db']['slave']) && !empty($nc_config['db']['slave'])) {
         $dbslave = $nc_config['db']['slave'];
         $sid = array_rand($dbslave);
         $nc_config['db']['slave'] = $dbslave[$sid];
     } else {
         $nc_config['db']['slave'] = $nc_config['db'][1];
     }
     $nc_config['db']['master'] = $nc_config['db'][1];
     $setting_config = $nc_config;
     $setting = ($setting = rkcache('setting')) ? $setting : rkcache('setting', true);
     //$setting['hao_version'] = 'Copyright 2015 <a href="http://shopnc.club" target="_blank">shopnc.club</a> All rights reserved.<br />本演示来源于<a href="http://shopnc.club" target="_blank">shopnc.club</a>';
     $setting_config = array_merge_recursive($setting, $nc_config);
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:19,代码来源:base.php

示例12: parse_conf

 /**
  * get setting
  */
 private static function parse_conf(&$setting_config)
 {
     $nc_config = $GLOBALS['config'];
     if (is_array($nc_config['db']['slave']) && !empty($nc_config['db']['slave'])) {
         $dbslave = $nc_config['db']['slave'];
         $sid = array_rand($dbslave);
         $nc_config['db']['slave'] = $dbslave[$sid];
     } else {
         $nc_config['db']['slave'] = $nc_config['db'][1];
     }
     $nc_config['db']['master'] = $nc_config['db'][1];
     $setting_config = $nc_config;
     $setting = ($setting = rkcache('setting')) ? $setting : rkcache('setting', true);
     $setting['shopnc_version'] = 'Copyright 2015</a>';
     $setting_config = array_merge_recursive($setting, $nc_config);
 }
开发者ID:flying3615,项目名称:chuniang,代码行数:19,代码来源:base.php

示例13: parse_conf

	/**
	 * get setting
	 */
	private static function parse_conf(&$setting_config){
		$nc_config = $GLOBALS['config'];
		if(is_array($nc_config['db']['slave']) && !empty($nc_config['db']['slave'])){
			$dbslave = $nc_config['db']['slave'];
			$sid     = array_rand($dbslave);
			$nc_config['db']['slave'] = $dbslave[$sid];
		}else{
			$nc_config['db']['slave'] = $nc_config['db'][1];
		}
		$nc_config['db']['master'] = $nc_config['db'][1];
		$setting_config = $nc_config;
		$setting = ($setting = rkcache('setting')) ? $setting : rkcache('setting',true);
		$setting['shopnc_version'] = 'Copyright 2007-2015 All rights reserved.<br /><a href="javascript:;"><img src="/data/upload/shop/adv/img1.jpg"></a><a href="javascript:;"><img src="/data/upload/shop/adv/img2.jpg"></a><a href="javascript:;"><img src="/data/upload/shop/adv/img3.jpg"></a><a href="javascript:;"><img src="/data/upload/shop/adv/img4.jpg"></a>
';
		$setting_config = array_merge_recursive($setting,$nc_config);
	}
开发者ID:noikiy,项目名称:ejia,代码行数:19,代码来源:base.php

示例14: __construct

 /**
  * 构造函数
  */
 public function __construct(){
     /**
      * 读取通用、布局的语言包
      */
     Language::read('common');
     /**
      * 设置布局文件内容
      */
     Tpl::setLayout('delivery_layout');
     /**
      * SEO
      */
     $this->SEO();
     /**
      * 获取导航
      */
     Tpl::output('nav_list', rkcache('nav',true));
 }
开发者ID:noikiy,项目名称:ejia,代码行数:21,代码来源:control.php

示例15: tableInfo

 /**
  * 生成表结构信息
  *
  * @param string $table
  * @return
  */
 public function tableInfo($table)
 {
     if (empty($table)) {
         return false;
     }
     //只取主键,find(2)等自动匹配主键时使用
     if (C('cache_open')) {
         $this->fields = rkcache('field/_pk', __CLASS__ . '::fetchTablePkArray');
     } else {
         if (file_exists(BASE_DATA_PATH . '/cache/fields/_pk.php')) {
             $this->fields = (require BASE_DATA_PATH . '/cache/fields/_pk.php');
         } else {
             $_pk_array = self::fetchTablePkArray();
             F('_pk', $_pk_array, 'cache/fields');
             $this->fields = $_pk_array;
         }
     }
     return $this->fields[$table];
 }
开发者ID:ff00x0,项目名称:shopnc,代码行数:25,代码来源:model.php


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