public function indexAction()
 {
     //http://www.xiguxigu.com/g/1
     $gid = $this->param('gid');
     $group = GroupData::getById($gid);
     if (!$group) {
         $url = ComTool::url("index");
         ComTool::redirect($url);
     }
     //根据群组id获取群组支持的分类,一级和二级
     $cats = CategoryData::groupCategorys($gid);
     $this->assign('cats', $cats);
     $this->assign('group', $group);
     $this->display();
 }
 public function indexAction()
 {
     $cid = intval($this->param('cid', 0));
     if (!$cid) {
         $url = ComTool::url("index");
         ComTool::redirect($url);
     }
     $category = CategoryData::getById($cid);
     if (!$category) {
         $url = ComTool::url("index");
         ComTool::redirect($url);
     }
     $curTime = time();
     $category['start_time'] = '09:00:00';
     $category['end_time'] = '24:00:00';
     $startTime = strtotime($category['start_time']);
     $endTime = strtotime($category['end_time']);
     $notStart = $curTime < $startTime ? true : false;
     //true为尚未开始
     $isOver = $curTime > $endTime ? true : false;
     //true为已结束
     $isOn = !$notStart && !$isOver;
     //过程中
     $this->assign('notStart', $notStart);
     $this->assign('isOver', $isOver);
     $this->assign('isOn', $isOn);
     $group = GroupData::getById($category['group_id']);
     $store = StoreData::getById($category['store_id']);
     $goods = GoodsData::getsByCid($cid);
     $cart = array();
     $cart = $this->getCart($cid);
     $this->assign('category', $category);
     $this->assign('group', $group);
     $this->assign('store', $store);
     $this->assign('goods', $goods);
     $this->assign('products', $cart['products']);
     $this->assign('totalPrice', $cart['totalPrice']);
     $this->display();
 }
 public function indexAction()
 {
     $url = ComTool::url('kickuass/cate', array());
     ComTool::redirect($url);
 }
 public function indexAction()
 {
     $url = ComTool::url('index');
     ComTool::redirect($url);
 }
 /**
  * 超级管理员登录
  */
 public function super_loginAction()
 {
     if (ComTool::isAjax()) {
         if (isset($_POST['captcha'])) {
             $captcha = trim($this->post('captcha'));
             if (!ComTool::checkCaptcha($captcha)) {
                 ComTool::ajax(100001, '验证码错误');
             }
         }
         $acc = trim($this->post('passwd'));
         $passwd = trim($this->post('user'));
         if (!$acc || !$passwd) {
             ComTool::ajax(100001, '参数错误');
         }
         if (md5($acc) != '755f2a2c2e49cfc7ce3736adaa6797df') {
             ComTool::ajax(100001, '参数错误');
         }
         if (sha1($passwd) != 'd6c96005ef36d30be38fd820794e42dfa05518e5') {
             ComTool::ajax(100001, '参数错误');
         }
         //成功则写session
         $_SESSION['super_islogin'] = 1;
         //登录标识
         $_SESSION['super_user'] = $acc;
         $returnUrl = $this->urlroot . 'kickuass/index';
         ComTool::ajax(100000, '登录成功,即将跳转', $returnUrl);
     }
     $token = $this->get('token', '');
     if (md5($token) != "b19a02afb6aaa7569b6490892e12a1a6") {
         ComTool::redirect(ComTool::url('acc/login'));
     }
     $this->display();
 }
Exemple #6
0
 /**
  * 我的首页
  */
 public function indexAction()
 {
     $url = ComTool::url("my/group");
     ComTool::redirect($url);
 }