コード例 #1
0
 /**
  * 更新系统
  */
 public function upgrade()
 {
     \Model\Option::getUpdate();
     $version = \Model\Option::findOption('version')['value'];
     $content = \Model\Content::findContent('update_list', $version, 'update_list_pre_version');
     $this->assign($content);
     $this->assign('title', \Model\Menu::getTitleWithMenu());
     $this->layout();
 }
コード例 #2
0
 /**
  * 全体动态
  */
 public function dynamic()
 {
     $page = new \Expand\Team\Page();
     $page->listRows = "30";
     $total = count($this->db('dynamic AS d')->field('d.dynamic_id')->join("{$this->prefix}task AS t ON t.task_id = d.task_id")->order('dynamic_id DESC')->group('d.dynamic_id')->select());
     $count = $page->total($total);
     $page->handle();
     $list = $this->db('dynamic AS d')->join("{$this->prefix}task AS t ON t.task_id = d.task_id")->order('dynamic_id DESC')->group('d.dynamic_id')->limit("{$page->firstRow}, {$page->listRows}")->select();
     $show = $page->show();
     $this->assign('page', $show);
     $this->assign('list', $list);
     //获取更新信息
     $updateTips = $this->db('update_list')->where('update_list_read = 0')->order('update_list_type DESC')->find();
     $this->assign('updateTips', $updateTips);
     $this->assign('title', \Model\Menu::getTitleWithMenu());
     //每天下午3点开始10分钟将自动检测更新
     if (date('hi') >= '1500' && date('hi') <= '1510') {
         $update = \Model\Option::getUpdate();
         if ($update['status'] == '-1') {
             $this->assign('noCurl', '1');
         }
     }
     $this->layout();
 }