コード例 #1
0
ファイル: CommentApi.php プロジェクト: ttym7993/Linger
 /**
  * 发送状态头
  */
 public function __construct()
 {
     parent::__construct();
     header('Content-type: application/json; Charset=utf-8');
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma: no-cache");
 }
コード例 #2
0
ファイル: User.php プロジェクト: ttym7993/Linger
 function __construct()
 {
     parent::__construct();
     if (!is_login()) {
         redirect_to_login();
     }
     $this->theme = theme();
     $this->theme->setBreadcrumb("用户中心", "User");
 }
コード例 #3
0
ファイル: Show.php プロジェクト: ttym7993/Linger
 function __construct()
 {
     parent::__construct();
     if (strpos(u()->getUriInfo()->getPath(), "/Show") === 0) {
         $this->__load_404();
         exit;
     } else {
         $this->theme = theme();
     }
 }
コード例 #4
0
ファイル: Message.php プロジェクト: ttym7993/Linger
 function __construct()
 {
     parent::__construct();
     if (!is_login()) {
         redirect_to_login();
     }
     $this->theme = theme();
     $this->theme->setBreadcrumb("消息中心", "Message");
     l_h("html_tag.php");
 }
コード例 #5
0
ファイル: Control.php プロジェクト: ttym7993/Linger
 public function __construct()
 {
     parent::__construct();
     if (!is_login()) {
         redirect(array("Home", "login"));
     } else {
         if (!login_user()->Permission("Control")) {
             redirect(array('Home', 'permission'));
         }
     }
     header("Content-Type: text/html; charset: utf-8");
 }
コード例 #6
0
ファイル: Photo.php プロジェクト: ttym7993/Linger
 function __construct()
 {
     parent::__construct();
     if (!is_login()) {
         redirect_to_login();
     } else {
         if (!login_user()->is_active()) {
             redirect(['User', 'activation']);
         }
     }
     $this->theme = theme();
     $this->theme->setBreadcrumb("图片中心", "Photo");
     l_h("html_tag.php");
 }
コード例 #7
0
ファイル: Posts.php プロジェクト: ttym7993/Linger
 public function __construct()
 {
     parent::__construct();
     if (!is_login()) {
         redirect(array("Home", "login"));
     } else {
         if (!login_user()->Permission("Posts")) {
             redirect(array('Home', 'permission'));
         }
     }
     $this->theme = theme();
     $this->theme->setBreadcrumb("文章中心", "Message");
     header("Content-Type: text/html; charset: utf-8");
 }
コード例 #8
0
ファイル: UserControlApi.php プロジェクト: ttym7993/Linger
 /**
  * 发送状态头
  */
 public function __construct()
 {
     parent::__construct();
     header('Content-type: application/json; Charset=utf-8');
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma: no-cache");
     if (!is_login()) {
         $this->rt_msg['msg'] = '用户未登陆';
         exit;
     } else {
         if (!login_user()->Permission("Control")) {
             $this->rt_msg['msg'] = '权限不足';
             exit;
         }
     }
 }
コード例 #9
0
ファイル: CommentData.php プロジェクト: ttym7993/Linger
 /**
  * 构造方法
  * @param string $table        关系表名
  * @param string $field        关系表ID
  * @param int    $relation_id  关系表ID的值
  * @param string $comment_type 评论类型
  * @param string $style        视图样式
  */
 function __construct($table, $field, $relation_id, $comment_type, $style = '')
 {
     parent::__construct();
     $this->relation_table = trim($table);
     $this->relation_field = trim($field);
     $this->id = intval($relation_id);
     $this->comment_type = trim($comment_type);
     $cfg = cfg();
     $this->view_path = $cfg->get('comment_view_path');
     if (empty($this->view_path)) {
         $this->view_path = "Comment";
     }
     if (empty($style)) {
         $this->view_style = "";
     } else {
         $this->view_style = $style . "/";
     }
     $this->one_page = comment_one_page();
     $this->db = db();
 }
コード例 #10
0
ファイル: Tool.php プロジェクト: ttym7993/Linger
 function __construct()
 {
     parent::__construct();
 }
コード例 #11
0
ファイル: Home.php プロジェクト: ttym7993/Linger
 function __construct()
 {
     parent::__construct();
     $this->theme = theme();
 }
コード例 #12
0
ファイル: Page.php プロジェクト: dalinhuang/StudentManage
 function __construct()
 {
     parent::__construct();
     ob_start();
 }