コード例 #1
1
ファイル: common.php プロジェクト: wangjiang988/ukshop
 /**
  * 图片裁剪
  *
  */
 public function pic_cutOp()
 {
     Uk86Language::uk86_read('admin_common');
     $lang = Uk86Language::uk86_getLangContent();
     uk86_import('function.thumb');
     if (uk86_chksubmit()) {
         $thumb_width = $_POST['x'];
         $x1 = $_POST["x1"];
         $y1 = $_POST["y1"];
         $x2 = $_POST["x2"];
         $y2 = $_POST["y2"];
         $w = $_POST["w"];
         $h = $_POST["h"];
         $scale = $thumb_width / $w;
         $src = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['url']);
         if (strpos($src, '..') !== false || strpos($src, BASE_UPLOAD_PATH) !== 0) {
             exit;
         }
         if (!empty($_POST['filename'])) {
             // 				$save_file2 = BASE_UPLOAD_PATH.'/'.$_POST['filename'];
             $save_file2 = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['filename']);
         } else {
             $save_file2 = str_replace('_small.', '_sm.', $src);
         }
         $cropped = uk86_resize_thumb($save_file2, $src, $w, $h, $x1, $y1, $scale);
         @unlink($src);
         $pathinfo = pathinfo($save_file2);
         exit($pathinfo['basename']);
     }
     $save_file = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_GET['url']);
     $_GET['resize'] = $_GET['resize'] == '0' ? '0' : '1';
     Tpl::output('height', uk86_get_height($save_file));
     Tpl::output('width', uk86_get_width($save_file));
     Tpl::showpage('common.pic_cut', 'null_layout');
 }
コード例 #2
0
 /**
  * 分享接口数组
  */
 public function getApps()
 {
     $app_arr = array();
     $app_arr['qqweibo'] = array('name' => Uk86Language::uk86_get('nc_shareset_qqweibo'), 'url' => "http://t.qq.com", 'applyurl' => 'http://dev.t.qq.com');
     $app_arr['sinaweibo'] = array('name' => Uk86Language::uk86_get('nc_shareset_sinaweibo'), 'url' => "http://www.weibo.com", 'applyurl' => 'http://open.weibo.com/developers');
     return $app_arr;
 }
コード例 #3
0
ファイル: stat_trade.php プロジェクト: wangjiang988/ukshop
 public function __construct()
 {
     parent::__construct();
     Uk86Language::uk86_read('stat');
     uk86_import('function.statistics');
     uk86_import('function.datehelper');
 }
コード例 #4
0
ファイル: share.php プロジェクト: wangjiang988/ukshop
 /**
  * 分享保存
  **/
 public function share_saveOp()
 {
     $data = array();
     $data['result'] = 'true';
     $share_id = intval($_POST['share_id']);
     $share_type = $_GET['type'];
     if ($share_id <= 0 || empty($share_type) || mb_strlen($_POST['commend_message']) > 140) {
         showDialog(Uk86Language::uk86_get('wrong_argument'), 'reload', 'fail', '');
     }
     if (!empty($_SESSION['member_id'])) {
         $model = Model('cms_' . $share_type);
         $model->modify(array($share_type . '_share_count' => array('exp', $share_type . '_share_count+1')), array($share_type . '_id' => $share_id));
         //分享内容
         if (isset($_POST['share_app_items'])) {
             $info['commend_message'] = $_POST['commend_message'];
             $info['share_title'] = $_POST['share_title'];
             $info['share_image'] = $_POST['share_image'];
             if (empty($info['commend_message'])) {
                 $info['commend_message'] = Uk86Language::uk86_get('share_text');
             }
             $info['url'] = CMS_SITE_URL . DS . "index.php?act={$_GET['type']}&op={$_GET['type']}_detail&{$_GET['type']}_id=" . $_POST['share_id'];
             self::share_app_publish($info);
         }
         showDialog(Uk86Language::uk86_get('nc_common_save_succ'), '', 'succ', '');
     } else {
         showDialog(Uk86Language::uk86_get('no_login'), 'reload', 'fail', '');
     }
 }
コード例 #5
0
ファイル: index.php プロジェクト: wangjiang988/ukshop
 /**
  * 修改密码
  */
 public function modifypwOp()
 {
     if (uk86_chksubmit()) {
         if (trim($_POST['new_pw']) !== trim($_POST['new_pw2'])) {
             //uk86_showMessage('两次输入的密码不一致,请重新输入');
             uk86_showMessage(Uk86Language::uk86_get('index_modifypw_repeat_error'));
         }
         $admininfo = $this->getAdminInfo();
         //查询管理员信息
         $admin_model = Model('admin');
         $admininfo = $admin_model->getOneAdmin($admininfo['id']);
         if (!is_array($admininfo) || count($admininfo) <= 0) {
             uk86_showMessage(Uk86Language::uk86_get('index_modifypw_admin_error'));
         }
         //旧密码是否正确
         if ($admininfo['admin_password'] != md5(trim($_POST['old_pw']))) {
             uk86_showMessage(Uk86Language::uk86_get('index_modifypw_oldpw_error'));
         }
         $new_pw = md5(trim($_POST['new_pw']));
         $result = $admin_model->updateAdmin(array('admin_password' => $new_pw, 'admin_id' => $admininfo['admin_id']));
         if ($result) {
             uk86_showMessage(Uk86Language::uk86_get('index_modifypw_success'));
         } else {
             uk86_showMessage(Uk86Language::uk86_get('index_modifypw_fail'));
         }
     } else {
         Uk86Language::uk86_read('admin');
         Tpl::showpage('admin.modifypw');
     }
 }
コード例 #6
0
 /**
  * 用户中心右边,小导航
  *
  * @param string	$menu_type	导航类型
  * @param string 	$menu_key	当前导航的menu_key
  * @return
  */
 private function profile_menu($menu_key = '')
 {
     Uk86Language::uk86_read('member_layout');
     $menu_array = array(1 => array('menu_key' => 'store_printsetup', 'menu_name' => '打印设置', 'menu_url' => 'index.php?act=store_printsetup&op=index'));
     Tpl::output('member_menu', $menu_array);
     Tpl::output('menu_key', $menu_key);
 }
コード例 #7
0
ファイル: stat_store.php プロジェクト: wangjiang988/ukshop
 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);
 }
コード例 #8
0
ファイル: payment.php プロジェクト: wangjiang988/ukshop
 /**
  * 编辑
  */
 public function editOp()
 {
     $model_payment = Model('payment');
     if (uk86_chksubmit()) {
         $payment_id = intval($_POST["payment_id"]);
         $data = array();
         $data['payment_state'] = intval($_POST["payment_state"]);
         $payment_config = '';
         $config_array = explode(',', $_POST["config_name"]);
         //配置参数
         if (is_array($config_array) && !empty($config_array)) {
             $config_info = array();
             foreach ($config_array as $k) {
                 $config_info[$k] = trim($_POST[$k]);
             }
             $payment_config = serialize($config_info);
         }
         $data['payment_config'] = $payment_config;
         //支付接口配置信息
         $model_payment->editPayment($data, array('payment_id' => $payment_id));
         uk86_showMessage(Uk86Language::uk86_get('nc_common_save_succ'), 'index.php?act=payment&op=index');
     }
     $payment_id = intval($_GET["payment_id"]);
     $payment = $model_payment->getPaymentInfo(array('payment_id' => $payment_id));
     if ($payment['payment_config'] != '') {
         Tpl::output('config_array', unserialize($payment['payment_config']));
     }
     Tpl::output('payment', $payment);
     Tpl::showpage('payment.edit');
 }
コード例 #9
0
ファイル: personal.php プロジェクト: wangjiang988/ukshop
 public function detailOp()
 {
     $personal_id = intval($_GET['personal_id']);
     if ($personal_id <= 0) {
         header('location: ' . MICROSHOP_SITE_URL);
         die;
     }
     $model_personal = Model('micro_personal');
     $condition = array();
     $condition['personal_id'] = $personal_id;
     $detail = $model_personal->getOneWithUserInfo($condition);
     if (empty($detail)) {
         header('location: ' . MICROSHOP_SITE_URL);
         die;
     }
     //点击数加1
     $update = array();
     $update['click_count'] = array('exp', 'click_count+1');
     $model_personal->modify($update, $condition);
     Tpl::output('detail', $detail);
     //侧栏
     self::get_sidebar_list($detail['commend_member_id']);
     //获得分享app列表
     self::get_share_app_list();
     Tpl::output('comment_id', $detail['personal_id']);
     Tpl::output('comment_type', 'personal');
     Tpl::output('html_title', $detail['commend_message'] . '-' . Uk86Language::uk86_get('nc_microshop_personal') . '-' . Uk86Language::uk86_get('nc_microshop') . '-' . C('site_name'));
     Tpl::showpage('personal_detail');
 }
コード例 #10
0
ファイル: share.php プロジェクト: wangjiang988/ukshop
 /**
  * 分享保存
  **/
 public function share_saveOp()
 {
     $data = array();
     $data['result'] = 'true';
     $share_id = intval($_POST['share_id']);
     $share_type = self::get_channel_type($_GET['type']);
     if ($share_id <= 0 || empty($share_type) || mb_strlen($_POST['commend_message']) > 140) {
         showDialog(Uk86Language::uk86_get('wrong_argument'), 'reload', 'fail', '');
     }
     if (!empty($_SESSION['member_id'])) {
         $model = Model("micro_{$_GET['type']}");
         //分享内容
         if (isset($_POST['share_app_items'])) {
             $condition = array();
             $condition[$share_type['type_key']] = $_POST['share_id'];
             if ($_GET['type'] == 'store') {
                 $info = $model->getOneWithStoreInfo($condition);
             } else {
                 $info = $model->getOne($condition);
             }
             $info['commend_message'] = $_POST['commend_message'];
             if (empty($info['commend_message'])) {
                 $info['commend_message'] = Uk86Language::uk86_get('microshop_share_default_message');
             }
             $info['type'] = $_GET['type'];
             $info['url'] = MICROSHOP_SITE_URL . DS . "index.php?act={$_GET['type']}&op=detail&{$_GET['type']}_id=" . $_POST['share_id'];
             self::share_app_publish('share', $info);
         }
         showDialog(Uk86Language::uk86_get('nc_common_save_succ'), '', 'succ', '');
     } else {
         showDialog(Uk86Language::uk86_get('no_login'), 'reload', 'fail', '');
     }
 }
コード例 #11
0
ファイル: activity.php プロジェクト: wangjiang988/ukshop
 /**
  * 单个活动信息页
  */
 public function indexOp()
 {
     //读取语言包
     Uk86Language::uk86_read('home_activity_index');
     //得到导航ID
     $nav_id = intval($_GET['nav_id']) ? intval($_GET['nav_id']) : 0;
     Tpl::output('index_sign', $nav_id);
     //查询活动信息
     $activity_id = intval($_GET['activity_id']);
     if ($activity_id <= 0) {
         uk86_showMessage(Uk86Language::uk86_get('para_error'), 'index.php', 'html', 'error');
         //'缺少参数:活动编号'
     }
     $activity = Model('activity')->getOneById($activity_id);
     if (empty($activity) || $activity['activity_type'] != '1' || $activity['activity_state'] != 1 || $activity['activity_start_date'] > time() || $activity['activity_end_date'] < time()) {
         uk86_showMessage(Uk86Language::uk86_get('activity_index_activity_not_exists'), 'index.php', 'html', 'error');
         //'指定活动并不存在'
     }
     Tpl::output('activity', $activity);
     //查询活动内容信息
     $list = array();
     $list = Model('activity_detail')->getGoodsList(array('order' => 'activity_detail.activity_detail_sort asc', 'activity_id' => "{$activity_id}", 'goods_show' => '1', 'activity_detail_state' => '1'));
     Tpl::output('list', $list);
     Tpl::output('html_title', C('site_name') . ' - ' . $activity['activity_title']);
     Tpl::showpage('activity_show');
 }
コード例 #12
0
 /**
  * 平台确认退款处理
  *
  * @param
  * @return bool
  */
 public function editOrderRefundExtension($refund)
 {
     $refund_id = intval($refund['refund_id']);
     if ($refund_id > 0) {
         Uk86Language::uk86_read('model_lang_index');
         $order_id = $refund['order_id'];
         //订单编号
         $field = 'trade_no,order_id,buyer_id,buyer_name,store_id,order_sn,order_amount,payment_code,order_state,refund_amount';
         $model_order = Model('order');
         $order = $model_order->getOrderInfo(array('order_id' => $order_id), array(), $field);
         try {
             $this->beginTransaction();
             $order_amount = $order['order_amount'];
             //订单金额
             //$predeposit_amount = $order_amount-$order['refund_amount'];//可退金额
             //if ($predeposit_amount) {
             $log_array = array();
             $log_array['member_id'] = $order['buyer_id'];
             $log_array['member_name'] = $order['buyer_name'];
             $log_array['order_sn'] = $order['order_sn'];
             $log_array['amount'] = $refund['refund_amount'];
             $refund['trade_no'] = $order['trade_no'];
             if ($predeposit_amount > 0) {
                 $log_array['amount'] = $refund['refund_amount'] - $predeposit_amount;
             }
             $state = $this->changePa("refund", $log_array, $refund);
             //增加买家支付账户金额
             //}
             $order_state = $order['order_state'];
             $model_trade = Model('trade');
             $order_paid = $model_trade->getOrderState('order_paid');
             //订单状态20:已付款
             if ($state && $order_state == $order_paid) {
                 uk86_Logic('order')->changeOrderStateCancel($order, 'system', '系统', '商品全部退款完成取消订单', false);
             }
             if ($state) {
                 $order_array = array();
                 $order_amount = $order['order_amount'];
                 //订单金额
                 $refund_amount = $order['refund_amount'] + $refund['refund_amount'];
                 //退款金额
                 $order_array['refund_state'] = $order_amount - $refund_amount > 0 ? 1 : 2;
                 $order_array['refund_amount'] = uk86_ncPriceFormat($refund_amount);
                 $order_array['delay_time'] = time();
                 $state = $model_order->editOrder($order_array, array('order_id' => $order_id));
                 //更新订单退款
             }
             if ($state && $refund['order_lock'] == '2') {
                 $state = $this->editOrderUnlock($order_id);
                 //订单解锁
             }
             $this->commit();
             return $state;
         } catch (Exception $e) {
             $this->rollback();
             return false;
         }
     }
     return false;
 }
コード例 #13
0
ファイル: stat_goods.php プロジェクト: wangjiang988/ukshop
 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($this->search_arr['op'], array('pricerange', 'hotgoods', 'goods_sale'))) {
         $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->choose_gcid = ($t = intval($_REQUEST['choose_gcid'])) > 0 ? $t : 0;
     $gccache_arr = Model('goods_class')->getGoodsclassCache($this->choose_gcid, 3);
     $this->gc_arr = $gccache_arr['showclass'];
     Tpl::output('gc_json', json_encode($gccache_arr['showclass']));
     Tpl::output('gc_choose_json', json_encode($gccache_arr['choose_gcid']));
 }
コード例 #14
0
ファイル: show_joinin.php プロジェクト: wangjiang988/ukshop
 /**
  * 店铺开店页
  *
  */
 public function indexOp()
 {
     Uk86Language::uk86_read("home_login_index");
     $code_info = C('store_joinin_pic');
     $info['pic'] = array();
     if (!empty($code_info)) {
         $info = unserialize($code_info);
     }
     Tpl::output('pic_list', $info['pic']);
     //首页图片
     Tpl::output('show_txt', $info['show_txt']);
     //贴心提示
     $model_help = Model('help');
     $condition['type_id'] = '1';
     //入驻指南
     $help_list = $model_help->getHelpList($condition, '', 4);
     //显示4个
     Tpl::output('help_list', $help_list);
     Tpl::output('article_list', '');
     //底部不显示文章分类
     Tpl::output('show_sign', 'joinin');
     Tpl::output('html_title', C('site_name') . ' - ' . '商家入驻');
     Tpl::setLayout('store_joinin_layout');
     Tpl::showpage('store_joinin');
 }
コード例 #15
0
ファイル: store.php プロジェクト: wangjiang988/ukshop
 /**
  * 店铺详细页
  */
 public function detailOp()
 {
     $store_id = intval($_GET['store_id']);
     if ($store_id <= 0) {
         header('location: ' . MICROSHOP_SITE_URL);
         die;
     }
     $model_store = Model('store');
     $model_goods = Model('goods');
     $model_microshop_store = Model('micro_store');
     $store_info = $model_microshop_store->getOneWithStoreInfo(array('microshop_store_id' => $store_id));
     if (empty($store_info)) {
         header('location: ' . MICROSHOP_SITE_URL);
     }
     //点击数加1
     $update = array();
     $update['click_count'] = array('exp', 'click_count+1');
     $model_microshop_store->modify($update, array('microshop_store_id' => $store_id));
     Tpl::output('detail', $store_info);
     $condition = array();
     $condition['store_id'] = $store_info['shop_store_id'];
     $goods_list = $model_goods->getGoodsListByColorDistinct($condition, 'goods_id,store_id,goods_name,goods_image,goods_price,goods_salenum', 'goods_id asc', 39);
     Tpl::output('comment_type', 'store');
     Tpl::output('comment_id', $store_id);
     Tpl::output('list', $goods_list);
     Tpl::output('show_page', $model_goods->showpage());
     //获得分享app列表
     self::get_share_app_list();
     Tpl::output('html_title', $store_info['store_name'] . '-' . Uk86Language::uk86_get('nc_microshop_store') . '-' . Uk86Language::uk86_get('nc_microshop') . '-' . C('site_name'));
     Tpl::showpage('store_detail');
 }
コード例 #16
0
ファイル: sns_setting.php プロジェクト: wangjiang988/ukshop
 public function __construct()
 {
     parent::__construct();
     /**
      * 读取语言包
      */
     Uk86Language::uk86_read('sns_setting');
 }
コード例 #17
0
ファイル: flea_album.php プロジェクト: wangjiang988/ukshop
 /**
  *	验证是否开启闲置功能
  */
 public function __construct()
 {
     parent::__construct();
     /**
      * 读取语言包
      */
     Uk86Language::uk86_read('member_store_album');
 }
コード例 #18
0
ファイル: control.php プロジェクト: wangjiang988/ukshop
 public function __construct()
 {
     Uk86Language::uk86_read('mobile');
     //分页数处理
     $page = intval($_GET['page']);
     if ($page > 0) {
         $this->page = $page;
     }
 }
コード例 #19
0
ファイル: pointgrade.php プロジェクト: wangjiang988/ukshop
 public function __construct()
 {
     parent::__construct();
     Uk86Language::uk86_read('home_pointprod');
     //验证是否登录
     if ($_SESSION['is_login'] != '1') {
         showDialog(L('no_login'), 'index.php?act=login', 'error');
     }
 }
コード例 #20
0
ファイル: perform.php プロジェクト: wangjiang988/ukshop
 /**
  * 性能优化
  */
 public function performOp()
 {
     if ($_GET['type'] == 'clear') {
         $lang = Uk86Language::uk86_getLangContent();
         $cache = Cache::getInstance(C('cache.type'));
         $cache->clear();
         uk86_showMessage($lang['nc_common_op_succ']);
     }
     Tpl::showpage('setting.perform_opt');
 }
コード例 #21
0
ファイル: theme_inform.php プロジェクト: wangjiang988/ukshop
 public function __construct()
 {
     parent::__construct();
     $this->c_id = intval($_GET['c_id']);
     if ($this->c_id <= 0) {
         echo '<script>DialogManager.close("inform");</script>';
     }
     Tpl::output('c_id', $this->c_id);
     Uk86Language::uk86_read('manage_inform');
 }
コード例 #22
0
ファイル: category.php プロジェクト: wangjiang988/ukshop
 /**
  * 分类列表
  */
 public function indexOp()
 {
     Uk86Language::uk86_read('home_category_index');
     $lang = Uk86Language::uk86_getLangContent();
     //导航
     $nav_link = array('0' => array('title' => $lang['homepage'], 'link' => SHOP_SITE_URL), '1' => array('title' => $lang['category_index_goods_class']));
     Tpl::output('nav_link_list', $nav_link);
     Tpl::output('html_title', C('site_name') . ' - ' . Uk86Language::uk86_get('category_index_goods_class'));
     Tpl::showpage('category');
 }
コード例 #23
0
ファイル: cache.php プロジェクト: wangjiang988/ukshop
 /**
  * 清理缓存
  */
 public function clearOp()
 {
     if (!uk86_chksubmit()) {
         Tpl::showpage('cache.clear');
         return;
     }
     $lang = Uk86Language::uk86_getLangContent();
     // 清理所有缓存
     if ($_POST['cls_full'] == 1) {
         foreach ($this->cacheItems as $i) {
             uk86_dkcache($i);
         }
         // 表主键
         Model::dropTablePkArrayCache();
         // 商品分类
         uk86_dkcache('gc_class');
         uk86_dkcache('all_categories');
         uk86_dkcache('goods_class_seo');
         uk86_dkcache('class_tag');
         // 广告
         Model('adv')->makeApAllCache();
         // 首页
         Model('web_config')->getWebHtml('index', 1);
         uk86_delCacheFile('index');
     } else {
         $todo = (array) $_POST['cache'];
         foreach ($this->cacheItems as $i) {
             if (in_array($i, $todo)) {
                 uk86_dkcache($i);
             }
         }
         // 表主键
         if (in_array('table', $todo)) {
             Model::dropTablePkArrayCache();
         }
         // 商品分类
         if (in_array('goodsclass', $todo)) {
             uk86_dkcache('gc_class');
             uk86_dkcache('all_categories');
             uk86_dkcache('goods_class_seo');
             uk86_dkcache('class_tag');
         }
         // 广告
         if (in_array('adv', $todo)) {
             Model('adv')->makeApAllCache();
         }
         // 首页
         if (in_array('index', $todo)) {
             Model('web_config')->getWebHtml('index', 1);
             uk86_delCacheFile('index');
         }
     }
     $this->log(L('cache_cls_operate'));
     uk86_showMessage($lang['cache_cls_ok']);
 }
コード例 #24
0
ファイル: api.php プロジェクト: wangjiang988/ukshop
 /**
  * 获取微商城名称
  */
 public function get_micro_nameOp()
 {
     $result = '';
     $micro_name = Uk86Language::uk86_get('nc_microshop');
     if ($this->data_type === 'json') {
         $result = json_encode($micro_name);
     } else {
         $result = $micro_name;
     }
     $this->return_result($result);
 }
コード例 #25
0
ファイル: pointprod.php プロジェクト: wangjiang988/ukshop
 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Uk86Language::uk86_read('home_pointprod');
     //判断系统是否开启U币兑换功能
     if (C('pointprod_isuse') != 1) {
         showDialog(L('pointprod_unavailable'), 'index.php', 'error');
     }
     Tpl::output('index_sign', 'pointshop');
 }
コード例 #26
0
ファイル: express.php プロジェクト: wangjiang988/ukshop
 public function indexOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $model = Model('express');
     if (preg_match('/^[A-Z]$/', $_GET['letter'])) {
         $model->where(array('e_letter' => $_GET['letter']));
     }
     $list = $model->page(10)->order('e_order,e_state desc,id')->select();
     Tpl::output('page', $model->showpage());
     Tpl::output('list', $list);
     Tpl::showpage('express.index');
 }
コード例 #27
0
ファイル: buy_virtual.php プロジェクト: wangjiang988/ukshop
 public function __construct()
 {
     parent::__construct();
     if (!$_SESSION['member_id']) {
         uk86_redirect('index.php?act=login&ref_url=' . urlencode(uk86_request_uri()));
     }
     //验证该会员是否禁止购买
     if (!$_SESSION['is_buy']) {
         uk86_showMessage(Uk86Language::uk86_get('cart_buy_noallow'), '', 'html', 'error');
     }
     Tpl::output('hidden_rtoolbar_cart', 1);
 }
コード例 #28
0
ファイル: member_points.php プロジェクト: wangjiang988/ukshop
 /**
  * 用户中心右边,小导航
  *
  * @param string	$menu_type	导航类型
  * @param string 	$menu_key	当前导航的menu_key
  * @param array 	$array		附加菜单
  * @return
  */
 private function profile_menu($menu_key = '', $array = array())
 {
     Uk86Language::uk86_read('member_layout');
     $lang = Uk86Language::uk86_getLangContent();
     $menu_array = array();
     $menu_array = array(1 => array('menu_key' => 'points', 'menu_name' => $lang['nc_member_path_points'], 'menu_url' => 'index.php?act=member_points'), 2 => array('menu_key' => 'orderlist', 'menu_name' => Uk86Language::uk86_get('member_pointorder_list_title'), 'menu_url' => 'index.php?act=member_pointorder&op=orderlist'));
     if (!empty($array)) {
         $menu_array[] = $array;
     }
     Tpl::output('member_menu', $menu_array);
     Tpl::output('menu_key', $menu_key);
 }
コード例 #29
0
ファイル: flea_cache.php プロジェクト: wangjiang988/ukshop
 public static function makeallcache($type)
 {
     Uk86Language::uk86_read("core_lang_index");
     $lang = Uk86Language::uk86_getlangcontent();
     $time = time();
     switch ($type) {
         case "area":
             $file_list = uk86_readfilelist(BASE_DATA_PATH . DS . "cache" . DS . "flea_area");
             if (is_array($file_list)) {
                 foreach ($file_list as $v) {
                     @unlink(BASE_DATA_PATH . DS . "cache" . DS . "flea_area" . DS . $v);
                 }
             }
             $maxdeep = 1;
         default:
             $param = array();
             $param['table'] = "flea_area";
             $param['where'] = "flea_area_deep = '" . $maxdeep . "'";
             $param['order'] = "flea_area_sort asc";
             $result = Db::select($param);
             if (!empty($result)) {
                 $cache_file_area = BASE_DATA_PATH . DS . "cache" . DS . "area" . DS . "flea_area_" . $maxdeep . ".php";
                 $tmp .= "<?php \r\n";
                 $tmp .= "defined('InUk86') or exit('Access Invalid!'); \r\n";
                 $tmp .= "\$data = array(\r\n";
                 if (is_array($result)) {
                     foreach ($result as $k => $v) {
                         $tmp .= "\tarray(\r\n";
                         $tmp .= "\t\t'flea_area_id'=>'" . $v['flea_area_id'] . "',\r\n";
                         $tmp .= "\t\t'flea_area_name'=>'" . htmlspecialchars($v['flea_area_name']) . "',\r\n";
                         $tmp .= "\t\t'flea_area_parent_id'=>'" . $v['flea_area_parent_id'] . "',\r\n";
                         $tmp .= "\t\t'flea_area_sort'=>'" . $v['flea_area_sort'] . "',\r\n";
                         $tmp .= "\t\t'flea_area_deep'=>'" . $v['flea_area_deep'] . "',\r\n";
                         $tmp .= "\t),\r\n";
                     }
                 }
                 $tmp .= ");";
                 try {
                     $fp = @fopen($cache_file_area, "wb+");
                     if (fwrite($fp, $tmp) === FALSE) {
                         $error = $lang['please_check_your_system_chmod_area'];
                         throw new Exception();
                     }
                     unset($tmp);
                     @fclose($fp);
                 } catch (Exception $e) {
                     uk86_showmessage($e->getMessage(), "", "exception");
                 }
             }
             ++$maxdeep;
     }
 }
コード例 #30
0
ファイル: web_api.php プロジェクト: wangjiang988/ukshop
 /**
  * 更新html内容
  */
 public function html_updateOp()
 {
     $model_web_config = Model('web_config');
     $web_id = intval($_GET["web_id"]);
     $web_list = $model_web_config->getWebList(array('web_id' => $web_id));
     $web_array = $web_list[0];
     if (!empty($web_array) && is_array($web_array)) {
         $model_web_config->updateWebHtml($web_id);
         uk86_showMessage(Uk86Language::uk86_get('nc_common_op_succ'));
     } else {
         uk86_showMessage(Uk86Language::uk86_get('nc_common_op_fail'));
     }
 }