public function edit_avatar() { $this->theme->setBreadcrumb("切换头像"); $this->theme->setTitle("切换头像"); $this->__view("User/header.php"); $user = login_user(); $this->__view("User/edit_avatar.php", ['type' => $user->getAvatarSql(), 'avatar' => $user->getAvatar()]); $this->__view("User/footer.php"); }
public function not_found() { send_http_status(404); $this->theme->setTitle("404 Not Found!"); $this->__view("Home/header.php"); $this->__view("Home/404.php"); $this->__view("Home/footer.php"); }
private function comment_posts(CommentList $cl) { $this->theme->setTitle("文章评论"); $this->theme->setBreadcrumb("文章评论"); $this->__view("User/header.php"); $list = $cl->getListOfUser(login_user()->getId()); $this->__view("Follow/comment_show.php", ['list' => $list, 'count' => $cl->getCount(), 'type' => 'posts']); $this->__view("User/footer.php"); }
public function picture_comment() { $this->theme->setBreadcrumb("图片评论"); $this->theme->setTitle("图片评论"); $this->__view("User/header.php"); $this->__lib("CommentList"); $cl = new CommentList("pictures"); $list = $cl->getListOfUserOnObject(login_user()->getId()); $this->__view("Posts/comment_show.php", ['list' => &$list, 'count' => $cl->getCount()]); $this->__view("User/footer.php"); }
public function edit() { l_h('html_tag.php'); $this->theme->setBreadcrumb("编辑文章"); $this->theme->setTitle("编辑文章"); $id = intval(req()->get('id')); $this->__lib('Post'); $post = new Post($id); $info = $post->getInfo(login_user()->getId()); $this->theme->header_add($this->theme->css(get_bootstrap_plugin_url("markdown/markdown.min.css"))); $this->theme->header_add($this->theme->js(['src' => get_bootstrap_plugin_url("markdown/markdown.js")])); if (!isset($info['post_id']) || $info['post_id'] != $id) { $this->__view("User/header.php"); $this->__view("Posts/not_found.php"); } else { $this->__view("User/header.php"); $this->__view("Posts/edit.php", ['info' => $info, 'post' => $post]); } $this->__view("User/footer.php"); }