diff --git a/app/Common/function.php b/app/Common/function.php index f20087f..09da0ba 100644 --- a/app/Common/function.php +++ b/app/Common/function.php @@ -5,8 +5,27 @@ function dataList($modelname, $where = '', $orderby = '', $field = '*', $size = 15, $page = 1) { $model = \DB::table($modelname); + + //查询条件 if($where!=''){$model = $model->where($where);} - if($orderby!=''){$model = $model->orderBy($orderby[0], $orderby[1]);} + + //排序 + if($orderby!='') + { + if(count($orderby) == count($orderby, 1)) + { + $model = $model->orderBy($orderby[0], $orderby[1]); + } + else + { + foreach($orderby as $row) + { + $model = $model->orderBy($row[0], $row[1]); + } + } + } + + //要返回的字段 if($field!='*'){$model = $model->select(\DB::raw($field));} $skip = ($page-1)*$size; @@ -473,8 +492,9 @@ function catarcnum($typeid, $modelname='article') //根据Tag id获取该Tag标签下文章的数量 function tagarcnum($tagid) { - if(!empty($tagid)){$map['tid']=$tagid;} - return db("taglist")->where($map)->count(); + $taglist = \DB::table("taglist"); + if(!empty($tagid)){$map['tid']=$tagid; $taglist = $taglist->where($map);} + return $taglist->count(); } //判断是否是图片格式,是返回true @@ -833,16 +853,19 @@ function dir_delete($dir) function object_to_array($object, $get=0) { $res = ''; - if($get==0) + if(!empty($object)) { - foreach($object as $key=>$value) + if($get==0) { - $res[$key] = (array)$value; + foreach($object as $key=>$value) + { + $res[$key] = (array)$value; + } + } + else + { + $res = (array)$object; } - } - else - { - $res = (array)$object; } return $res; diff --git a/app/Http/Controllers/Admin/CommonController.php b/app/Http/Controllers/Admin/CommonController.php index 9bcdde1..e052698 100644 --- a/app/Http/Controllers/Admin/CommonController.php +++ b/app/Http/Controllers/Admin/CommonController.php @@ -26,10 +26,10 @@ class CommonController extends Controller /** * 获取分页数据及分页导航 * @param string $modelname 模块名与数据库表名对应 - * @param array $map 查询条件 + * @param array $where 查询条件 * @param string $orderby 查询排序 * @param string $field 要返回数据的字段 - * @param int $listRows 每页数量,默认10条 + * @param int $listRows 每页数量,默认30条 * * @return 格式化后输出的数据。内容格式为: * - "code" (string):代码 @@ -42,13 +42,36 @@ class CommonController extends Controller * - "img_url" (string):车图片url地址 * - "car_name" (string):车名称 */ - public function pageList($modelname, $map = '', $orderby = '', $field = '', $listRows = 15) + public function pageList($modelname, $where = '', $orderby = '', $field = '*', $listRows = 30) { - $orderby = !empty($orderby) ? $orderby : $orderby = ['id', 'desc']; - - // 查询满足的数据,并且每页显示15条数据 - $voList = DB::table($modelname)->where($map)->orderBy($orderby[0], $orderby[1])->paginate($listRows); + $model = \DB::table($modelname); + + //查询条件 + if(!empty($where)){$model = $model->where($where);} - return $voList; + //排序 + if($orderby!='') + { + if(count($orderby) == count($orderby, 1)) + { + $model = $model->orderBy($orderby[0], $orderby[1]); + } + else + { + foreach($orderby as $row) + { + $model = $model->orderBy($row[0], $row[1]); + } + } + } + else + { + $model = $model->orderBy('id', 'desc'); + } + + //要返回的字段 + if($field!='*'){$model = $model->select(\DB::raw($field));} + + return $model->paginate($listRows); } } diff --git a/app/Http/Controllers/Admin/FriendlinkController.php b/app/Http/Controllers/Admin/FriendlinkController.php new file mode 100644 index 0000000..c010635 --- /dev/null +++ b/app/Http/Controllers/Admin/FriendlinkController.php @@ -0,0 +1,80 @@ +insert($_POST)) + { + success_jump('添加成功!', route('admin_friendlink')); + } + else + { + error_jump('添加失败!请修改后重新添加'); + } + } + + public function edit() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['id'] = $id; + $data['post'] = object_to_array(DB::table('friendlink')->where('id', $id)->first(), 1); + + return view('admin.friendlink.edit', $data); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;} + + unset($_POST["_token"]); + if(DB::table('friendlink')->where('id', $id)->update($_POST)) + { + success_jump('修改成功!', route('admin_friendlink')); + } + else + { + error_jump('修改失败!'); + } + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$this->error('删除失败!请重新提交',FLADMIN.'/Friendlink' , 3);} //if(preg_match('/[0-9]*/',$id)){}else{exit;} + + if(DB::table('friendlink')->whereIn("id", explode(',', $id))->delete()) + { + success_jump('删除成功'); + } + else + { + error_jump('删除失败!请重新提交'); + } + } +} diff --git a/app/Http/Controllers/Admin/GuestbookController.php b/app/Http/Controllers/Admin/GuestbookController.php new file mode 100644 index 0000000..66b550f --- /dev/null +++ b/app/Http/Controllers/Admin/GuestbookController.php @@ -0,0 +1,49 @@ +where('title', 'like', '%'.$_REQUEST['keyword'].'%'); + } + }; + + $data['posts'] = parent::pageList('guestbook', $where); + + return view('admin.guestbook.index', $data); + } + + public function edit() + { + $data['post'] = object_to_array(DB::table('guestbook')->where('id', 1)->first()); + + return view('admin.guestbook.edit', $data); + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump("删除失败!请重新提交");} + + if(DB::table("guestbook")->whereIn("id", explode(',', $id))->delete()) + { + success_jump("$id ,删除成功"); + } + else + { + error_jump("$id ,删除失败!请重新提交"); + } + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Admin/IndexController.php b/app/Http/Controllers/Admin/IndexController.php index e84331d..61570d3 100644 --- a/app/Http/Controllers/Admin/IndexController.php +++ b/app/Http/Controllers/Admin/IndexController.php @@ -18,18 +18,14 @@ class IndexController extends CommonController //更新配置 public function upconfig() { - updateconfig(); + cache()->forget('sysconfig'); //删除缓存 + success_jump('更新成功!', route('admin_sysconfig')); } //更新缓存 public function upcache() { - - } - - //页面跳转 - public function jump() - { - return view('admin.index.jump'); + cache()->forget('sysconfig'); //删除缓存 + success_jump('更新成功!', route('admin_sysconfig')); } } diff --git a/app/Http/Controllers/Admin/KeywordController.php b/app/Http/Controllers/Admin/KeywordController.php new file mode 100644 index 0000000..d709ece --- /dev/null +++ b/app/Http/Controllers/Admin/KeywordController.php @@ -0,0 +1,78 @@ +insert($_POST)) + { + success_jump("添加成功!", route('admin_keyword')); + } + else + { + error_jump('添加失败!请修改后重新添加'); + } + } + + public function edit() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['id'] = $id; + $data['post'] = object_to_array(DB::table('keyword')->where('id', $id)->first(), 1); + + return view('admin.keyword.edit', $data); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;} + + unset($_POST["_token"]); + if(DB::table('keyword')->where('id', $id)->update($_POST)) + { + success_jump('修改成功!', route('admin_keyword')); + } + else + { + error_jump('修改失败!'); + } + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');} + + if(DB::table("keyword")->whereIn("id", explode(',', $id))->delete()) + { + success_jump('删除成功'); + } + else + { + error_jump('删除失败!请重新提交'); + } + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Admin/LoginController.php b/app/Http/Controllers/Admin/LoginController.php index 40d9eb7..fcc2eed 100644 --- a/app/Http/Controllers/Admin/LoginController.php +++ b/app/Http/Controllers/Admin/LoginController.php @@ -9,6 +9,12 @@ use Log; class LoginController extends BaseController { + //页面跳转 + public function jump() + { + return view('admin.index.jump'); + } + /** * 登录页面 */ diff --git a/app/Http/Controllers/Admin/ProductController.php b/app/Http/Controllers/Admin/ProductController.php new file mode 100644 index 0000000..62db627 --- /dev/null +++ b/app/Http/Controllers/Admin/ProductController.php @@ -0,0 +1,181 @@ +$value) + { + $info = db('product_type')->field('content',true)->where("id=".$value['typeid'])->find(); + $value['typename'] = $info['typename']; + $posts[] = $value; + } + + $this->assign('page',$prolist->render()); + $this->assign('posts',$posts); + + return $this->fetch(); + } + + public function add() + { + if(!empty($_GET["catid"])){$this->assign('catid',$_GET["catid"]);}else{$this->assign('catid',0);} + + return $this->fetch(); + } + + public function doadd() + { + $litpic="";if(!empty($_POST["litpic"])){$litpic = $_POST["litpic"];}else{$_POST['litpic']="";} //缩略图 + if(empty($_POST["description"])){if(!empty($_POST["body"])){$_POST['description']=cut_str($_POST["body"]);}} //description + $_POST['addtime'] = $_POST['pubdate'] = time(); //添加&更新时间 + $_POST['user_id'] = session('admin_user_info')['id']; // 发布者id + + //关键词 + if(!empty($_POST["keywords"])) + { + $_POST['keywords']=str_replace(",",",",$_POST["keywords"]); + } + else + { + if(!empty($_POST["title"])) + { + $title=$_POST["title"]; + $title=str_replace(",","",$title); + $title=str_replace(",","",$title); + $_POST['keywords']=get_keywords($title);//标题分词 + } + } + + if(isset($_POST['editorValue'])){unset($_POST['editorValue']);} + + if(db('product')->insert($_POST)) + { + $this->success('添加成功!', FLADMIN.'/Product' , 1); + } + else + { + $this->error('添加失败!请修改后重新添加', FLADMIN.'/Product/add' , 3); + } + } + + public function edit() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else {$id="";}if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $this->assign('id',$id); + $this->assign('post',db('product')->where("id=$id")->find()); + + return $this->fetch(); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];}else {$id="";exit;} + + $litpic="";if(!empty($_POST["litpic"])){$litpic = $_POST["litpic"];}else{$_POST['litpic']="";} //缩略图 + if(empty($_POST["description"])){if(!empty($_POST["body"])){$_POST['description']=cut_str($_POST["body"]);}}//description + $_POST['pubdate'] = time();//更新时间 + $_POST['user_id'] = session('admin_user_info')['id']; // 修改者id + + //关键词 + if(!empty($_POST["keywords"])) + { + $_POST['keywords']=str_replace(",",",",$_POST["keywords"]); + } + else + { + if(!empty($_POST["title"])) + { + $title=$_POST["title"]; + $title=str_replace(",","",$title); + $title=str_replace(",","",$title); + $_POST['keywords']=get_keywords($title);//标题分词 + } + } + + if(isset($_POST['editorValue'])){unset($_POST['editorValue']);} + + if(db('product')->where("id=$id")->update($_POST)) + { + $this->success('修改成功!', FLADMIN.'/Product' , 1); + } + else + { + $this->error('修改失败!', FLADMIN.'/Product/edit?id='.$_POST["id"] , 3); + } + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$this->error('删除失败!请重新提交',FLADMIN.'/Product' , 3);}if(preg_match('/[0-9]*/',$id)){}else{exit;} + + if(db('product')->where("id in ($id)")->delete()) + { + $this->success("$id ,删除成功", FLADMIN.'/Product' , 1); + } + else + { + $this->error("$id ,删除失败!请重新提交", FLADMIN.'/Product', 3); + } + } + + //商品推荐 + public function recommendarc() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$this->error('删除失败!请重新提交',FLADMIN.'/Product' , 3);} //if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['tuijian'] = 1; + + if(db('product')->where("id in ($id)")->update($data)) + { + $this->success("$id ,推荐成功", FLADMIN.'/Product', 1); + } + else + { + $this->error("$id ,推荐失败!请重新提交", FLADMIN.'/Product', 3); + } + } + + //商品是否存在 + public function productexists() + { + if(!empty($_GET["title"])) + { + $map['title'] = $_GET["title"]; + } + else + { + $map['title']=""; + } + + if(!empty($_GET["id"])) + { + $map['id'] = array('NEQ',$_GET["id"]); + } + + return db('product')->where($map)->count(); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Admin/ProducttypeController.php b/app/Http/Controllers/Admin/ProducttypeController.php new file mode 100644 index 0000000..980656a --- /dev/null +++ b/app/Http/Controllers/Admin/ProducttypeController.php @@ -0,0 +1,115 @@ +assign('catlist',tree(get_category('product_type',0))); + + return $this->fetch(); + } + + public function add() + { + if(!empty($_GET["reid"])) + { + $id = $_GET["reid"]; + if(preg_match('/[0-9]*/',$id)){}else{exit;} + if($id!=0) + { + $this->assign('postone',db("product_type")->field('content',true)->where("id=$id")->find()); + } + $this->assign('id',$id); + } + else + { + $this->assign('id',0); + } + + return $this->fetch(); + } + + public function doadd() + { + if(isset($_POST["prid"])){if($_POST["prid"]=="top"){$_POST['reid']=0;}else{$_POST['reid'] = $_POST["prid"];}unset($_POST["prid"]);}//父级栏目id + $_POST['addtime'] = time();//添加时间 + + if(db("product_type")->insert($_POST)) + { + $this->success('添加成功!', FLADMIN.'/Producttype' , 1); + } + else + { + $this->error('添加失败!请修改后重新添加', FLADMIN.'/Producttype' , 3); + } + } + + public function edit() + { + $id = $_GET["id"];if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $this->assign('id',$id); + $post = db("product_type")->where("id=$id")->find(); + $reid = $post['reid']; + if($reid!=0){$this->assign('postone',db("product_type")->where("id=$reid")->find());} + $this->assign('post',$post); + + return $this->fetch(); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else{$id="";exit;} + $_POST['addtime'] = time();//添加时间 + + if(db("product_type")->where("id=$id")->update($_POST)) + { + $this->success('修改成功!', FLADMIN.'/Producttype' , 1); + } + else + { + $this->error('修改失败!请修改后重新添加', FLADMIN.'/Producttype/edit?id='.$_POST["id"] , 3); + } + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$this->error('删除失败!请重新提交',FLADMIN.'/Producttype' , 3);} + + if(db("product_type")->where("reid=$id")->find()) + { + $this->error('删除失败!请先删除子分类', FLADMIN.'/Producttype', 3); + } + else + { + if(db("product_type")->where("id=$id")->delete()) + { + if(db("product")->where("typeid=$id")->count()>0) //判断该分类下是否有商品,如果有把该分类下的商品也一起删除 + { + if(db("product")->where("typeid=$id")->delete()) + { + $this->success('删除成功', FLADMIN.'/Producttype' , 1); + } + else + { + $this->error('分类下的商品删除失败!', FLADMIN.'/Producttype', 3); + } + } + else + { + $this->success('删除成功', FLADMIN.'/Producttype' , 1); + } + } + else + { + $this->error('删除失败!请重新提交', FLADMIN.'/Producttype', 3); + } + } + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Admin/SearchController.php b/app/Http/Controllers/Admin/SearchController.php new file mode 100644 index 0000000..6a75a03 --- /dev/null +++ b/app/Http/Controllers/Admin/SearchController.php @@ -0,0 +1,81 @@ +assign('page',$list->render()); + $this->assign('posts',$list); + + return $this->fetch(); + } + + public function doadd() + { + $_POST['pubdate'] = time();//更新时间 + $_POST['click'] = rand(200,500);//点击 + + if(db('search')->insert($_POST)) + { + $this->success('添加成功!', FLADMIN.'/Search' , 1); + } + else + { + $this->error('添加失败!请修改后重新添加', FLADMIN.'/Search/add' , 3); + } + } + + public function add() + { + return $this->fetch(); + } + + public function edit() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $this->assign('id',$id); + $this->assign('row',db('search')->where("id=$id")->find()); + + return $this->fetch(); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else{$id="";exit;} + if(!empty($_POST["keywords"])){$_POST['keywords']=str_replace(",",",",$_POST["keywords"]);}else{$_POST['keywords']="";}//关键词 + $_POST['pubdate'] = time();//更新时间 + + if(db('search')->where("id=$id")->update($_POST)) + { + $this->success('修改成功!', FLADMIN.'/Search' , 1); + } + else + { + $this->error('修改失败!', FLADMIN.'/Search/edit?id='.$_POST["id"] , 3); + } + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$this->error('删除失败!请重新提交',FLADMIN.'/Search' , 3);} //if(preg_match('/[0-9]*/',$id)){}else{exit;} + + if(db("search")->where("id in ($id)")->delete()) + { + $this->success('删除成功', FLADMIN.'/Search' , 1); + } + else + { + $this->error('删除失败!请重新提交', FLADMIN.'/Search', 3); + } + } +} diff --git a/app/Http/Controllers/Admin/SearchwordController.php b/app/Http/Controllers/Admin/SearchwordController.php new file mode 100644 index 0000000..fcfef9e --- /dev/null +++ b/app/Http/Controllers/Admin/SearchwordController.php @@ -0,0 +1,87 @@ +insertGetId($_POST)) + { + success_jump('添加成功!', route('admin_searchword')); + } + else + { + error_jump('添加失败!请修改后重新添加'); + } + } + + public function edit() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['id'] = $id; + $data['post'] = object_to_array(DB::table('searchword')->where('id',$id)->first(), 1); + + return view('admin.searchword.edit', $data); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else{$id="";exit;} + if(!empty($_POST["keywords"])){$_POST['keywords']=str_replace(",",",",$_POST["keywords"]);}else{$_POST['keywords']="";}//关键词 + $_POST['pubdate'] = time();//更新时间 + + unset($_POST["_token"]); + if(isset($_POST['editorValue'])){unset($_POST['editorValue']);} + + if(DB::table('searchword')->where('id', $id)->update($_POST)) + { + success_jump('修改成功!', route('admin_searchword')); + } + else + { + error_jump('修改失败!'); + } + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');} + + if(DB::table("searchword")->whereIn("id", explode(',', $id))->delete()) + { + success_jump('删除成功'); + } + else + { + error_jump('删除失败!请重新提交'); + } + } +} diff --git a/app/Http/Controllers/Admin/SlideController.php b/app/Http/Controllers/Admin/SlideController.php new file mode 100644 index 0000000..1bd0a87 --- /dev/null +++ b/app/Http/Controllers/Admin/SlideController.php @@ -0,0 +1,82 @@ +insert($_POST)) + { + success_jump('添加成功!', route('admin_slide')); + } + else + { + error_jump('添加失败!请修改后重新添加'); + } + } + + public function edit() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['id'] = $id; + $data['post'] = object_to_array(DB::table('slide')->where('id', $id)->first(), 1); + + return view('admin.slide.edit', $data); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else{$id="";exit;} + + if(isset($_POST['editorValue'])){unset($_POST['editorValue']);} + unset($_POST["_token"]); + + if(DB::table('slide')->where('id', $id)->update($_POST)) + { + success_jump('修改成功!', route('admin_slide')); + } + else + { + error_jump('修改失败!'); + } + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');} + + if(DB::table('slide')->whereIn("id", explode(',', $id))->delete()) + { + success_jump('删除成功'); + } + else + { + error_jump('删除失败!请重新提交'); + } + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Admin/SysconfigController.php b/app/Http/Controllers/Admin/SysconfigController.php new file mode 100644 index 0000000..d8b3ec1 --- /dev/null +++ b/app/Http/Controllers/Admin/SysconfigController.php @@ -0,0 +1,107 @@ +insert($_POST)) + { + cache()->forget('sysconfig'); //删除缓存 + success_jump('添加成功!', route('admin_sysconfig')); + } + else + { + error_jump('添加失败!请修改后重新添加'); + } + } + + //修改参数,视图 + public function edit() + { + if(!empty($_REQUEST["id"])){$id = $_REQUEST["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['id'] = $id; + $data['post'] = object_to_array(DB::table('sysconfig')->where('id', $id)->first(), 1); + + return view('admin.sysconfig.edit', $data); + } + + public function doedit() + { + if(isset($_POST["id"]) && !empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else{$id="";exit;} + + //参数名称 + if(!empty($_POST["varname"])) + { + if(!preg_match("/^CMS_[a-z]+$/i", $_POST["varname"])) + { + error_jump('更新失败!参数名称不正确');exit; + } + } + else + { + error_jump('更新失败!参数名称不能为空');exit; + } + + unset($_POST["_token"]); + if(DB::table('sysconfig')->where('id', $id)->update($_POST)) + { + cache()->forget('sysconfig'); //删除缓存 + success_jump('更新成功!', route('admin_sysconfig')); + } + else + { + error_jump('更新失败!请修改后重新提交'); + } + } + + public function del() + { + if(!empty($_REQUEST["id"])){$id = $_REQUEST["id"];}else{error_jump('删除失败!请重新提交');} + + if(DB::table("sysconfig")->whereIn("id", explode(',', $id))->delete()) + { + success_jump('删除成功'); + } + else + { + error_jump('删除失败!请重新提交'); + } + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Admin/TagController.php b/app/Http/Controllers/Admin/TagController.php new file mode 100644 index 0000000..25889d5 --- /dev/null +++ b/app/Http/Controllers/Admin/TagController.php @@ -0,0 +1,149 @@ +insertGetId($_POST)) + { + if($tagarc!="") + { + $arr=explode(",",$tagarc); + + foreach($arr as $row) + { + $data2['tid'] = $insertId; + $data2['aid'] = $row; + DB::table("taglist")->insert($data2); + } + } + + success_jump('添加成功!', route('admin_tag')); + } + else + { + error_jump('添加失败!请修改后重新添加'); + } + } + + public function edit() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['id'] = $id; + $data['post'] = object_to_array(DB::table('tagindex')->where('id',$id)->first(), 1); + + //获取该标签下的文章id + $posts = object_to_array(DB::table('taglist')->select('aid')->where('tid', $id)->get()); + $aidlist = ""; + if(!empty($posts)) + { + foreach($posts as $row) + { + $aidlist = $aidlist.','.$row['aid']; + } + } + + $data['aidlist'] = ltrim($aidlist, ","); + + return view('admin.tag.edit', $data); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else{$id="";exit;} + if(!empty($_POST["keywords"])){$_POST['keywords']=str_replace(",",",",$_POST["keywords"]);}else{$_POST['keywords']="";}//关键词 + $_POST['pubdate'] = time();//更新时间 + $tagarc=""; + if(!empty($_POST["tagarc"])){$tagarc = str_replace(",",",",$_POST["tagarc"]);if(!preg_match("/^\d*$/",str_replace(",","",$tagarc))){$tagarc="";}} //Tag文章列表 + + unset($_POST["tagarc"]); + unset($_POST["_token"]); + if(isset($_POST['editorValue'])){unset($_POST['editorValue']);} + + if(DB::table('tagindex')->where('id', $id)->update($_POST)) + { + //获取该标签下的文章id + $posts = object_to_array(DB::table("taglist")->select('aid')->where('tid', $id)->get()); + $aidlist = ""; + if(!empty($posts)) + { + foreach($posts as $row) + { + $aidlist = $aidlist.','.$row['aid']; + } + } + $aidlist = ltrim($aidlist, ","); + + if($tagarc!="" && $tagarc!=$aidlist) + { + DB::table("taglist")->where('tid', $id)->delete(); + + $arr=explode(",",$tagarc); + + foreach($arr as $row) + { + $data2['tid'] = $id; + $data2['aid'] = $row; + DB::table("taglist")->insert($data2); + } + } + elseif($tagarc=="") + { + DB::table("taglist")->where('tid', $id)->delete(); + } + + success_jump('修改成功!', route('admin_tag')); + } + else + { + error_jump('修改失败!'); + } + } + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');} //if(preg_match('/[0-9]*/',$id)){}else{exit;} + + if(DB::table("tagindex")->whereIn("id", explode(',', $id))->delete()) + { + success_jump('删除成功'); + } + else + { + error_jump('删除失败!请重新提交'); + } + } +} diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php new file mode 100644 index 0000000..0ae840d --- /dev/null +++ b/app/Http/Controllers/Admin/UserController.php @@ -0,0 +1,49 @@ +where('id', 1)->first(), 1); + + return view('admin.user.edit', $data); + } + + public function doedit() + { + if(!empty($_POST["username"])){$data['username'] = $map['username'] = $_POST["username"];}else{error_jump('用户名不能为空');exit;}//用户名 + if(!empty($_POST["oldpwd"])){$map['pwd'] = md5($_POST["oldpwd"]);}else{error_jump('旧密码错误');exit;} + if($_POST["newpwd"]==$_POST["newpwd2"]){$data['pwd'] = md5($_POST["newpwd"]);}else{error_jump('密码错误');exit;} + if($_POST["oldpwd"]==$_POST["newpwd"]){error_jump('新旧密码不能一致!');exit;} + + $User = object_to_array(DB::table("user")->where($map)->first(), 1); + + if($User) + { + if(DB::table('user')->where('id', 1)->update($data)) + { + session_unset(); + session_destroy(); + success_jump('修改成功,请重新登录', route('admin_login'), 3); + } + } + else + { + error_jump('修改失败!旧用户名或密码错误'); + } + } +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index 186696b..d46d9a0 100644 --- a/composer.lock +++ b/composer.lock @@ -605,16 +605,16 @@ }, { "name": "laravel/framework", - "version": "v5.4.23", + "version": "v5.4.24", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ad82327705658dbf5f0ce72805caa950dfbe150d" + "reference": "ec8548db26c1b147570f661128649e98f3ac0f29" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/laravel/framework/ad82327705658dbf5f0ce72805caa950dfbe150d.zip", - "reference": "ad82327705658dbf5f0ce72805caa950dfbe150d", + "url": "https://files.phpcomposer.com/files/laravel/framework/ec8548db26c1b147570f661128649e98f3ac0f29.zip", + "reference": "ec8548db26c1b147570f661128649e98f3ac0f29", "shasum": "" }, "require": { @@ -730,7 +730,7 @@ "framework", "laravel" ], - "time": "2017-05-11T20:10:35+00:00" + "time": "2017-05-30T12:44:32+00:00" }, { "name": "laravel/tinker", @@ -1776,16 +1776,16 @@ }, { "name": "symfony/console", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38" + "reference": "c80e63f3f5e3a331bfc25e6e9332b10422eb9b05" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/console/a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38.zip", - "reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38", + "url": "https://files.phpcomposer.com/files/symfony/console/c80e63f3f5e3a331bfc25e6e9332b10422eb9b05.zip", + "reference": "c80e63f3f5e3a331bfc25e6e9332b10422eb9b05", "shasum": "" }, "require": { @@ -1793,10 +1793,15 @@ "symfony/debug": "~2.8|~3.0", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, "require-dev": { "psr/log": "~1.0", + "symfony/dependency-injection": "~3.3", "symfony/event-dispatcher": "~2.8|~3.0", "symfony/filesystem": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", "symfony/process": "~2.8|~3.0" }, "suggest": { @@ -1808,7 +1813,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1835,20 +1840,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-04-26T01:39:17+00:00" + "time": "2017-05-28T14:08:56+00:00" }, { "name": "symfony/css-selector", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "02983c144038e697c959e6b06ef6666de759ccbc" + "reference": "4d882dced7b995d5274293039370148e291808f2" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/css-selector/02983c144038e697c959e6b06ef6666de759ccbc.zip", - "reference": "02983c144038e697c959e6b06ef6666de759ccbc", + "url": "https://files.phpcomposer.com/files/symfony/css-selector/4d882dced7b995d5274293039370148e291808f2.zip", + "reference": "4d882dced7b995d5274293039370148e291808f2", "shasum": "" }, "require": { @@ -1857,7 +1862,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1888,20 +1893,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-05-01T14:55:58+00:00" + "time": "2017-05-01T15:01:29+00:00" }, { "name": "symfony/debug", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686" + "reference": "ef5f19a7a68075a0bd05969a329ead3b0776fb7a" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/debug/fd6eeee656a5a7b384d56f1072243fe1c0e81686.zip", - "reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686", + "url": "https://files.phpcomposer.com/files/symfony/debug/ef5f19a7a68075a0bd05969a329ead3b0776fb7a.zip", + "reference": "ef5f19a7a68075a0bd05969a329ead3b0776fb7a", "shasum": "" }, "require": { @@ -1912,13 +1917,12 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.8|~3.0", "symfony/http-kernel": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1945,29 +1949,32 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-04-19T20:17:50+00:00" + "time": "2017-05-27T16:02:27+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b8a401f733b43251e1d088c589368b2a94155e40" + "reference": "a9f8b02b0ef07302eca92cd4bba73200b7980e9c" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/event-dispatcher/b8a401f733b43251e1d088c589368b2a94155e40.zip", - "reference": "b8a401f733b43251e1d088c589368b2a94155e40", + "url": "https://files.phpcomposer.com/files/symfony/event-dispatcher/a9f8b02b0ef07302eca92cd4bba73200b7980e9c.zip", + "reference": "a9f8b02b0ef07302eca92cd4bba73200b7980e9c", "shasum": "" }, "require": { "php": ">=5.5.9" }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", "symfony/expression-language": "~2.8|~3.0", "symfony/stopwatch": "~2.8|~3.0" }, @@ -1978,7 +1985,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2005,20 +2012,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-05-01T14:58:48+00:00" + "time": "2017-05-04T12:23:07+00:00" }, { "name": "symfony/finder", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9cf076f8f492f4b1ffac40aae9c2d287b4ca6930" + "reference": "30cb2a2c09627823a7243638dd456de4e2748fed" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/finder/9cf076f8f492f4b1ffac40aae9c2d287b4ca6930.zip", - "reference": "9cf076f8f492f4b1ffac40aae9c2d287b4ca6930", + "url": "https://files.phpcomposer.com/files/symfony/finder/30cb2a2c09627823a7243638dd456de4e2748fed.zip", + "reference": "30cb2a2c09627823a7243638dd456de4e2748fed", "shasum": "" }, "require": { @@ -2027,7 +2034,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2054,20 +2061,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:13:17+00:00" + "time": "2017-05-25T23:10:31+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "9de6add7f731e5af7f5b2e9c0da365e43383ebef" + "reference": "a3272c06d538bd48261e7d83308e7f84992d4ec8" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/http-foundation/9de6add7f731e5af7f5b2e9c0da365e43383ebef.zip", - "reference": "9de6add7f731e5af7f5b2e9c0da365e43383ebef", + "url": "https://files.phpcomposer.com/files/symfony/http-foundation/a3272c06d538bd48261e7d83308e7f84992d4ec8.zip", + "reference": "a3272c06d538bd48261e7d83308e7f84992d4ec8", "shasum": "" }, "require": { @@ -2080,7 +2087,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2107,20 +2114,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-05-01T14:55:58+00:00" + "time": "2017-05-25T13:39:26+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "46e8b209abab55c072c47d72d5cd1d62c0585e05" + "reference": "4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/http-kernel/46e8b209abab55c072c47d72d5cd1d62c0585e05.zip", - "reference": "46e8b209abab55c072c47d72d5cd1d62c0585e05", + "url": "https://files.phpcomposer.com/files/symfony/http-kernel/4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed.zip", + "reference": "4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed", "shasum": "" }, "require": { @@ -2128,18 +2135,21 @@ "psr/log": "~1.0", "symfony/debug": "~2.8|~3.0", "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/http-foundation": "~2.8.13|~3.1.6|~3.2" + "symfony/http-foundation": "~3.3" }, "conflict": { - "symfony/config": "<2.8" + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.3", + "symfony/var-dumper": "<3.3" }, "require-dev": { + "psr/cache": "~1.0", "symfony/browser-kit": "~2.8|~3.0", "symfony/class-loader": "~2.8|~3.0", "symfony/config": "~2.8|~3.0", "symfony/console": "~2.8|~3.0", "symfony/css-selector": "~2.8|~3.0", - "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", "symfony/dom-crawler": "~2.8|~3.0", "symfony/expression-language": "~2.8|~3.0", "symfony/finder": "~2.8|~3.0", @@ -2148,7 +2158,7 @@ "symfony/stopwatch": "~2.8|~3.0", "symfony/templating": "~2.8|~3.0", "symfony/translation": "~2.8|~3.0", - "symfony/var-dumper": "~3.2" + "symfony/var-dumper": "~3.3" }, "suggest": { "symfony/browser-kit": "", @@ -2162,7 +2172,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2189,7 +2199,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-05-01T17:46:48+00:00" + "time": "2017-05-29T21:02:12+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -2360,16 +2370,16 @@ }, { "name": "symfony/process", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0" + "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/process/999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0.zip", - "reference": "999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0", + "url": "https://files.phpcomposer.com/files/symfony/process/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf.zip", + "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf", "shasum": "" }, "require": { @@ -2378,7 +2388,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2405,7 +2415,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:13:17+00:00" + "time": "2017-05-22T12:32:03+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -2469,32 +2479,35 @@ }, { "name": "symfony/routing", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "5029745d6d463585e8b487dbc83d6333f408853a" + "reference": "3aa0c7d759a2c88f4dff47c3d6776e7380bb2c9a" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/routing/5029745d6d463585e8b487dbc83d6333f408853a.zip", - "reference": "5029745d6d463585e8b487dbc83d6333f408853a", + "url": "https://files.phpcomposer.com/files/symfony/routing/3aa0c7d759a2c88f4dff47c3d6776e7380bb2c9a.zip", + "reference": "3aa0c7d759a2c88f4dff47c3d6776e7380bb2c9a", "shasum": "" }, "require": { "php": ">=5.5.9" }, "conflict": { - "symfony/config": "<2.8" + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.3", + "symfony/yaml": "<3.3" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/common": "~2.2", "psr/log": "~1.0", "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", "symfony/expression-language": "~2.8|~3.0", "symfony/http-foundation": "~2.8|~3.0", - "symfony/yaml": "~2.8|~3.0" + "symfony/yaml": "~3.3" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -2507,7 +2520,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2540,20 +2553,20 @@ "uri", "url" ], - "time": "2017-04-12T14:13:17+00:00" + "time": "2017-05-24T11:35:23+00:00" }, { "name": "symfony/translation", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "f4a04d2df710f81515df576b2de06bdeee518b83" + "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/translation/f4a04d2df710f81515df576b2de06bdeee518b83.zip", - "reference": "f4a04d2df710f81515df576b2de06bdeee518b83", + "url": "https://files.phpcomposer.com/files/symfony/translation/dc3b2a0c6cfff60327ba1c043a82092735397543.zip", + "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543", "shasum": "" }, "require": { @@ -2561,13 +2574,14 @@ "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/config": "<2.8" + "symfony/config": "<2.8", + "symfony/yaml": "<3.3" }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~2.8|~3.0", "symfony/intl": "^2.8.18|^3.2.5", - "symfony/yaml": "~2.8|~3.0" + "symfony/yaml": "~3.3" }, "suggest": { "psr/log": "To use logging capability in translator", @@ -2577,7 +2591,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2604,20 +2618,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:13:17+00:00" + "time": "2017-05-22T07:42:36+00:00" }, { "name": "symfony/var-dumper", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "fa47963ac7979ddbd42b2d646d1b056bddbf7bb8" + "reference": "568ce40d88b14f6b42aa48f50572cc4427be9757" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/var-dumper/fa47963ac7979ddbd42b2d646d1b056bddbf7bb8.zip", - "reference": "fa47963ac7979ddbd42b2d646d1b056bddbf7bb8", + "url": "https://files.phpcomposer.com/files/symfony/var-dumper/568ce40d88b14f6b42aa48f50572cc4427be9757.zip", + "reference": "568ce40d88b14f6b42aa48f50572cc4427be9757", "shasum": "" }, "require": { @@ -2638,7 +2652,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2672,7 +2686,7 @@ "debug", "dump" ], - "time": "2017-05-01T14:55:58+00:00" + "time": "2017-05-22T17:32:12+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -4141,16 +4155,16 @@ }, { "name": "symfony/yaml", - "version": "v3.2.8", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6" + "reference": "885db865f6b2b918404a1fae28f9ac640f71f994" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/yaml/acec26fcf7f3031e094e910b94b002fa53d4e4d6.zip", - "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6", + "url": "https://files.phpcomposer.com/files/symfony/yaml/885db865f6b2b918404a1fae28f9ac640f71f994.zip", + "reference": "885db865f6b2b918404a1fae28f9ac640f71f994", "shasum": "" }, "require": { @@ -4165,7 +4179,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -4192,7 +4206,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-05-01T14:55:58+00:00" + "time": "2017-05-28T10:56:20+00:00" }, { "name": "webmozart/assert", diff --git a/resources/views/admin/common/leftmenu.blade.php b/resources/views/admin/common/leftmenu.blade.php index f1d09de..498ba7a 100644 --- a/resources/views/admin/common/leftmenu.blade.php +++ b/resources/views/admin/common/leftmenu.blade.php @@ -11,7 +11,7 @@
ID | +标题 | +留言时间 | +内容 | 操作 | +
---|---|---|---|---|
id; ?> | +title; ?> | +addtime); ?> | +msg; ?> | 删除 | +