From d78575eb912b2bd4e50d703910e832fb1cabb054 Mon Sep 17 00:00:00 2001
From: whatsns <617035918@qq.com>
Date: Thu, 10 Sep 2020 10:39:20 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8A=E6=AC=A1=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4=E6=96=B0=E5=A2=9Eurl=E6=A0=8F=E7=9B=AE=E8=87=AA?=
=?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=8A=9F=E8=83=BD=E8=A6=86=E7=9B=96=E9=94=99?=
=?UTF-8?q?=E8=AF=AF=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E5=87=BA=E7=8E=B0html=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../contorllers/Admin/Admin_category.php | 420 ------
application/contorllers/Category.php | 292 -----
application/contorllers/Topic.php | 1131 -----------------
.../controllers/Admin/Admin_category.php | 3 +-
application/controllers/Category.php | 27 +-
application/controllers/Question.php | 4 +-
application/controllers/Topic.php | 28 +-
7 files changed, 47 insertions(+), 1858 deletions(-)
delete mode 100644 application/contorllers/Admin/Admin_category.php
delete mode 100644 application/contorllers/Category.php
delete mode 100644 application/contorllers/Topic.php
diff --git a/application/contorllers/Admin/Admin_category.php b/application/contorllers/Admin/Admin_category.php
deleted file mode 100644
index 24832a5..0000000
--- a/application/contorllers/Admin/Admin_category.php
+++ /dev/null
@@ -1,420 +0,0 @@
-load->model ( 'category_model' );
- }
- function index($_message = '') {
- $message = $_message;
- $category ['grade'] = $pid = 0;
- $tcategorylist = $this->category_model->list_by_pid ( $pid );
- $categorylist = array ();
- foreach ( $tcategorylist as $cat ) {
- if ($cat ['isshowindex'] == null || $cat ['isshowindex'] == 0) {
- $cat ['isshowindex'] = "首页显示";
- } else {
- $cat ['isshowindex'] = "首页不显示";
- }
- if ($cat ['isusearticle'] == null || $cat ['isusearticle'] == 0) {
- $cat ['isusearticle'] = "不应用到文章发布";
- } else {
- $cat ['isusearticle'] = "应用到文章发布";
- }
- if ($cat ['isuseask'] == null || $cat ['isuseask'] == 0) {
- $cat ['isuseask'] = "不应用到问答发布";
- } else {
- $cat ['isuseask'] = "应用到问答发布";
- }
- if (! isset ( $cat ['onlybackground'] ) || $cat ['onlybackground'] == 0) {
- $cat ['onlybackground'] = "前端可发布";
- } else {
- $cat ['onlybackground'] = "只后台发布";
- }
- $categorylist [] = $cat;
- }
-
- include template ( 'categorylist', 'admin' );
- }
- function updateCatTmplate() {
- // $tmpname='catlist_topic';//htmlspecialchars( $this->input->post ('tmpname'));
- $id = intval ( htmlspecialchars ( $this->input->post ( 'id' ) ) );
- $tmpname = htmlspecialchars ( $this->input->post ( 'tmpname' ) );
- $cat = $this->category_model->get ( $id );
- if ($cat ['template'] != null && $cat ['template'] != '') {
- $tmpname = '';
- }
- $this->category_model->update_by_id_tmplate ( $id, $tmpname );
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- echo "1";
- }
- // 更新首页是否显示分类
- function updatecatbyindex() {
- if (null !== $this->input->post ( 'cid' )) {
- $cids = implode ( ",", $this->input->post ( 'cid' ) );
- $pid = intval ( $this->input->post ( 'hiddencid' ) );
- foreach ( $this->input->post ( 'cid' ) as $val ) {
- $type = 'isshowindex';
- $category = $this->category [$val];
- // 状态值
- $typevalue = $category ['isshowindex'] == 1 ? 0 : 1;
- $this->category_model->update_by_type ( $val, $type, $typevalue );
- }
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- $this->index ( "设置成功" );
- }
- }
- // 更新问答是否显示分类
- function updatecatbywenda() {
- if (null !== $this->input->post ( 'cid' )) {
- $cids = implode ( ",", $this->input->post ( 'cid' ) );
- $pid = intval ( $this->input->post ( 'hiddencid' ) );
- foreach ( $this->input->post ( 'cid' ) as $val ) {
- $type = 'isuseask';
- $category = $this->category [$val];
- // 状态值
- $typevalue = $category ['isuseask'] == 1 ? 0 : 1;
- $this->category_model->update_by_type ( $val, $type, $typevalue );
- }
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- $this->index ( "设置成功" );
- }
- }
- function updatecatbyorder() {
- if (null !== $this->input->post ( 'cid' )) {
- $cids = implode ( ",", $this->input->post ( 'cid' ) );
- $pid = intval ( $this->input->post ( 'hiddencid' ) );
- $orders = $this->input->post ( 'corder' );
- // var_dump($orders);exit();
-
- foreach ( $this->input->post ( 'cid' ) as $val ) {
- // echo $val.'--'.$orders[$i].'--'.$i."
";
- $orderval = $this->input->post ( 'corder' . $val );
- $this->category_model->order_category ( intval ( $val ), intval ( $orderval ) );
- }
- // exit();
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- $this->message ( "设置成功" );
- }
- }
- // 更新问答是否显示分类
- function updatecatbywenzhang() {
- if (null !== $this->input->post ( 'cid' )) {
- $cids = implode ( ",", $this->input->post ( 'cid' ) );
- $pid = intval ( $this->input->post ( 'hiddencid' ) );
- foreach ( $this->input->post ( 'cid' ) as $val ) {
- $type = 'isusearticle';
- $category = $this->category [$val];
- // 状态值
- $typevalue = $category ['isusearticle'] == 1 ? 0 : 1;
- $this->category_model->update_by_type ( $val, $type, $typevalue );
- }
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- $this->message ( "设置成功" );
- }
- }
- // 更新问答是否只在后台发布分类
- function updatecatbybackground() {
- if (null !== $this->input->post ( 'cid' )) {
- $cids = implode ( ",", $this->input->post ( 'cid' ) );
- $pid = intval ( $this->input->post ( 'hiddencid' ) );
- foreach ( $this->input->post ( 'cid' ) as $val ) {
- $type = 'onlybackground';
- $category = $this->category [$val];
- // 状态值
- $typevalue = $category ['onlybackground'] == 1 ? 0 : 1;
- $this->category_model->update_by_type ( $val, $type, $typevalue );
- }
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- $this->message ( "设置成功" );
- }
- }
- function updatecatbytype() {
- $cid = intval ( $this->input->post ( 'cid' ) );
- // type 1:是否首页显示,2:是否应用问答,3:是否应用文章
- $type = intval ( $this->input->post ( 'type' ) );
- // 状态值
- $typevalue = intval ( $this->input->post ( 'typevalue' ) );
- $typevalue = $typevalue == 1 ? 0 : 1;
- switch ($type) {
- case 1 :
- $type = 'isshowindex';
- break;
- case 2 :
- $type = 'isuseask';
- break;
- case 3 :
- $type = 'isusearticle';
- break;
- }
- $this->category_model->update_by_type ( $cid, $type, $typevalue );
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- echo "1";
- }
- function postadd() {
- if (null !== $this->input->post ( 'submit' )) {
- $pid = 0;
- $category1 = $this->input->post ( 'category1' );
- $category2 = $this->input->post ( 'category2' );
-
- if (isset ( $category2 ) && trim ( $category2 ) != '') {
- $pid = $category2;
- } else if (isset ( $category1 ) && trim ( $category1 ) != '') {
- $pid = $category1;
- }
- $lines = explode ( "\n", $this->input->post ( 'categorys' ) );
- $this->category_model->add ( $lines, $pid );
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
-
- exit ( '1' );
- } else {
- exit ( '0' );
- }
- }
- function add() {
- $id = intval ( $this->uri->segment ( 3 ) );
- $selectedarray = array ();
- if ($id) {
- $category = $this->category [$id];
- $item = $category;
- for($grade = $category ['grade']; $grade > 0; $grade --) {
- $selectedarray [] = $item ['id'];
- $item ['pid'] && $item = $this->category [$item ['pid']];
- }
- }
-
- if (isset ( $selectedarray ) && count ( $selectedarray ) > 0) {
- switch (count ( $selectedarray )) {
- case 1 :
- list ( $category1 ) = array_reverse ( $selectedarray );
- break;
- case 2 :
- list ( $category1, $category2 ) = array_reverse ( $selectedarray );
- break;
- case 3 :
- list ( $category1, $category2, $category3 ) = array_reverse ( $selectedarray );
- break;
- }
- }
- $categoryjs = $this->category_model->get_js ();
- include template ( 'addcategory', 'admin' );
- }
- // 获取分类描述
- function getmiaosu() {
- $id = intval ( htmlspecialchars ( $this->input->post ( 'id' ) ) );
- $category = $this->category [$id];
- echo $category ['miaosu'];
- exit ();
- }
- function editalias() {
- $alias = htmlspecialchars ( $this->input->post ( 'alias' ) );
- $id = intval ( htmlspecialchars ( $this->input->post ( 'id' ) ) );
- $this->category_model->update_by_id_alias ( $id, $alias );
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- echo "更新成功";
- }
- function editmiaosu() {
- $miaosu = $this->input->post ( 'miaosu' );
-
- $id = intval ( $this->input->post ( 'id' ) );
- // runlog('miaosu.txt', $id.'----.'.$miaosu);
- $this->category_model->update_by_id_miaosu ( $id, $miaosu );
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- echo "更新成功";
- }
- function edit() {
- $id = intval ( $this->uri->segment ( 3 ) ) == 0 ? intval ( $this->input->post ( 'id' ) ) : intval ( $this->uri->segment ( 3 ) );
- if (null !== $this->input->post ( 'submit' )) {
- $name = trim ( $this->input->post ( 'name' ) ); // 分类名称
- $aliasname = trim ( $this->input->post ( 'aliasname' ) ); // 分类别名
- $edit_miaosu = trim ( $this->input->post ( 'edit_miaosu' ) ); // 分类描述
- $s_tmplist = trim ( $this->input->post ( 's_tmplist' ) ); // 文章分类模板名字
- $s_articletmplist = trim ( $this->input->post ( 's_articletmplist' ) ); // 文章详情模板名字
- $dir= trim ( $this->input->post ( 'dir' ) ); // 分类目录名称
- $categorydir = '';
- $categorydir = empty($dir) ? '':$dir;
- $cid = 0;
- $category1 = $this->input->post ( 'category1' );
- $category2 = $this->input->post ( 'category2' );
- $category3 = $this->input->post ( 'category3' );
- if ($category3) {
- $cid = $category3;
- } else if ($category2) {
- $cid = $category2;
- } else if ($category1) {
- $cid = $category1;
- }
- if ($cid > 0) {
- $category = $this->category [$cid]; // 得到分类信息
- } else {
- $category = $this->category [$id]; // 得到分类信息
- }
- if ($_FILES ["catimage"] ['name'] != '') {
- $uid = $id;
-
- $avatardir = "/data/category/";
- $extname = extname ( $_FILES ["catimage"] ["name"] );
- if (! isimage ( $extname ))
- $this->message ( "图片扩展名不正确!", 'admin_category/editimg' );
- $upload_tmp_file = FCPATH . '/data/tmp/cat_' . $uid . '.' . $extname;
- $uid = abs ( $uid );
- $uid = sprintf ( "%09d", $uid );
- $dir1 = $avatardir . substr ( $uid, 0, 3 );
- $dir2 = $dir1 . '/' . substr ( $uid, 3, 2 );
- $dir3 = $dir2 . '/' . substr ( $uid, 5, 2 );
- (! is_dir ( FCPATH . $dir1 )) && forcemkdir ( FCPATH . $dir1 );
- (! is_dir ( FCPATH . $dir2 )) && forcemkdir ( FCPATH . $dir2 );
- (! is_dir ( FCPATH . $dir3 )) && forcemkdir ( FCPATH . $dir3 );
- $bigimg = $dir3 . "/big_" . $uid . '.' . $extname;
- $smallimg = $dir3 . "/small_" . $uid . '.' . $extname;
- unlink ( FCPATH . $dir3 . "/big_" . $uid . '.jpg' );
- unlink ( FCPATH . $dir3 . "/big_" . $uid . '.png' );
- unlink ( FCPATH . "/small_" . $uid . '.png' );
- unlink ( FCPATH . "/small_" . $uid . '.jpg' );
- if (move_uploaded_file ( $_FILES ["catimage"] ["tmp_name"], $upload_tmp_file )) {
-
- $avatar_dir = glob ( FCPATH . $dir3 . "/small_{$uid}.*" );
-
- foreach ( $avatar_dir as $imgfile ) {
-
- if (strtolower ( $extname ) != extname ( $imgfile ))
- unlink ( $imgfile );
- }
-
- image_resize ( $upload_tmp_file, FCPATH . $bigimg, 195, 195, 1 );
-
- image_resize ( $upload_tmp_file, FCPATH . $smallimg, 32, 32, 1 );
- }
- }
- $data=array(
- 'name'=>$name,
- 'dir'=>$categorydir,
- 'alias'=>$aliasname,
- 'miaosu'=>$edit_miaosu,
- 'template'=>$s_tmplist,
- 'articletemplate'=>$s_articletmplist,
- );
- $this->db->where(array('id'=>$id))->update('category',$data);
- //$this->category_model->update_by_id ( $id, $name, $categorydir, $category ['pid'], $aliasname, $edit_miaosu, $s_tmplist );
- cleardir ( FCPATH . '/data/cache' ); // 清除缓存文件
- $pid = $category ['pid'];
- if ($pid != 0) {
- $this->input->post ( 'cid' ) ? $this->myview ( $this->input->post ( 'cid' ) ) : $this->message ( "操作成功", "admin_category/myview/$pid" );
- } else {
- $this->input->post ( 'cid' ) ? $this->myview ( $this->input->post ( 'cid' ) ) : $this->message ( "操作成功", "admin_category" );
- }
- } else {
- $category = $this->category_model->get ( $id );
- $item = $category;
- $selectedarray = array ();
- for($grade = $category ['grade']; $grade > 1; $grade --) {
- $selectedarray [] = $item ['pid'];
- $item = $this->category [$item ['pid']];
- }
- if (isset ( $selectedarray ) && count ( $selectedarray ) > 0) {
- switch (count ( $selectedarray )) {
- case 1 :
- list ( $category1 ) = array_reverse ( $selectedarray );
- break;
- case 2 :
- list ( $category1, $category2 ) = array_reverse ( $selectedarray );
- break;
- case 3 :
- list ( $category1, $category2, $category3 ) = array_reverse ( $selectedarray );
- break;
- }
- }
-
- $categoryjs = $this->category_model->get_js ();
- $file_dir = APPPATH . "views/" . $this->setting ['tpl_dir'];
- $files = scandir ( $file_dir );
- $catlistfiles = array ();
- $articlelistfiles = array ();
- foreach ( $files as $file ) {
- if (strstr ( $file, 'catlist' )) {
- array_push ( $catlistfiles, $file );
- }
- if (strstr ( $file, 'topicone' )) {
- array_push ( $articlelistfiles, $file );
- }
- }
-
- include template ( 'editcategory', 'admin' );
- }
- }
-
- // 后台分类管理查看一个分类
- function myview($cid = 0, $msg = '') {
- $cid = $cid ? $cid : intval ( $this->uri->segment ( 3 ) );
- $navlist = $this->category_model->get_navigation ( $cid ); // 获取导航
- if (isset ( $this->category [$cid] )) {
- $category = $this->category [$cid];
- } else {
- $category = null;
- }
-
- $categorylist = $this->category_model->list_by_cid ( $cid, $category ['pid'] ); // 获取子分类
- $pid = $cid;
- $msg && $message = $msg;
- include template ( 'categorylist', 'admin' );
- }
-
- // 删除分类
- function remove() {
- if (null !== $this->input->post ( 'cid' )) {
- $cids = implode ( ",", $this->input->post ( 'cid' ) );
- $pid = intval ( $this->input->post ( 'hiddencid' ) );
- $this->category_model->remove ( $cids );
- $this->message ( '分类删除成功!' );
- }
- }
-
- /* 后台分类排序 */
- function reorder() {
- $orders = explode ( ",", $this->input->post ( 'order' ) );
- foreach ( $orders as $order => $cid ) {
- $this->category_model->order_category ( intval ( $cid ), $order );
- }
- $this->cache->remove ( 'category' );
- }
- // 修改封面图
- function editimg() {
- if (isset ( $_FILES ["catimage"] )) {
- $uid = intval ( $this->input->post ( 'catid' ) );
-
- $avatardir = "/data/category/";
- $extname = extname ( $_FILES ["catimage"] ["name"] );
- if (! isimage ( $extname ))
- $this->message ( "图片扩展名不正确!", 'admin_category/editimg' );
- $upload_tmp_file = FCPATH . '/data/tmp/cat_' . $uid . '.' . $extname;
- $uid = abs ( $uid );
- $uid = sprintf ( "%09d", $uid );
- $dir1 = $avatardir . substr ( $uid, 0, 3 );
- $dir2 = $dir1 . '/' . substr ( $uid, 3, 2 );
- $dir3 = $dir2 . '/' . substr ( $uid, 5, 2 );
- (! is_dir ( FCPATH . $dir1 )) && forcemkdir ( FCPATH . $dir1 );
- (! is_dir ( FCPATH . $dir2 )) && forcemkdir ( FCPATH . $dir2 );
- (! is_dir ( FCPATH . $dir3 )) && forcemkdir ( FCPATH . $dir3 );
- $bigimg = $dir3 . "/big_" . $uid . '.' . $extname;
- $smallimg = $dir3 . "/small_" . $uid . '.' . $extname;
-
- if (move_uploaded_file ( $_FILES ["catimage"] ["tmp_name"], $upload_tmp_file )) {
-
- $avatar_dir = glob ( FCPATH . $dir3 . "/small_{$uid}.*" );
-
- foreach ( $avatar_dir as $imgfile ) {
-
- if (strtolower ( $extname ) != extname ( $imgfile ))
- unlink ( $imgfile );
- }
-
- image_resize ( $upload_tmp_file, FCPATH . $bigimg, 195, 195, 1 );
-
- image_resize ( $upload_tmp_file, FCPATH . $smallimg, 32, 32, 1 );
- }
- }
- header ( "Location:" . SITE_URL . 'index.php?admin_category.html' );
- }
-}
-
-?>
\ No newline at end of file
diff --git a/application/contorllers/Category.php b/application/contorllers/Category.php
deleted file mode 100644
index 30e36c2..0000000
--- a/application/contorllers/Category.php
+++ /dev/null
@@ -1,292 +0,0 @@
-whitelist = "attentto,search,viewtopic,clist";
- parent::__construct ();
- $this->load->model ( 'category_model' );
- $this->load->model ( 'question_model' );
- $this->load->model ( "topic_model" );
- }
-
- function viewtopic() {
- $navtitle = "热门专题";
- $status = null!== $this->uri->segment ( 3 ) ? $this->uri->segment ( 3 ) : 'hot';
- @$page = max ( 1, intval ( $this->uri->segment ( 4 ) ) );
- $pagesize = 21;
- $startindex = ($page - 1) * $pagesize;
-
- $where = "and grade=1 ";
- switch ($status) {
-
- case 'question' :
- $where=$where." and isuseask=1 ";
- break;
- }
-
- $rownum = returnarraynum ( $this->db->query ( getwheresql ( 'category', " 1=1 $where ", $this->db->dbprefix ) )->row_array () );
- //$userarticle = $this->topic_model->get_user_articles ( 0, 5 );
- $catlist = $this->category_model->listtopic ( $status, $startindex, $pagesize );
- $departstr = page ( $rownum, $pagesize, $page, "category/viewtopic/$status" );
- include template ( 'category_all' );
- }
-function view() {
- $this->load->model ( "expert_model" );
-
- if(intval ( $this->uri->rsegments[3] )==0){
- $catdir=addslashes(strip_tags($this->uri->rsegments[3]));//获取目录
-
- $_cat=$this->db->get_where('category',array('dir'=>$catdir))->row_array();
- if($_cat){
- $cid=$_cat['id'];
- }else{
- show_404();
- }
- }else{
- $cid = intval ( $this->uri->rsegments[3] ) ? intval ( $this->uri->rsegments[3]) : 'all';
- }
-
- $status = null!== $this->uri->rsegments[4] ? $this->uri->rsegments[4]: 'all';
- @$page = max ( 1, intval ( $this->uri->rsegments[5]) );
- $pagesize = $this->setting ['list_default'];
- $startindex = ($page - 1) * $pagesize; //每页面显示$pagesize条
- if ($cid != 'all') {
- $category = $this->category [$cid]; //得到分类信息
- $navtitle = $category ['name'];
- $cfield = 'cid' . $category ['grade'];
- } else {
- $category = $this->category;
- $navtitle = '全部分类';
- $cfield = '';
- $category ['pid'] = 0;
- }
-
- if ($category ['name'] == '') {
- header ( 'HTTP/1.1 404 Not Found' );
- header ( "status: 404 Not Found" );
- echo '
404
抱歉,话题不存在!⊂((δ⊥δ))⊃返回主页
现在您可以点击查看最新评论回复。
'; - sendmail ( $quser, $subject, $sendmessage ); - - } - - } - $message ['code'] = 200; - $message ['msg'] = '评论成功'; - echo json_encode ( $message ); - exit (); - } - } - // 获取文章评论的回复 - function ajaxgetcommentlist() { - $tid = isset ( $_POST ['tid'] ) ? intval ( $_POST ['tid'] ) : 0; - if ($tid == 0) { - $message ['code'] = 201; - $message ['msg'] = '文章不存在'; - echo json_encode ( $message ); - exit (); - } - $aid = isset ( $_POST ['aid'] ) ? intval ( $_POST ['aid'] ) : 0; - if ($aid == 0) { - $message ['code'] = 201; - $message ['msg'] = '文章评论不存在'; - echo json_encode ( $message ); - exit (); - } - $commentlist = $this->articlecomment_model->getarticlecommentlist ( $tid, $aid ); - $message ['code'] = 200; - $message ['msg'] = json_encode ( $commentlist ); - echo json_encode ( $message ); - exit (); - } - // 删除文章评论回复 - function ajaxdelartcomment() { - $id = isset ( $_POST ['id'] ) ? intval ( $_POST ['id'] ) : 0; - if ($id == 0) { - $message ['code'] = 201; - $message ['msg'] = '文章评论不存在'; - echo json_encode ( $message ); - exit (); - } - // 获取当前评论 - $comment = $this->articlecomment_model->getoneartcomment ( $id ); - if (! $comment) { - $message ['code'] = 201; - $message ['msg'] = '文章评论回复不存在'; - echo json_encode ( $message ); - exit (); - } else { - if ($this->user ['grouptype'] != 1) { - if ($comment ['authorid'] != $this->user ['uid']) { - $message ['code'] = 201; - $message ['msg'] = '只有作者本人才能删除评论'; - echo json_encode ( $message ); - exit (); - } - } - - $this->articlecomment_model->delartcomment ( $id, $comment ['aid'] ); - $message ['code'] = 200; - $message ['msg'] = '删除成功'; - echo json_encode ( $message ); - exit (); - } - } - // 删除评论 - function deletearticlecomment() { - if ($this->user ['uid'] == 0) { - $this->message ( "你还没登录!", 'user/login' ); - } - $tid = intval ( $this->uri->segment ( 4 ) ); - $id = intval ( $this->uri->segment ( 3 ) ); - $viewurl = urlmap ( 'topic/getone/' . $tid, 2 ); - $article = $this->topic_model->getcomment ( $id ); - if ($this->user ['grouptype'] != 1) { - if ($article ['authorid'] != $this->user ['uid']) { - $this->message ( "非法操作!", $viewurl ); - } - } - $this->topic_model->remove_by_tid ( $id, $tid ); - $this->message ( "文章评论删除成功!", $viewurl ); - } - function ajaxviewtopic() { - $tid = intval ( $this->uri->segment ( 3 ) ); - - $topic = $this->topic_model->get ( $tid ); - if ($topic ['price'] == 0) - exit ( '-1' ); - - include template ( "viewtopic" ); - } - function posttopicreward() { - $tid = intval ( $this->input->post ( 'tid' ) ); - $topic = $this->topic_model->get ( $tid ); - $readmode = $topic ['readmode']; - // 用户没登录 - if ($this->user ['uid'] == 0) - exit ( '-2' ); - - // 此文章不需要付费 - if ($topic ['price'] == 0) - exit ( '-1' ); - - $cash_fee = $topic ['price']; - if ($readmode == '2') { - if ($this->user ['credit2'] < $topic ['price']) { - // 用户积分不足 - exit ( '0' ); - } - } - if ($readmode == '3') { - if (round ( $this->user ['jine'] / 100 ) < $topic ['price']) { - // 用户账户余额不足 - exit ( '7' ); - } - } - - if ($this->user ['uid'] == $topic ['authorid']) { - // 偷看的是本人 - exit ( '-3' ); - } - - $readuid = $this->user ['uid']; - $authorid = $topic ['authorid']; - $one = $this->topic_model->getreaduser ( $readuid, $tid ); - if ($one != null) { - // 已经付费过了 - exit ( '2' ); - } - // addtopicviewhistory - $id = $this->topic_model->addtopicviewhistory ( $this->user ['uid'], $this->user ['username'], $tid ); - if ($id > 0) { - if ($readmode == '2') { - // 阅读的人积分扣减 - $this->db->query ( "UPDATE " . $this->db->dbprefix . "user SET `credit2`=credit2-$cash_fee WHERE `uid`=$readuid" ); - - // 作者获得积分 - - $this->db->query ( "UPDATE " . $this->db->dbprefix . "user SET `credit2`=credit2+$cash_fee WHERE `uid`=$authorid" ); - - $this->load->model ( "doing_model" ); - $this->doing_model->add ( $this->user ['uid'], $this->user ['username'], 15, $tid, $topic ['title'] ); - } - if ($readmode == '3') { - $paycash_fee = $cash_fee * 100; - // 阅读的人金额扣减 - $this->db->query ( "UPDATE " . $this->db->dbprefix . "user SET `jine`=jine-$paycash_fee WHERE `uid`=$readuid" ); - $useruid = $this->user ['uid']; - $time = time (); - $authorid = $topic ['authorid']; - // 作者获得金额 - $this->db->query ( "UPDATE " . $this->db->dbprefix . "user SET `jine`=jine+$paycash_fee WHERE `uid`=$authorid" ); - $this->db->query ( "INSERT INTO " . $this->db->dbprefix . "paylog SET type='topayarticle',typeid=$tid,money=$cash_fee,openid='',fromuid=$authorid,touid=$useruid,`time`=$time" ); - $this->db->query ( "INSERT INTO " . $this->db->dbprefix . "paylog SET type='payarticle',typeid=$tid,money=$cash_fee,openid='',fromuid=$useruid,touid=$authorid,`time`=$time" ); - } - exit ( '1' ); - } else { - exit ( '-4' ); - } - } - - function search() { - $hidefooter = 'hidefooter'; - - $type = "topic"; - $this->load->helper ( 'security' ); - if ($_GET ['word']) { - $word = xss_clean ( $_GET ['word'] ); - } else { - $word = xss_clean ( $_GET [0] ); - } - - - - if (isset ( $_SERVER ['HTTP_X_REWRITE_URL'] ) && $_GET ['word'] == null) { - - if (function_exists ( "iconv" ) && $this->uri->rsegments [3] != null) { - $word = iconv ( "GB2312", "UTF-8//IGNORE", $this->uri->rsegments [3] ); - } - } else if (isset ( $_SERVER ['ORIG_PATH_INFO'] ) && $_GET ['word'] == null) { - $word = iconv ( "GB2312", "UTF-8//IGNORE", $this->uri->rsegments [3] ); - } - - if ($word == null) { - if ($this->uri->segment ( 3 ) != null) { - $word = urldecode ( $this->uri->rsegments [3] ); - } - } - if ($word == null) { - $word = trim ( $this->input->post ( 'word' ) ) ? trim ( $this->input->post ( 'word' ) ) : urldecode ( $_word ); - } - (! $word) && $this->message ( "搜索关键词不能为空!", 'BACK' ); - - $navtitle = $word; - if($_GET['pageindex']){ - @$page = max ( 1, intval ($_GET['pageindex']) ); - }else{ - @$page = max ( 1, intval ( $this->uri->rsegments [4] ) ); - } - - $pagesize = $this->setting ['list_default']; - $startindex = ($page - 1) * $pagesize; - $seo_description = $word; - $seo_keywords = $word; - $topiclist = null; // 定义空文章数组 - // $rownum = $this->topic_model->rownum_by_tag($word); - - // $topiclist = $this->topic_model->list_by_tag($word, $startindex, $pagesize); - // if($topiclist==null){ - - $topiclist = $this->topic_model->get_bylikename ( $word, $startindex, $pagesize ); - // } - $rownum = $this->topic_model->rownum_by_title ( $word ); - foreach ( $topiclist as $key => $val ) { - - $taglist = $this->topic_tag_model->get_by_aid ( $val ['id'] ); - - $topiclist [$key] ['tags'] = $taglist; - } - $pageurl = url ( 'topic/search' ) . "?word=$word"; - $departstr = cpage ( $rownum, $pagesize, $page, $pageurl ); - - - include template ( 'topictag' ); - } - function cancelhot() { - $id = intval ( $this->uri->segment ( 3 ) ); - $this->topic_model->updatetopichot ( $id, '0' ); - $this->message ( "取消顶置成功!", urlmap ( 'topic/hotlist' ) ); - } - function pushhot() { - $id = intval ( $this->uri->segment ( 3 ) ); - $this->topic_model->updatetopichot ( $id, '1' ); - $this->message ( "推荐到首页成功!", urlmap ( 'topic/hotlist' ) ); - } - function ajaxpostsupportcomment() { - $message = array (); - $cmid = intval ( $this->input->post ( 'cmid' ) ); - $this->load->model ( "articlecomment_model" ); - $this->articlecomment_model->updatecmsupport ( $cmid ); - - $message ['state'] = 1; - - echo json_encode ( $message ); - exit (); - } - function ajaxpostcomment() { - $message = array (); - if ($this->user ['uid'] <= 0) { - $message ['state'] = - 1; - $message ['msg'] = "登录后可发布评论"; - echo json_encode ( $message ); - exit (); - } - if (isset ( $this->setting ['register_on'] ) && $this->setting ['register_on'] == '1') { - if ($this->user ['active'] != 1) { - $message ['code'] = 201; - $message ['msg'] = "必须激活邮箱才能评论!"; - echo json_encode ( $message ); - exit (); - } - } - $content = $this->input->post ( 'content' ); - $title = strip_tags ( $this->input->post ( 'title' ) ); - $tid = intval ( $this->input->post ( 'tid' ) ); - $this->load->model ( "articlecomment_model" ); - - $onecorder = $this->articlecomment_model->checkhascomment ( $tid, $this->user ['uid'] ); - if ($onecorder != null) { - $message ['state'] = 0; - $message ['msg'] = "您已经评论过了!"; - echo json_encode ( $message ); - exit (); - } - // 检查评论内容 - $mywords = checkwords ( $content ); - if ($mywords [0] == 2) { - $message ['code'] = 201; - $message ['msg'] = '评论包含敏感信息'; - echo json_encode ( $message ); - exit (); - } - $status = 1; - $supports = rand ( 1, 5 ); - $id = $this->articlecomment_model->add_seo ( $tid, $title, $content, $this->user ['uid'], $this->user ['username'], $status, $supports ); - if ($id > 0) { - $message ['state'] = 1; - $message ['msg'] = "评论成功!"; - - $state = intval ( $this->setting ['publisharticlecommentcheck'] ) > 0 ? 0 : 1; - if ($state == 1) { - $topicone = $this->topic_model->get ( $tid ); - - $message ['msg'] = "评论成功!"; - $this->load->model ( "doing_model" ); - - $this->doing_model->add ( $this->user ['uid'], $this->user ['username'], 14, $tid, $content ); - - //发送邮件通知 - $quser=$this->user_model->get_by_uid($topicone['authorid']); - //如果作者开启文章评论邮件通知,且评论不是作者本人 - if($quser['notify']['comment']==1&&$quser['uid']!=$this->user ['uid']){ - $subject = "文章[".$title."]有新评论!"; - $sendmessage = $content. '现在您可以点击查看最新评论。
'; - sendmail ( $quser, $subject, $sendmessage ); - - } - - - } else { - - $message ['msg'] = "评论成功,等待审核!"; - } - } else { - $message ['state'] = 0; - $message ['msg'] = "评论失败!"; - } - - echo json_encode ( $message ); - exit (); - } - function paylist() { - $navtitle = "付费阅读文章专栏"; - $typename="pay"; - @$page = max ( 1, intval ( $this->uri->segment ( 4 ) ) ); - $pagesize = $this->setting ['list_default']; - $startindex = ($page - 1) * $pagesize; - $readmode=$this->uri->segment ( 3 )=='money' ? 3:2; - $rownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', ' readmode='.$readmode.' and state=1 ', $this->db->dbprefix ) )->row_array () ); - - $topiclist = $this->topic_model->get_paylist ( $startindex, $pagesize,$readmode ); - - $departstr = page ( $rownum, $pagesize, $page, "topic/paylist" ); - - $sublist = $this->category_model->list_by_cid_pid_all ( 0, 0 ); // 获取子分类 - include template ( 'topic' ); - } - function hotlist() { - $navtitle = "最新文章推荐"; - $typename="top"; - @$page = max ( 1, intval ( $this->uri->segment ( 3 ) ) ); - $pagesize = $this->setting ['list_default']; - $startindex = ($page - 1) * $pagesize; - $rownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', ' ispc=1 and state=1 ', $this->db->dbprefix ) )->row_array () ); - - - $topiclist = $this->topic_model->get_hotlist ( 1, $startindex, $pagesize, 12 ); - $departstr = page ( $rownum, $pagesize, $page, "topic/hotlist" ); - - $sublist = $this->category_model->list_by_cid_pid_all ( 0, 0 ); // 获取子分类 - include template ( 'topic' ); - } - function weeklist() { - $navtitle = "热门文章"; - $typename="hot"; - @$page = max ( 1, intval ( $this->uri->segment ( 3 ) ) ); - $pagesize = $this->setting ['list_default']; - $startindex = ($page - 1) * $pagesize; - $timeweekstart = time() - 7 * 24 * 3600; - $timedaystart = time()- 1 * 24 * 3600; - $timemonthstart = time() - 30 * 24 * 3600; - $timeyearstart = time() - 365 * 24 * 3600; - $timeend = time(); - $query = null; - $rownum=0; - // 先看一天内文章是否超过10条 - $dayrownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', " state=1 AND `viewtime`>$timedaystart AND `viewtime`<$timeend ", $this->db->dbprefix ) )->row_array () ); - if ($dayrownum >= 10) { - $rownum=$dayrownum; - } else { - - // 看这一周是否超过10条 - $weekrownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', " state=1 AND `viewtime`>$timeweekstart AND `viewtime`<$timeend ", $this->db->dbprefix ) )->row_array () ); - if ($weekrownum >= 10) { - $rownum=$weekrownum; - } else { - // 看这一月是否超过10条 - $monthrownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', " state=1 AND `viewtime`>$timemonthstart AND `viewtime`<$timeend ", $this->db->dbprefix ) )->row_array () ); - - if ($monthrownum >= 10) { - $rownum=$monthrownum; - }else{ - // 看这一月是否超过10条 - $rownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', " state=1 AND `viewtime`>$timeyearstart AND `viewtime`<$timeend ", $this->db->dbprefix ) )->row_array () ); - - - } - } - } - - $topiclist = $this->topic_model->get_weeklist ( $startindex, $pagesize ); - $departstr = page ( $rownum, $pagesize, $page, "topic/weeklist" ); - - $sublist = $this->category_model->list_by_cid_pid_all ( 0, 0 ); // 获取子分类 - - include template ( 'topic' ); - } - // 获取最新文章 - function getnewlist() { - @$page = max ( 1, intval ( $this->uri->segment ( 3 ) ) ); - $pagesize = 6; - $startindex = ($page - 1) * $pagesize; - $wzrownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', '1=1 and state=1 ', $this->db->dbprefix ) )->row_array () ); - $topiclist = $this->topic_model->get_list ( 2, $startindex, $pagesize ); - - echo json_encode ( $topiclist ); - exit (); - } - function getbycatidanduid() { - $pagesize = 6; - $muid = intval ( $this->uri->segment ( 3 ) ); - - @$page = max ( 1, intval ( $this->uri->segment ( 5 ) ) ); - $startindex = ($page - 1) * $pagesize; - if ($this->uri->segment ( 4 ) == 'all') { - - $topiclist = $this->topic_model->get_list_byuid ( $muid, $startindex, $pagesize ); - echo json_encode ( $topiclist ); - exit (); - } - $cid = intval ( $this->uri->segment ( 4 ) ); - - $topiclist = $this->topic_model->get_list_bycidanduid ( $cid, $muid, $startindex, $pagesize ); - - echo json_encode ( $topiclist ); - exit (); - } - - // 获取用户相关的文章数和关注数 - function getuserarticles() { - @$page = max ( 1, intval ( $this->uri->segment ( 3 ) ) ); - $pagesize = 8; - $startindex = ($page - 1) * $pagesize; - $userrownum = $this->topic_model->rownum_by_user_article (); - - $topiclist = $this->topic_model->get_user_articles ( $startindex, $pagesize ); - echo json_encode ( $topiclist ); - exit (); - } - function index() { - $url=url("seo/index"); -header("Location: $url"); -exit(); - $navtitle = "最新文章专栏推荐"; - $seo_description = "推荐问答最新文章专栏,热门文章和最新文章推荐。"; - $seo_keywords = "问答文章专栏"; - $typename="new"; - @$page = max ( 1, intval ( $this->uri->segment ( 3 ) ) ); - $pagesize = $this->setting ['list_default']; - $startindex = ($page - 1) * $pagesize; - - $rownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', ' id>0 and state=1 ', $this->db->dbprefix ) )->row_array () ); - $pages = @ceil ( $rownum / $pagesize ); - $topiclist = $this->topic_model->get_list ( 2, $startindex, $pagesize ); - - $departstr = page ( $rownum, $pagesize, $page, "topic/default" ); - $metakeywords = $navtitle; - $metadescription = '精彩推荐列表'; - $sublist = $this->category_model->list_by_cid_pid_all ( 0, 0 ); // 获取子分类 - - include template ( 'topic' ); - } - /** - - * 获取文章列表根据分类 - - * @date: 2019年5月19日 下午1:38:33 - - * @author: 61703 - - * @param: variable - - * @return: - - */ - function articlelist(){ - $catid = intval ( $this->uri->rsegments [3] ); - - @$page = max ( 1, intval ( $this->uri->rsegments [4] ) ); - $catmodel = $this->category_model->get ( $catid ); - $navtitle = $catmodel ['name']; - $cids = array (); - $pid=0; - // 如果这是顶级分类 - if ($catmodel ['pid'] == 0) { - - // 获取当前分类下的子分类--二级分类 - $catlist = $this->category_model->list_by_pid ( $catid ); - - // 把顶级分类id写入数组 - array_push ( $cids, $catid ); - // 循环获取顶级分类下的子分类 - foreach ( $catlist as $key => $val ) { - - // 子分类写入数组 - array_push ( $cids, $val ['id'] ); - // 获取子分类下的三级分类 - $catlist1 = $this->category_model->list_by_pid ( $val ['id'] ); - foreach ( $catlist1 as $key1 => $val1 ) { - array_push ( $cids, $val1 ['id'] ); - } - } - } else { - - $pid=$catmodel['pid']; - // 如果不是顶级分类,先将分类id写入数组 - array_push ( $cids, $catid ); - - - // 获取该分类下的子分类 - $catlist = $this->category_model->list_by_pid ( $catid ); - - if ($catlist) { - - // 遍历子分类写入数组 - foreach ( $catlist as $key => $val ) { - array_push ( $cids, $val ['id'] ); - } - } - - if ($catmodel ['grade'] == 3) { - - $catlist = $this->category_model->list_by_pid ( $catmodel ['pid'] ); - - $catmodel = $this->category_model->get ( $catmodel ['pid'] ); - } - - - } - - $cid = implode ( ',', $cids ); - - $pagesize = $catmodel ['template'] == 'catlist_text' ? 40 : $this->setting ['list_default']; - $startindex = ($page - 1) * $pagesize; - $rownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', "articleclassid in($cid) and state=1 ", $this->db->dbprefix ) )->row_array () ); - $trownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', " articleclassid in($cid) and state=1 ", $this->db->dbprefix ) )->row_array () ); - $topiclist = $this->topic_model->get_bycatid ( $cid, $startindex, $pagesize ); - - - $departstr = page ( $rownum, $pagesize, $page, "topic/catlist/$catid" ); - - /* SEO */ - $seo_keywords = $navtitle; - $seo_description = $this->setting ['site_name'] . $navtitle . '频道,提供' . $navtitle . '相关文章。'; - if ($this->setting ['seo_category_title']) { - $seo_title = str_replace ( "{wzmc}", $this->setting ['site_name'], $this->setting ['seo_category_title'] ); - $seo_title = str_replace ( "{flmc}", $navtitle, $seo_title ); - if ($page == 1) { - } else { - $seo_title = $seo_title . '_第' . $page . "页"; - } - } else { - if ($page == 1) { - } else { - $navtitle = $navtitle . '_第' . $page . "页"; - } - } - - if ($this->setting ['seo_category_description']) { - $seo_description = str_replace ( "{wzmc}", $this->setting ['site_name'], $this->setting ['seo_category_description'] ); - $seo_description = str_replace ( "{flmc}", $navtitle, $seo_description ); - } - if ($this->setting ['seo_category_keywords']) { - $seo_keywords = str_replace ( "{wzmc}", $this->setting ['site_name'], $this->setting ['seo_category_keywords'] ); - $seo_keywords = str_replace ( "{flmc}", $navtitle, $seo_keywords ); - } - - include template ( 'topic' ); - } - function catlist() { - if(intval ( $this->uri->rsegments[3] )==0){ - $catdir=addslashes(strip_tags($this->uri->rsegments[3]));//获取目录 - $_cat=$this->db->get_where('category',array('dir'=>$catdir))->row_array(); - if($_cat){ - $catid=$_cat['id']; - }else{ - show_404(); - } - }else{ - $catid = intval ( $this->uri->rsegments [3] ); - } - - //相关分类标签 - $this->load->model ( "tag_model" ); - $relativetags = $this->tag_model->gettaglistbycid ( $catid ); - - $is_followed = $this->category_model->is_followed ( $catid, $this->user ['uid'] ); - $followerlist = $this->category_model->get_followers ( $catid, 0, 8 ); // 获取导航 - @$page = max ( 1, intval ( $this->uri->rsegments [4] ) ); - $catmodel = $this->category_model->get ( $catid ); - $navtitle = $catmodel ['name']; - $cids = array (); - - // 如果这是顶级分类 - if ($catmodel ['pid'] == 0) { - - // 获取当前分类下的子分类--二级分类 - $catlist = $this->category_model->list_by_pid ( $catid ); - - // 把顶级分类id写入数组 - array_push ( $cids, $catid ); - // 循环获取顶级分类下的子分类 - foreach ( $catlist as $key => $val ) { - - // 子分类写入数组 - array_push ( $cids, $val ['id'] ); - // 获取子分类下的三级分类 - $catlist1 = $this->category_model->list_by_pid ( $val ['id'] ); - foreach ( $catlist1 as $key1 => $val1 ) { - array_push ( $cids, $val1 ['id'] ); - } - } - } else { - - // 如果不是顶级分类,先将分类id写入数组 - array_push ( $cids, $catid ); - - // 获取该分类下的父亲级别的分类 - // $catlist=$this->category_model->list_by_pid($catmodel['pid']); - - - - if ($catmodel ['grade'] == 3) { - - //$catlist = $this->category_model->list_by_pid ( $catmodel ['pid'] ); - - $parentcatmodel = $this->category_model->get ( $catmodel ['pid'] ); - }else{ - // 获取该分类下的子分类 - $catlist = $this->category_model->list_by_pid ( $catid ); - - if ($catlist) { - - // 遍历子分类写入数组 - foreach ( $catlist as $key => $val ) { - array_push ( $cids, $val ['id'] ); - } - } - } - - // var_dump($catmodel);exit(); - } - - $cid = implode ( ',', $cids ); - - $pagesize = $catmodel ['template'] == 'catlist_text' ? 40 : $this->setting ['list_default']; - $startindex = ($page - 1) * $pagesize; - $rownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', "articleclassid in($cid) and state=1 ", $this->db->dbprefix ) )->row_array () ); - $trownum = returnarraynum ( $this->db->query ( getwheresql ( 'topic', " articleclassid in($cid) and state=1 ", $this->db->dbprefix ) )->row_array () ); - $topiclist = $this->topic_model->get_bycatid ( $cid, $startindex, $pagesize ); - - foreach ( $topiclist as $key => $val ) { - - $taglist = $this->topic_tag_model->get_by_aid ( $val ['id'] ); - - $topiclist [$key] ['tags'] = $taglist; - } - if($catdir){ - $departstr = page ( $rownum, $pagesize, $page, "topic/catlist/$catdir" ); - }else{ - $departstr = page ( $rownum, $pagesize, $page, "topic/catlist/$catid" ); - } - - - /* SEO */ - $seo_keywords = $navtitle; - $seo_description = $this->setting ['site_name'] . $navtitle . '频道,提供' . $navtitle . '相关文章。'; - if ($this->setting ['seo_category_title']) { - $seo_title = str_replace ( "{wzmc}", $this->setting ['site_name'], $this->setting ['seo_category_title'] ); - $seo_title = str_replace ( "{flmc}", $navtitle, $seo_title ); - if ($page == 1) { - } else { - $seo_title = $seo_title . '_第' . $page . "页"; - } - } else { - if ($page == 1) { - } else { - $navtitle = $navtitle . '_第' . $page . "页"; - } - } - - if ($this->setting ['seo_category_description']) { - $seo_description = str_replace ( "{wzmc}", $this->setting ['site_name'], $this->setting ['seo_category_description'] ); - $seo_description = str_replace ( "{flmc}", $navtitle, $seo_description ); - } - if ($this->setting ['seo_category_keywords']) { - $seo_keywords = str_replace ( "{wzmc}", $this->setting ['site_name'], $this->setting ['seo_category_keywords'] ); - $seo_keywords = str_replace ( "{flmc}", $navtitle, $seo_keywords ); - } - - // 如果分类模板没有为空,就应用新模板 - if ($catmodel ['template'] == null || trim ( $catmodel ['template'] ) == '') { - include template ( 'catlist' ); - } else { - include template ( trim ( $catmodel ['template'] ) ); - } - } - - - function convertUrlQuery($query) { - $queryParts = explode ( '&', $query ); - $params = array (); - foreach ( $queryParts as $param ) { - $item = explode ( '=', $param ); - $params [$item [0]] = $item [1]; - } - return $params; - } - /** - * 将参数变为字符串 - * - * @param - * $array_query - * @return string string 'm=content&c=index&a=lists&catid=6&area=0&author=0&h=0®ion=0&s=1&page=1' (length=73) - */ - function getUrlQuery($array_query) { - $key = ''; - foreach ( $array_query as $k => $param ) { - $key = $k; - break; - } - - return $key; - } - function getone() { - $topicid = intval ( $this->uri->rsegments [3] ); - $panneltype = "hidefixed"; - $useragent = $_SERVER ['HTTP_USER_AGENT']; - - - $menu = "topic"; - - $topicone = $this->topic_model->get ( $topicid ); - if ($topicone == null) { - header ( 'HTTP/1.1 404 Not Found' ); - header ( "status: 404 Not Found" ); - echo '404
问题已经被删除!⊂((δ⊥δ))⊃返回主页