本文整理汇总了PHP中uk86_rkcache函数的典型用法代码示例。如果您正苦于以下问题:PHP uk86_rkcache函数的具体用法?PHP uk86_rkcache怎么用?PHP uk86_rkcache使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uk86_rkcache函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: consultingOp
/**
* 咨询管理
*/
public function consultingOp()
{
$condition = array();
if (uk86_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 = uk86_rkcache('consult_type', true);
Tpl::output('consult_type', $consult_type);
Tpl::showpage('consulting.index');
}
示例2: __construct
public function __construct()
{
parent::__construct();
Uk86Language::uk86_read('stat');
uk86_import('function.statistics');
uk86_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 = uk86_getSystemYearArr();
//获得系统月份
$month_arr = uk86_getSystemMonthArr();
//获得本月的周时间段
$week_arr = uk86_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 = uk86_rkcache('store_class', true);
Tpl::output('store_class', $this->store_class);
}
示例3: __construct
public function __construct()
{
parent::__construct();
//读取语言包
Uk86Language::uk86_read('member_groupbuy,home_cart_index');
//检查抢购功能是否开启
if (intval(C('groupbuy_allow')) !== 1) {
uk86_showMessage(Uk86Language::uk86_get('groupbuy_unavailable'), uk86_urlShop(), '', 'error');
}
//分类导航
$nav_link = array(0 => array('title' => Uk86Language::uk86_get('homepage'), 'link' => SHOP_SITE_URL), 1 => array('title' => Uk86Language::uk86_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 = uk86_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'][uk86_cookie('city_id')]);
}
}
示例4: uk86_send
public function uk86_send($param = array())
{
$msg_tpl = uk86_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 = uk86_ncReplaceText($tpl_info['smt_message_content'], $param);
$this->uk86_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 = uk86_ncReplaceText($tpl_info['smt_short_content'], $param);
$this->uk86_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 = uk86_ncReplaceText($tpl_info['smt_mail_subject'], $param);
$message = uk86_ncReplaceText($tpl_info['smt_mail_content'], $param);
$this->uk86_sendMail($setting_info['sms_mail_number'], $subject, $message);
}
}
示例5: getExpressListByID
/**
* 根据编号查询快递列表
*/
public function getExpressListByID($id = null)
{
$express_list = uk86_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();
}
}
示例6: uk86_parse_conf
/**
* get setting
*/
private static function uk86_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 = uk86_rkcache('setting')) ? $setting : uk86_rkcache('setting', true);
$setting['uk86_version'] = 'Copyright 2015 优康商城版权所有';
$setting_config = array_merge_recursive($setting, $nc_config);
}
示例7: __construct
/**
* 构造函数
*/
public function __construct()
{
/**
* 读取通用、布局的语言包
*/
Uk86Language::uk86_read('common');
/**
* 设置布局文件内容
*/
Tpl::setLayout('delivery_layout');
/**
* SEO
*/
$this->SEO();
/**
* 获取导航
*/
Tpl::output('nav_list', uk86_rkcache('nav', true));
}
示例8: tableInfo
/**
* 生成表结构信息
*
* @param string $table
* @return
*/
public function tableInfo($table)
{
if (empty($table)) {
return false;
}
//只取主键,find(2)等自动匹配主键时使用
if (C('cache_open')) {
$this->fields = uk86_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];
}
示例9: uk86_send
public function uk86_send($param = array())
{
$msg_tpl = uk86_rkcache('member_msg_tpl', true);
if (!isset($msg_tpl[$this->code]) || $this->member_id <= 0) {
return false;
}
$tpl_info = $msg_tpl[$this->code];
$setting_info = Model('member_msg_setting')->getMemberMsgSettingInfo(array('mmt_code' => $this->code, 'member_id' => $this->member_id), 'is_receive');
if (empty($setting_info) || $setting_info['is_receive']) {
// 发送站内信
if ($tpl_info['mmt_message_switch']) {
$message = uk86_ncReplaceText($tpl_info['mmt_message_content'], $param);
$this->uk86_sendMessage($message);
}
// 发送短消息
if ($tpl_info['mmt_short_switch']) {
$this->uk86_getMemberInfo();
if (!empty($this->mobile)) {
$this->member_info['member_mobile'] = $this->mobile;
}
if ($this->member_info['member_mobile_bind'] && !empty($this->member_info['member_mobile'])) {
$param['site_name'] = C('site_name');
$message = uk86_ncReplaceText($tpl_info['mmt_short_content'], $param);
$this->uk86_sendShort($this->member_info['member_mobile'], $message);
}
}
// 发送邮件
if ($tpl_info['mmt_mail_switch']) {
$this->uk86_getMemberInfo();
if (!empty($this->email)) {
$this->member_info['member_email'] = $this->email;
}
if ($this->member_info['member_email_bind'] && !empty($this->member_info['member_email'])) {
$param['site_name'] = C('site_name');
$param['mail_send_time'] = date('Y-m-d H:i:s');
$subject = uk86_ncReplaceText($tpl_info['mmt_mail_subject'], $param);
$message = uk86_ncReplaceText($tpl_info['mmt_mail_content'], $param);
$this->uk86_sendMail($this->member_info['member_email'], $subject, $message);
}
}
}
}
示例10: getOwnShopIds
/**
* 获取自营店铺的ID
*
* @param boolean $bind_all_gc = false 是否只获取绑定全部类目的自营店 默认否(即全部自营店)
* @return array
*/
public function getOwnShopIds($bind_all_gc = false)
{
$data = $this->ownShopIds;
// 属性为空则取缓存
if (!$data) {
$data = uk86_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'];
}
// 写入缓存
uk86_wkcache('own_shop_ids', $data);
}
// 写入属性
$this->ownShopIds = $data;
}
return array_keys($bind_all_gc ? array_filter($data) : $data);
}
示例11: 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 = uk86_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');
}
示例12: viewOp
/**
* 退货记录查看页
*
*/
public function viewOp()
{
$model_refund = Model('refund_return');
$condition = array();
$condition['buyer_id'] = $_SESSION['member_id'];
$condition['refund_id'] = intval($_GET['return_id']);
$return_list = $model_refund->getReturnList($condition);
$return = $return_list[0];
Tpl::output('return', $return);
$express_list = uk86_rkcache('express', true);
if ($return['express_id'] > 0 && !empty($return['invoice_no'])) {
Tpl::output('return_e_name', $express_list[$return['express_id']]['e_name']);
}
$info['buyer'] = array();
if (!empty($return['pic_info'])) {
$info = unserialize($return['pic_info']);
}
Tpl::output('pic_list', $info['buyer']);
$condition = array();
$condition['order_id'] = $return['order_id'];
$model_refund->getRightOrderList($condition, $return['order_goods_id']);
Tpl::showpage('member_return_view');
}
示例13: level_intrOp
/**
* Level introduction
*/
public function level_intrOp()
{
// 圈子信息
$this->circleInfo();
// 圈主和管理信息
$this->manageList();
// 会员信息
$this->memberInfo();
// breadcrumb navigation
$this->breadcrumd(L('level_introduction'));
// member level
$ml_info = Model()->table('circle_ml')->find($this->c_id);
$mld_array = uk86_rkcache('circle_level') ? uk86_rkcache('circle_level') : uk86_rkcache('circle_level', true);
if (empty($ml_info)) {
$ml_info['ml_1'] = $mld_array['1']['mld_name'];
$ml_info['ml_2'] = $mld_array['2']['mld_name'];
$ml_info['ml_3'] = $mld_array['3']['mld_name'];
$ml_info['ml_4'] = $mld_array['4']['mld_name'];
$ml_info['ml_5'] = $mld_array['5']['mld_name'];
$ml_info['ml_6'] = $mld_array['6']['mld_name'];
$ml_info['ml_7'] = $mld_array['7']['mld_name'];
$ml_info['ml_8'] = $mld_array['8']['mld_name'];
$ml_info['ml_9'] = $mld_array['9']['mld_name'];
$ml_info['ml_10'] = $mld_array['10']['mld_name'];
$ml_info['ml_11'] = $mld_array['11']['mld_name'];
$ml_info['ml_12'] = $mld_array['12']['mld_name'];
$ml_info['ml_13'] = $mld_array['13']['mld_name'];
$ml_info['ml_14'] = $mld_array['14']['mld_name'];
$ml_info['ml_15'] = $mld_array['15']['mld_name'];
$ml_info['ml_16'] = $mld_array['16']['mld_name'];
}
Tpl::output('ml_info', $ml_info);
Tpl::output('mld_array', $mld_array);
Tpl::showpage('group.level');
}
示例14: getRightOrderList
/**
* 详细页右侧订单信息
*
* @param
* @return array
*/
public function getRightOrderList($order_condition, $order_goods_id = 0)
{
$model_order = Model('order');
$order_info = $model_order->getOrderInfo($order_condition, array('order_common', 'store'));
Tpl::output('order', $order_info);
$order_id = $order_info['order_id'];
$store = $order_info['extend_store'];
Tpl::output('store', $store);
$order_common = $order_info['extend_order_common'];
Tpl::output('order_common', $order_common);
if ($order_common['shipping_express_id'] > 0) {
$express = uk86_rkcache('express', true);
Tpl::output('e_code', $express[$order_common['shipping_express_id']]['e_code']);
Tpl::output('e_name', $express[$order_common['shipping_express_id']]['e_name']);
}
$condition = array();
$condition['order_id'] = $order_id;
if ($order_goods_id > 0) {
$condition['rec_id'] = $order_goods_id;
//订单商品表编号
}
$goods_list = $model_order->getOrderGoodsList($condition);
Tpl::output('goods_list', $goods_list);
$order_info['goods_list'] = $goods_list;
return $order_info;
}
示例15: levelOp
/**
* circle member level
*/
public function levelOp()
{
// Circle information
$this->circleInfo();
// Membership information
$this->circleMemberInfo();
// Members to join the circle list
$this->memberJoinCircle();
if (uk86_chksubmit()) {
$insert = array();
$insert['circle_id'] = $this->c_id;
$mld_array = uk86_rkcache('circle_level') ? uk86_rkcache('circle_level') : uk86_rkcache('circle_level', true);
if ($_POST['levelset'] == 'custom') {
$insert['mlref_id'] = null;
$insert['ml_1'] = $_POST['levelname']['1'] != '' ? $_POST['levelname']['1'] : $mld_array['1']['mld_name'];
$insert['ml_2'] = $_POST['levelname']['2'] != '' ? $_POST['levelname']['2'] : $mld_array['2']['mld_name'];
$insert['ml_3'] = $_POST['levelname']['3'] != '' ? $_POST['levelname']['3'] : $mld_array['3']['mld_name'];
$insert['ml_4'] = $_POST['levelname']['4'] != '' ? $_POST['levelname']['4'] : $mld_array['4']['mld_name'];
$insert['ml_5'] = $_POST['levelname']['5'] != '' ? $_POST['levelname']['5'] : $mld_array['5']['mld_name'];
$insert['ml_6'] = $_POST['levelname']['6'] != '' ? $_POST['levelname']['6'] : $mld_array['6']['mld_name'];
$insert['ml_7'] = $_POST['levelname']['7'] != '' ? $_POST['levelname']['7'] : $mld_array['7']['mld_name'];
$insert['ml_8'] = $_POST['levelname']['8'] != '' ? $_POST['levelname']['8'] : $mld_array['8']['mld_name'];
$insert['ml_9'] = $_POST['levelname']['9'] != '' ? $_POST['levelname']['9'] : $mld_array['9']['mld_name'];
$insert['ml_10'] = $_POST['levelname']['10'] != '' ? $_POST['levelname']['10'] : $mld_array['10']['mld_name'];
$insert['ml_11'] = $_POST['levelname']['11'] != '' ? $_POST['levelname']['11'] : $mld_array['11']['mld_name'];
$insert['ml_12'] = $_POST['levelname']['12'] != '' ? $_POST['levelname']['12'] : $mld_array['12']['mld_name'];
$insert['ml_13'] = $_POST['levelname']['13'] != '' ? $_POST['levelname']['13'] : $mld_array['13']['mld_name'];
$insert['ml_14'] = $_POST['levelname']['14'] != '' ? $_POST['levelname']['14'] : $mld_array['14']['mld_name'];
$insert['ml_15'] = $_POST['levelname']['15'] != '' ? $_POST['levelname']['15'] : $mld_array['15']['mld_name'];
$insert['ml_16'] = $_POST['levelname']['16'] != '' ? $_POST['levelname']['16'] : $mld_array['16']['mld_name'];
} else {
$levelset = intval($_POST['levelset']);
if ($levelset) {
$mlref_info = Model()->table('circle_mlref')->find($levelset);
}
if (!empty($mlref_info)) {
$insert['mlref_id'] = $mlref_info['mlref_id'];
$insert['ml_1'] = $mlref_info['mlref_1'];
$insert['ml_2'] = $mlref_info['mlref_2'];
$insert['ml_3'] = $mlref_info['mlref_3'];
$insert['ml_4'] = $mlref_info['mlref_4'];
$insert['ml_5'] = $mlref_info['mlref_5'];
$insert['ml_6'] = $mlref_info['mlref_6'];
$insert['ml_7'] = $mlref_info['mlref_7'];
$insert['ml_8'] = $mlref_info['mlref_8'];
$insert['ml_9'] = $mlref_info['mlref_9'];
$insert['ml_10'] = $mlref_info['mlref_10'];
$insert['ml_11'] = $mlref_info['mlref_11'];
$insert['ml_12'] = $mlref_info['mlref_12'];
$insert['ml_13'] = $mlref_info['mlref_13'];
$insert['ml_14'] = $mlref_info['mlref_14'];
$insert['ml_15'] = $mlref_info['mlref_15'];
$insert['ml_16'] = $mlref_info['mlref_16'];
} else {
$insert['mlref_id'] = 0;
$insert['ml_1'] = $mld_array['1']['mld_name'];
$insert['ml_2'] = $mld_array['2']['mld_name'];
$insert['ml_3'] = $mld_array['3']['mld_name'];
$insert['ml_4'] = $mld_array['4']['mld_name'];
$insert['ml_5'] = $mld_array['5']['mld_name'];
$insert['ml_6'] = $mld_array['6']['mld_name'];
$insert['ml_7'] = $mld_array['7']['mld_name'];
$insert['ml_8'] = $mld_array['8']['mld_name'];
$insert['ml_9'] = $mld_array['9']['mld_name'];
$insert['ml_10'] = $mld_array['10']['mld_name'];
$insert['ml_11'] = $mld_array['11']['mld_name'];
$insert['ml_12'] = $mld_array['12']['mld_name'];
$insert['ml_13'] = $mld_array['13']['mld_name'];
$insert['ml_14'] = $mld_array['14']['mld_name'];
$insert['ml_15'] = $mld_array['15']['mld_name'];
$insert['ml_16'] = $mld_array['16']['mld_name'];
}
}
$rs = Model('circle_level')->levelInsert($insert, true);
showDialog(L('nc_common_op_succ'), 'reload', 'succ');
}
$model = Model();
// Defaule Member Title list
$mldefault_list = uk86_rkcache('circle_level') ? uk86_rkcache('circle_level') : uk86_rkcache('circle_level', true);
if (!empty($mldefault_list)) {
$mld_array = array();
foreach ($mldefault_list as $val) {
$mld_array[$val['mld_id']]['name'] = $val['mld_name'];
$mld_array[$val['mld_id']]['exp'] = $val['mld_exp'];
}
// Refer to the Member Title list
$mlref_list = $model->table('circle_mlref')->where(array('mlref_status' => 1))->select();
// tidy
if (!empty($mlref_list)) {
$mlr_array = array();
foreach ($mlref_list as $val) {
$mlr_array[$val['mlref_id']]['name'] = $val['mlref_name'];
$mlr_array[$val['mlref_id']]['info'][1]['name'] = $val['mlref_1'];
$mlr_array[$val['mlref_id']]['info'][2]['name'] = $val['mlref_2'];
$mlr_array[$val['mlref_id']]['info'][3]['name'] = $val['mlref_3'];
$mlr_array[$val['mlref_id']]['info'][4]['name'] = $val['mlref_4'];
$mlr_array[$val['mlref_id']]['info'][5]['name'] = $val['mlref_5'];
//.........这里部分代码省略.........