コード例 #1
0
ファイル: result_c.php プロジェクト: Diaosir/ziku
 public function PrjDetail($PubNumber = null)
 {
     if ($PubNumber == null) {
         Util::go(URL . "/error/0");
     } else {
     }
     echo $PubNumber;
 }
コード例 #2
0
ファイル: news_c.php プロジェクト: Diaosir/ziku
 public function update($id)
 {
     $this->authority(40);
     $title = Util::fetch_post('title');
     $content = Util::fetch_post('content');
     if ($title == null || $content == null) {
         $this->error(2);
     }
     $news_table = new NewsTable();
     $news_table->update($id, $title, $content);
     Util::go(URL . 'news/manage/');
 }
コード例 #3
0
ファイル: association_c.php プロジェクト: Diaosir/ziku
 public function addNotify()
 {
     $this->authority(21);
     $title = Util::fetch_post('title');
     $content = Util::fetch_post('content');
     if ($title == null || $content == null) {
         $this->error(2);
     }
     $notify_table = new NotifyTable();
     $notify_table->insert($title, $content);
     Util::go(URL . 'association/manageNotify/');
 }
コード例 #4
0
ファイル: document_c.php プロジェクト: Diaosir/ziku
 public function add()
 {
     $this->authority(51);
     if (isset($_FILES['document'])) {
         $file = $_FILES['document'];
     } else {
         $this->error(2);
     }
     if ($file['size'] > 2097152) {
         $this->errorMsg('文件大小不能超过2M');
     }
     $doc_table = new DocumentTable();
     $time = Util::get_datetime();
     $id = $doc_table->insert($file['name'], $time);
     move_uploaded_file($file["tmp_name"], $this->location . $id . '_' . $file['name']);
     Util::go(URL . 'document/manage/');
 }
コード例 #5
0
ファイル: manager_c.php プロジェクト: Diaosir/ziku
 public function signupHandler()
 {
     $username = Util::fetch_post('username');
     $password = Util::fetch_post('password');
     $realname = Util::fetch_post('realname');
     if ($username == null || $password == null || $realname == null) {
         $this->error(2);
     }
     $userTable = new UserTable();
     if ($userTable->is_exist($username)) {
         $this->errorMsg('该用户已存在');
     }
     // 插入数据
     $userTable->insert($username, $password, $realname);
     $result = $userTable->select($username, $password);
     $userExtraTable = new UserExtraTable();
     $userExtraTable->insert($result['user_id']);
     SQLUtil::login($username, $password);
     Util::go(URL . 'manager/');
 }
コード例 #6
0
ファイル: Util_l.php プロジェクト: Diaosir/ziku
 public static function need_to_login()
 {
     if (!Util::is_login()) {
         Util::go(URL . 'manager/');
     }
 }