Browse Source

Merge branch '1.0' of https://github.com/Fanli2012/lqycms into 1.0

master
林一峰 8 years ago
parent
commit
0461af8d8c
  1. 6
      app/Common/function.php
  2. 4
      app/Http/Controllers/Admin/ArticleController.php
  3. 19
      app/Http/Controllers/Admin/CategoryController.php
  4. 2
      app/Http/Controllers/Admin/FriendlinkController.php
  5. 83
      app/Http/Controllers/Admin/MenuController.php
  6. 4
      app/Http/Controllers/Admin/ProductController.php
  7. 20
      app/Http/Controllers/Admin/ProducttypeController.php
  8. 72
      app/Http/Controllers/Admin/UserController.php
  9. 80
      app/Http/Controllers/Admin/UserRoleController.php
  10. 8
      app/Http/Controllers/Home/IndexController.php
  11. 4
      resources/views/admin/article/add.blade.php
  12. 4
      resources/views/admin/article/edit.blade.php
  13. 6
      resources/views/admin/article/index.blade.php
  14. 4
      resources/views/admin/category/add.blade.php
  15. 2
      resources/views/admin/category/edit.blade.php
  16. 4
      resources/views/admin/category/index.blade.php
  17. 7
      resources/views/admin/common/leftmenu.blade.php
  18. 2
      resources/views/admin/friendlink/index.blade.php
  19. 2
      resources/views/admin/guestbook/index.blade.php
  20. 2
      resources/views/admin/keyword/index.blade.php
  21. 91
      resources/views/admin/menu/add.blade.php
  22. 95
      resources/views/admin/menu/edit.blade.php
  23. 30
      resources/views/admin/menu/index.blade.php
  24. 4
      resources/views/admin/product/add.blade.php
  25. 8
      resources/views/admin/product/edit.blade.php
  26. 6
      resources/views/admin/product/index.blade.php
  27. 4
      resources/views/admin/producttype/add.blade.php
  28. 2
      resources/views/admin/producttype/edit.blade.php
  29. 2
      resources/views/admin/producttype/index.blade.php
  30. 2
      resources/views/admin/searchword/index.blade.php
  31. 2
      resources/views/admin/slide/index.blade.php
  32. 2
      resources/views/admin/sysconfig/index.blade.php
  33. 2
      resources/views/admin/tag/index.blade.php
  34. 68
      resources/views/admin/user/add.blade.php
  35. 83
      resources/views/admin/user/edit.blade.php
  36. 58
      resources/views/admin/user/edit222.blade.php
  37. 24
      resources/views/admin/user/index.blade.php
  38. 65
      resources/views/admin/userrole/add.blade.php
  39. 65
      resources/views/admin/userrole/edit.blade.php
  40. 30
      resources/views/admin/userrole/index.blade.php
  41. 4
      resources/views/home/common/header.blade.php
  42. 2
      resources/views/home/index/category.blade.php
  43. 4
      resources/views/home3/common/header.blade.php
  44. 4
      resources/views/home3/index/product.blade.php
  45. 6
      resources/views/home3/index/productcat.blade.php
  46. 37
      routes/web.php

6
app/Common/function.php

@ -623,7 +623,7 @@ function get_category($modelname, $parent_id=0, $pad=0)
{
$arr=array();
$temp = \DB::table($modelname)->where('reid', $parent_id)->orderBy('id', 'asc')->get();
$temp = \DB::table($modelname)->where('pid', $parent_id)->orderBy('id', 'asc')->get();
$cats = object_to_array($temp);
if($cats)
@ -649,11 +649,11 @@ function category_tree($list,$pid=0)
{
foreach($list as $v)
{
$temp[] = array("id"=>$v['id'],"deep"=>$v['deep'],"typename"=>$v['typename'],"reid"=>$v['reid'],"typedir"=>$v['typedir'],"addtime"=>$v['addtime']);
$temp[] = array("id"=>$v['id'],"deep"=>$v['deep'],"name"=>$v['name'],"pid"=>$v['pid']);
//echo $v['id'];
if(array_key_exists("child",$v))
{
category_tree($v['child'],$v['reid']);
category_tree($v['child'],$v['pid']);
}
}
}

4
app/Http/Controllers/Admin/ArticleController.php

@ -39,8 +39,8 @@ class ArticleController extends CommonController
$posts = parent::pageList('article', $where);
foreach($posts as $key=>$value)
{
$info = DB::table('arctype')->select('typename')->where("id", $value->typeid)->first();
$posts[$key]->typename = $info->typename;
$info = DB::table('arctype')->select('name')->where("id", $value->typeid)->first();
$posts[$key]->name = $info->name;
$posts[$key]->body = '';
}

19
app/Http/Controllers/Admin/CategoryController.php

@ -13,7 +13,20 @@ class CategoryController extends CommonController
public function index()
{
return view('admin.category.index');
$catlist = category_tree(get_category('arctype',0));
if($catlist)
{
foreach($catlist as $k=>$v)
{
$arctype = DB::table("arctype")->where('id', $v['id'])->first();
$catlist[$k]['typedir'] = $arctype->typedir;
$catlist[$k]['addtime'] = $arctype->addtime;
}
}
$data['catlist'] = $catlist;
return view('admin.category.index', $data);
}
public function add()
@ -39,7 +52,7 @@ class CategoryController extends CommonController
public function doadd()
{
if(!empty($_POST["prid"])){if($_POST["prid"]=="top"){$_POST['reid']=0;}else{$_POST['reid'] = $_POST["prid"];}}//父级栏目id
if(!empty($_POST["prid"])){if($_POST["prid"]=="top"){$_POST['pid']=0;}else{$_POST['pid'] = $_POST["prid"];}}//父级栏目id
$_POST['addtime'] = time();//添加时间
unset($_POST["prid"]);
unset($_POST["_token"]);
@ -90,7 +103,7 @@ class CategoryController extends CommonController
{
if(!empty($_REQUEST["id"])){$id = $_REQUEST["id"];}else{error_jump('删除失败!请重新提交');} //if(preg_match('/[0-9]*/',$id)){}else{exit;}
if(DB::table('arctype')->where('reid', $id)->first())
if(DB::table('arctype')->where('pid', $id)->first())
{
error_jump('删除失败!请先删除子栏目');
}

2
app/Http/Controllers/Admin/FriendlinkController.php

@ -66,7 +66,7 @@ class FriendlinkController extends CommonController
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(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
if(DB::table('friendlink')->whereIn("id", explode(',', $id))->delete())
{

83
app/Http/Controllers/Admin/MenuController.php

@ -0,0 +1,83 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Admin\CommonController;
use DB;
class MenuController extends CommonController
{
public function __construct()
{
parent::__construct();
}
public function index()
{
$posts = parent::pageList('menu');
$data['posts'] = $posts;
return view('admin.menu.index', $data);
}
public function add()
{
$data['menu'] = category_tree(get_category('menu',0));
return view('admin.menu.add', $data);
}
public function doadd()
{
unset($_POST["_token"]);
if(DB::table('menu')->insert($_POST))
{
success_jump('添加成功!', route('admin_menu'));
}
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('menu')->where('id', $id)->first(), 1);
$data['menu'] = category_tree(get_category('menu',0));
return view('admin.menu.edit', $data);
}
public function doedit()
{
if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;}
unset($_POST["_token"]);
if(DB::table('menu')->where('id', $id)->update($_POST))
{
success_jump('修改成功!', route('admin_menu'));
}
else
{
error_jump('修改失败!');
}
}
public function del()
{
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
if(DB::table('menu')->whereIn("id", explode(',', $id))->delete())
{
success_jump('删除成功');
}
else
{
error_jump('删除失败!请重新提交');
}
}
}

4
app/Http/Controllers/Admin/ProductController.php

@ -34,8 +34,8 @@ class ProductController extends CommonController
$posts = parent::pageList('product', $where);
foreach($posts as $key=>$value)
{
$info = DB::table('product_type')->select('typename')->where("id", $value->typeid)->first();
$posts[$key]->typename = $info->typename;
$info = DB::table('product_type')->select('name')->where("id", $value->typeid)->first();
$posts[$key]->name = $info->name;
$posts[$key]->body = '';
}

20
app/Http/Controllers/Admin/ProducttypeController.php

@ -13,8 +13,20 @@ class ProductTypeController extends CommonController
public function index()
{
$data['catlist'] = category_tree(get_category('product_type',0));
return view('admin.producttype.index', $data);
$catlist = category_tree(get_category('product_type',0));
if($catlist)
{
foreach($catlist as $k=>$v)
{
$arctype = DB::table("arctype")->where('id', $v['id'])->first();
$catlist[$k]['typedir'] = $arctype->typedir;
$catlist[$k]['addtime'] = $arctype->addtime;
}
}
$data['catlist'] = $catlist;
return view('admin.producttype.index', $data);
}
public function add()
@ -41,7 +53,7 @@ class ProductTypeController extends CommonController
public function doadd()
{
if(isset($_POST["prid"])){if($_POST["prid"]=="top"){$_POST['reid']=0;}else{$_POST['reid'] = $_POST["prid"];}unset($_POST["prid"]);}//父级栏目id
if(isset($_POST["prid"])){if($_POST["prid"]=="top"){$_POST['pid']=0;}else{$_POST['pid'] = $_POST["prid"];}unset($_POST["prid"]);}//父级栏目id
$_POST['addtime'] = time();//添加时间
unset($_POST["_token"]);
@ -92,7 +104,7 @@ class ProductTypeController extends CommonController
{
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
if(DB::table("product_type")->where('reid', $id)->first())
if(DB::table("product_type")->where('pid', $id)->first())
{
error_jump('删除失败!请先删除子分类');
}

72
app/Http/Controllers/Admin/UserController.php

@ -13,18 +13,68 @@ class UserController extends CommonController
public function index()
{
return view('admin.user.index');
$posts = parent::pageList('user');
$data['posts'] = $posts;
return view('admin.user.index', $data);
}
public function add()
{
$data['rolelist'] = object_to_array(DB::table('user_role')->orderBy('listorder','desc')->get());
return view('admin.user.add', $data);
}
public function doadd()
{
unset($_POST["_token"]);
$_POST['pwd'] = md5($_POST['pwd']);
if(DB::table('user')->insert($_POST))
{
success_jump('添加成功!', route('admin_user'));
}
else
{
error_jump('添加失败!请修改后重新添加');
}
}
public function edit()
{
$data['post'] = object_to_array(DB::table('user')->where('id', 1)->first(), 1);
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('user')->where('id', $id)->first(), 1);
$data['rolelist'] = object_to_array(DB::table('user_role')->orderBy('listorder','desc')->get());
return view('admin.user.edit', $data);
}
public function doedit()
{
if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;}
unset($_POST["_token"]);
$_POST['pwd'] = md5($_POST['pwd']);
if(DB::table('user')->where('id', $id)->update($_POST))
{
success_jump('修改成功!', route('admin_user'));
}
else
{
error_jump('修改失败!');
}
}
public function doedit()
//修改密码
/* public function doedit()
{
if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;}
unset($_POST["_token"]);
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;}
@ -34,7 +84,7 @@ class UserController extends CommonController
if($User)
{
if(DB::table('user')->where('id', 1)->update($data))
if(DB::table('user')->where('id', $id)->update($data))
{
session_unset();
session_destroy();
@ -45,5 +95,19 @@ class UserController extends CommonController
{
error_jump('修改失败!旧用户名或密码错误');
}
} */
public function del()
{
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
if(DB::table('user')->whereIn("id", explode(',', $id))->delete())
{
success_jump('删除成功');
}
else
{
error_jump('删除失败!请重新提交');
}
}
}

80
app/Http/Controllers/Admin/UserRoleController.php

@ -0,0 +1,80 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Admin\CommonController;
use DB;
class UserRoleController extends CommonController
{
public function __construct()
{
parent::__construct();
}
public function index()
{
$posts = parent::pageList('user_role', '', ['listorder','desc']);
$data['posts'] = $posts;
return view('admin.userrole.index', $data);
}
public function add()
{
return view('admin.userrole.add');
}
public function doadd()
{
unset($_POST["_token"]);
if(DB::table('user_role')->insert($_POST))
{
success_jump('添加成功!', route('admin_userrole'));
}
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('user_role')->where('id', $id)->first(), 1);
return view('admin.userrole.edit', $data);
}
public function doedit()
{
if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;}
unset($_POST["_token"]);
if(DB::table('user_role')->where('id', $id)->update($_POST))
{
success_jump('修改成功!', route('admin_userrole'));
}
else
{
error_jump('修改失败!');
}
}
public function del()
{
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
if(DB::table('user_role')->whereIn("id", explode(',', $id))->delete())
{
success_jump('删除成功');
}
else
{
error_jump('删除失败!请重新提交');
}
}
}

8
app/Http/Controllers/Home/IndexController.php

@ -28,7 +28,7 @@ class IndexController extends CommonController
$data['post'] = $post;
$subcat="";$sql="";
$post2 = object_to_array(DB::table('arctype')->select('id')->where('reid', $cat)->get());
$post2 = object_to_array(DB::table('arctype')->select('id')->where('pid', $cat)->get());
if(!empty($post2)){foreach($post2 as $row){$subcat=$subcat."typeid=".$row["id"]." or ";}}
$subcat=$subcat."typeid=".$cat;
$sql=$subcat." or typeid2 in (".$cat.")";//echo $subcat2;exit;
@ -59,7 +59,7 @@ class IndexController extends CommonController
{
if(empty($id) || !preg_match('/[0-9]+/',$id)){error_jump('您访问的页面不存在或已被删除!', route('page404'));}
if(cache("detailid$id")){$post = cache("detailid$id");}else{$post = object_to_array(DB::table('article')->where('id', $id)->first(), 1);if(empty($post)){error_jump('您访问的页面不存在或已被删除!', route('page404'));}$post['typename'] = DB::table('arctype')->where('id', $post['typeid'])->value('typename');cache(["detailid$id"=>$post], \Carbon\Carbon::now()->addMinutes(2592000));}
if(cache("detailid$id")){$post = cache("detailid$id");}else{$post = object_to_array(DB::table('article')->where('id', $id)->first(), 1);if(empty($post)){error_jump('您访问的页面不存在或已被删除!', route('page404'));}$post['name'] = DB::table('arctype')->where('id', $post['typeid'])->value('name');cache(["detailid$id"=>$post], \Carbon\Carbon::now()->addMinutes(2592000));}
if($post)
{
$cat = $post['typeid'];
@ -197,7 +197,7 @@ class IndexController extends CommonController
$data['post'] = $post;
$subcat="";$sql="";
$post2 = object_to_array(DB::table('product_type')->select('id')->where('reid', $cat)->get());
$post2 = object_to_array(DB::table('product_type')->select('id')->where('pid', $cat)->get());
if(!empty($post2)){foreach($post2 as $row){$subcat=$subcat."typeid=".$row["id"]." or ";}}
$subcat=$subcat."typeid=".$cat;
$data['sql'] = $subcat;
@ -226,7 +226,7 @@ class IndexController extends CommonController
{
if(empty($id) || !preg_match('/[0-9]+/',$id)){error_jump('您访问的页面不存在或已被删除!', route('page404'));}
$post = object_to_array(DB::table('product')->where('id', $id)->first(), 1);if(empty($post)){error_jump('您访问的页面不存在或已被删除!', route('page404'));}$post['typename'] = DB::table('arctype')->where('id', $post['typeid'])->value('typename');
$post = object_to_array(DB::table('product')->where('id', $id)->first(), 1);if(empty($post)){error_jump('您访问的页面不存在或已被删除!', route('page404'));}$post['name'] = DB::table('arctype')->where('id', $post['typeid'])->value('name');
if($post)
{
$cat = $post['typeid'];

4
resources/views/admin/article/add.blade.php

@ -75,9 +75,9 @@ function upImage()
<select name="typeid" id="typeid">
<?php $catlist = category_tree(get_category('arctype',0));foreach($catlist as $row){
if($row["id"]==$catid){ ?>
<option selected="selected" value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></option>
<option selected="selected" value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }else{ ?>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></option>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }} ?>
</select>
</td>

4
resources/views/admin/article/edit.blade.php

@ -76,9 +76,9 @@ function upImage()
<select name="typeid" id="typeid">
<?php $catlist = category_tree(get_category('arctype',0));foreach($catlist as $row){
if($row["id"]==$post["typeid"]){ ?>
<option selected="selected" value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></option>
<option selected="selected" value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }else{ ?>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></option>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }} ?>
</select>
</td>

6
resources/views/admin/article/index.blade.php

@ -23,7 +23,7 @@
<td><input name="arcID" type="checkbox" value="<?php echo $row->id; ?>" class="np"></td>
<td><a href="/fladmin/article/edit?id=<?php echo $row->id; ?>"><?php echo $row->title; ?></a> <?php if(!empty($row->litpic)){echo "<small style='color:red'>[图]</small>";}if($row->tuijian==1){echo "<small style='color:#22ac38'>[荐]</small>";} ?> </td>
<td><?php echo date('Y-m-d',$row->pubdate); ?></td>
<td><a href="/fladmin/article?id=<?php echo $row->typeid; ?>"><?php echo $row->typename; ?></a></td><td><?php echo $row->click; ?></td><td><a target="_blank" href="<?php echo get_front_url(array("type"=>"content","catid"=>$row->typeid,"id"=>$row->id)); ?>">预览</a>&nbsp;<a href="/fladmin/article/edit?id=<?php echo $row->id; ?>">修改</a>&nbsp;<a onclick="delconfirm('/fladmin/article/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
<td><a href="/fladmin/article?id=<?php echo $row->typeid; ?>"><?php echo $row->name; ?></a></td><td><?php echo $row->click; ?></td><td><a target="_blank" href="<?php echo get_front_url(array("type"=>"content","catid"=>$row->typeid,"id"=>$row->id)); ?>">预览</a>&nbsp;<a href="/fladmin/article/edit?id=<?php echo $row->id; ?>">修改</a>&nbsp;<a onclick="delconfirm('/fladmin/article/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
</tr>
<?php }} ?>
<tr>
@ -40,12 +40,12 @@
<form id="searcharc" class="navbar-form" action="/fladmin/article" method="get">
<select name="typeid" id="typeid" style="padding:6px 5px;vertical-align:middle;border:1px solid #DBDBDB;border-radius:4px;">
<option value="0">选择栏目...</option>
<?php $catlist = category_tree(get_category('arctype', 0)); foreach($catlist as $row) { ?><option value="<?php echo $row['id']; ?>"><?php for($i=0; $i<$row["deep"]; $i++) { echo "—"; } echo $row["typename"]; ?></option><?php } ?>
<?php $catlist = category_tree(get_category('arctype', 0)); foreach($catlist as $row) { ?><option value="<?php echo $row['id']; ?>"><?php for($i=0; $i<$row["deep"]; $i++) { echo "—"; } echo $row["name"]; ?></option><?php } ?>
</select>
<div class="form-group"><input type="text" name="keyword" id="keyword" class="form-control required" placeholder="搜索关键词..."></div>
<button type="submit" class="btn btn-info" value="Submit">搜索一下</button></form>
<div class="backpages">{{ $posts->links() }}</div>
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
<script>
//推荐文章

4
resources/views/admin/category/add.blade.php

@ -11,11 +11,11 @@
<tbody>
<tr>
<td align="right">栏目名称:</td>
<td><input name="typename" type="text" id="typename" size="30" class="required"></td>
<td><input name="name" type="text" id="name" size="30" class="required"></td>
</tr>
<tr>
<td align="right">上级目录:</td>
<td><?php if($id==0){echo "顶级栏目";}else{echo $postone["typename"];} ?><input style="display:none;" type="text" name="prid" id="prid" value="<?php if($id==0){echo "top";}else{echo $id;} ?>"></td>
<td><?php if($id==0){echo "顶级栏目";}else{echo $postone["name"];} ?><input style="display:none;" type="text" name="prid" id="prid" value="<?php if($id==0){echo "top";}else{echo $id;} ?>"></td>
</tr>
<tr>
<td align="right">别名:</td>

2
resources/views/admin/category/edit.blade.php

@ -11,7 +11,7 @@
<tbody>
<tr>
<td align="right">栏目名称:</td>
<td><input name="typename" type="text" value="<?php echo $post["typename"]; ?>" id="typename" size="30" class="required"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td>
<td><input name="name" type="text" value="<?php echo $post["name"]; ?>" id="name" size="30" class="required"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td>
</tr>
<tr>
<td align="right">别名:</td>

4
resources/views/admin/category/index.blade.php

@ -10,10 +10,10 @@
<table class="table table-striped table-hover">
<thead><tr><th>ID</th><th>名称</th><th>文章数</th><th>别名</th><th>更新时间</th><th>操作</th></tr></thead>
<tbody id="cat-list">
<?php $catlist = category_tree(get_category('arctype',0));if($catlist){foreach($catlist as $row){ ?>
<?php if($catlist){foreach($catlist as $row){ ?>
<tr id="cat-<?php echo $row["id"]; ?>">
<td><?php echo $row["id"]; ?></td>
<td><a href="/fladmin/article?id=<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></a></td><td><?php echo catarcnum($row["id"],'article'); ?></td><td><?php echo $row["typedir"]; ?></td><td><?php echo date('Y-m-d',$row["addtime"]); ?></td>
<td><a href="/fladmin/article?id=<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></a></td><td><?php echo catarcnum($row["id"],'article'); ?></td><td><?php echo $row["typedir"]; ?></td><td><?php echo date('Y-m-d',$row["addtime"]); ?></td>
<td><a href="<?php echo get_front_url(array("type"=>"list","catid"=>$row["id"])); ?>" target="_blank">预览</a> | <a href="/fladmin/article/add?catid=<?php echo $row["id"]; ?>">发布文章</a> | <a href="/fladmin/category/add?reid=<?php echo $row["id"]; ?>">增加子类</a> | <a href="/fladmin/category/edit?id=<?php echo $row["id"]; ?>">更改</a> | <a onclick="delconfirm('/fladmin/category/del?id=<?php echo $row["id"]; ?>')" href="javascript:;">删除</a></td>
</tr><?php }} ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->

7
resources/views/admin/common/leftmenu.blade.php

@ -15,12 +15,15 @@
<dd><a href="<?php echo route('admin'); ?>/keyword"><span class="glyphicon glyphicon-fire"></span> 內链关键词维护</a></dd>
<dd><a href="<?php echo route('admin'); ?>/friendlink"><span class="glyphicon glyphicon-leaf"></span> 友情链接</a></dd>
<dd><a href="<?php echo route('admin'); ?>/slide"><span class="glyphicon glyphicon-leaf"></span> 轮播图</a></dd>
<dd><a href="<?php echo route('admin'); ?>/user"><span class="glyphicon glyphicon-user"></span> 用户管理</a></dd>
<dd><a href="<?php echo route('admin'); ?>/article/repetarc"><span class="glyphicon glyphicon-cog"></span> 重复文档检测</a></dd>
<dd><a href="<?php echo route('admin'); ?>/menu"><span class="glyphicon glyphicon-fire"></span> 菜单管理</a></dd>
<dt>用户管理</dt>
<dd><a href="<?php echo route('admin'); ?>/userrole"><span class="glyphicon glyphicon-pencil"></span> 角色管理</a></dd>
<dd><a href="<?php echo route('admin'); ?>/user"><span class="glyphicon glyphicon-user"></span> 管理员</a></dd>
<dt>系统设置</dt>
<dd><a href="<?php echo route('admin'); ?>/sysconfig"><span class="glyphicon glyphicon-wrench"></span> 系统基本参数</a></dd>
<dd><a href="<?php echo route('admin'); ?>/index/upcache"><span class="glyphicon glyphicon-refresh"></span> 更新缓存</a></dd>
<dd><a href="<?php echo route('admin'); ?>/guestbook"><span class="glyphicon glyphicon-wrench"></span> 在线留言</a></dd>
<dd><a href="<?php echo route('admin'); ?>/guestbook"><span class="glyphicon glyphicon-wrench"></span> 所有留言</a></dd>
<dd><a href="<?php echo route('admin'); ?>/sysconfig" target="_blank"><span class="glyphicon glyphicon-book"></span> 参考文档</a></dd>
<dd><a href="<?php echo route('admin'); ?>/sysconfig" target="_blank"><span class="glyphicon glyphicon-envelope"></span> 意见反馈/官方交流</a></dd>
</dl>

2
resources/views/admin/friendlink/index.blade.php

@ -22,7 +22,7 @@
</tr><?php } ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<div class="backpages">{{ $posts->links() }}</div>
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

2
resources/views/admin/guestbook/index.blade.php

@ -32,7 +32,7 @@
</table>
</div><!-- 表格结束 -->
<div class="backpages">{{ $posts->links() }}</div>
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
<script>
$(function(){

2
resources/views/admin/keyword/index.blade.php

@ -22,7 +22,7 @@
</tr><?php } ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<div class="backpages">{{ $posts->links() }}</div>
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

91
resources/views/admin/menu/add.blade.php

@ -0,0 +1,91 @@
<!DOCTYPE html><html><head><title>菜单添加_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h5 class="sub-header"><a href="/fladmin/menu">菜单列表</a> > 菜单添加</h5>
<form id="addarc" method="post" action="/fladmin/menu/doadd" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td align="right">上级:</td>
<td>
<select name="pid" id="pid">
<option value="0">顶级菜单</option>
<?php if($menu){foreach($menu as $row){ ?>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }} ?>
</select>
</td>
</tr>
<tr>
<td align="right">名称:</td>
<td><input name="name" type="text" id="name" value="" class="required" style="width:30%" placeholder="在此输入菜单名称"></td>
</tr>
<tr>
<td align="right">操作方法:</td>
<td><input name="action" type="text" id="action" value="" class="required" style="width:30%"></td>
</tr>
<tr>
<td align="right">参数:</td>
<td><input name="data" type="text" id="data" value="" style="width:30%"></td>
</tr>
<tr>
<td align="right">图标:</td>
<td><input name="icon" type="text" id="icon" value="" style="width:30%"></td>
</tr>
<tr>
<td align="right">备注:</td>
<td><input name="des" type="text" id="des" value="" style="width:50%"></td>
</tr>
<tr>
<td align="right">状态:</td>
<td>
<input type="radio" value='1' name="status" checked />&nbsp;显示&nbsp;&nbsp;
<input type="radio" value='0' name="status" />&nbsp;隐藏
</td>
</tr>
<tr>
<td align="right">状态:</td>
<td>
<input type="radio" value='1' name="type" checked />&nbsp;权限认证+菜单&nbsp;&nbsp;
<input type="radio" value='0' name="type" />&nbsp;只作为菜单<br><small style="color:#999">注意:“权限认证+菜单”表示加入后台权限管理,纯碎是菜单项请不要选择此项。</small>
</td>
</tr>
<tr>
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td>
</tr>
</tbody></table></form><!-- 表单结束 -->
</div></div><!-- 右边结束 --></div></div>
<script>
$(function(){
$(".required").blur(function(){
var $parent = $(this).parent();
$parent.find(".formtips").remove();
if(this.value=="")
{
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
}
else
{
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
}
});
//重置
$('#addarc input[type="reset"]').click(function(){
$(".formtips").remove();
});
$("#addarc").submit(function(){
$(".required").trigger('blur');
var numError = $('#addarc .onError').length;
if(numError){return false;}
});
});
</script>
</body></html>

95
resources/views/admin/menu/edit.blade.php

@ -0,0 +1,95 @@
<!DOCTYPE html><html><head><title>菜单修改_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h5 class="sub-header"><a href="/fladmin/menu">菜单列表</a> > 菜单修改</h5>
<form id="addarc" method="post" action="/fladmin/menu/doedit" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td align="right">上级:</td>
<td>
<select name="pid" id="pid">
<option value="0">顶级菜单</option>
<?php if($menu){foreach($menu as $row){ ?>
<?php if($row["id"]==$post["pid"]){ ?>
<option selected value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }else{ ?>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }}} ?>
</select>
</td>
</tr>
<tr>
<td align="right">名称:</td>
<td><input name="name" type="text" id="name" value="<?php echo $post["name"]; ?>" class="required" style="width:30%" placeholder="在此输入菜单名称"><input style="display:none;" name="id" type="text" id="id" value="<?php echo $id; ?>"></td>
</tr>
<tr>
<td align="right">操作方法:</td>
<td><input name="action" type="text" id="action" value="<?php echo $post["action"]; ?>" class="required" style="width:30%"></td>
</tr>
<tr>
<td align="right">参数:</td>
<td><input name="data" type="text" id="data" value="<?php echo $post["data"]; ?>" style="width:30%"></td>
</tr>
<tr>
<td align="right">图标:</td>
<td><input name="icon" type="text" id="icon" value="<?php echo $post["icon"]; ?>" style="width:30%"></td>
</tr>
<tr>
<td align="right">备注:</td>
<td><input name="des" type="text" id="des" value="<?php echo $post["des"]; ?>" style="width:50%"></td>
</tr>
<tr>
<td align="right">状态:</td>
<td>
<input type="radio" value='1' name="status" <?php if($post['status']==1){echo 'checked';} ?> />&nbsp;显示&nbsp;&nbsp;
<input type="radio" value='0' name="status" <?php if($post['status']==0){echo 'checked';} ?> />&nbsp;隐藏
</td>
</tr>
<tr>
<td align="right">状态:</td>
<td>
<input type="radio" value='1' name="type" <?php if($post['type']==1){echo 'checked';} ?> />&nbsp;权限认证+菜单&nbsp;&nbsp;
<input type="radio" value='0' name="type" <?php if($post['type']==0){echo 'checked';} ?> />&nbsp;只作为菜单
<br><small style="color:#999">注意:“权限认证+菜单”表示加入后台权限管理,纯碎是菜单项请不要选择此项。</small>
</td>
</tr>
<tr>
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button></td>
</tr>
</tbody></table></form><!-- 表单结束 -->
</div></div><!-- 右边结束 --></div></div>
<script>
$(function(){
$(".required").blur(function(){
var $parent = $(this).parent();
$parent.find(".formtips").remove();
if(this.value=="")
{
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
}
else
{
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
}
});
//重置
$('#addarc input[type="reset"]').click(function(){
$(".formtips").remove();
});
$("#addarc").submit(function(){
$(".required").trigger('blur');
var numError = $('#addarc .onError').length;
if(numError){return false;}
});
});
</script>
</body></html>

30
resources/views/admin/menu/index.blade.php

@ -0,0 +1,30 @@
<!DOCTYPE html><html><head><title>菜单管理_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h2 class="sub-header">菜单管理</h2>[ <a href="/fladmin/menu/add">菜单添加</a> ]<br><br>
<form name="listarc"><div class="table-responsive"><table class="table table-striped table-hover">
<thead><tr>
<th>ID</th>
<th>菜单名称</th>
<th>操作方法</th>
<th>状态</th>
<th>管理</th>
</tr></thead>
<tbody>
<?php foreach($posts as $row){ ?><tr>
<td><?php echo $row->id; ?></td>
<td><?php echo $row->name; ?></td>
<td><?php echo $row->action; ?></td>
<td><?php if($row->status==1){echo '显示';}else{echo '隐藏';} ?></td>
<td><a href="/fladmin/menu/edit?id=<?php echo $row->id; ?>">修改</a> | <a onclick="delconfirm('/fladmin/menu/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
</tr><?php } ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

4
resources/views/admin/product/add.blade.php

@ -79,9 +79,9 @@ function upImage()
<select name="typeid" id="typeid">
<?php $catlist = category_tree(get_category('product_type',0));if($catlist){foreach($catlist as $row){
if($row["id"]==$catid){ ?>
<option selected="selected" value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></option>
<option selected="selected" value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }else{ ?>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></option>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }}} ?>
</select>
</td>

8
resources/views/admin/product/edit.blade.php

@ -24,8 +24,8 @@
<tr>
<td align="right">上架:</td>
<td>
<input type="radio" value='0' name="status" <?php echo $post["title"]; ?>{if condition="$post['status']==0"}checked{/if} />&nbsp;是&nbsp;&nbsp;
<input type="radio" value='1' name="status" <?php echo $post["title"]; ?>{if condition="$post['status']==1"}checked{/if} />&nbsp;否
<input type="radio" value='0' name="status" <?php if($post['status']==0){echo 'checked';} ?> />&nbsp;是&nbsp;&nbsp;
<input type="radio" value='1' name="status" <?php if($post['status']==1){echo 'checked';} ?> />&nbsp;否
</td>
</tr>
<tr>
@ -80,9 +80,9 @@ function upImage()
<select name="typeid" id="typeid">
<?php $catlist = category_tree(get_category('product_type',0));foreach($catlist as $row){
if($row["id"]==$post["typeid"]){ ?>
<option selected="selected" value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></option>
<option selected="selected" value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }else{ ?>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></option>
<option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
<?php }} ?>
</select>
</td>

6
resources/views/admin/product/index.blade.php

@ -23,7 +23,7 @@
<td><input name="arcID" type="checkbox" value="<?php echo $row->id; ?>" class="np"></td>
<td><a href="/fladmin/product/edit?id=<?php echo $row->id; ?>"><?php echo $row->title; ?></a> <?php if(!empty($row->litpic)){echo "<small style='color:red'>[图]</small>";}if($row->tuijian==1){echo "<small style='color:#22ac38'>[荐]</small>";} ?> </td>
<td><?php echo date('Y-m-d',$row->pubdate); ?></td>
<td><a href="/fladmin/product?id=<?php echo $row->typeid; ?>"><?php echo $row->typename; ?></a></td><td><?php echo $row->click; ?></td><td><a target="_blank" href="<?php echo route('product',['id'=>$row->id]); ?>">预览</a>&nbsp;<a href="/fladmin/product/edit?id=<?php echo $row->id; ?>">修改</a>&nbsp;<a onclick="delconfirm('/fladmin/product/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
<td><a href="/fladmin/product?id=<?php echo $row->typeid; ?>"><?php echo $row->name; ?></a></td><td><?php echo $row->click; ?></td><td><a target="_blank" href="<?php echo route('product',['id'=>$row->id]); ?>">预览</a>&nbsp;<a href="/fladmin/product/edit?id=<?php echo $row->id; ?>">修改</a>&nbsp;<a onclick="delconfirm('/fladmin/product/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
</tr>
<?php }} ?>
<tr>
@ -40,12 +40,12 @@
<form id="searcharc" class="navbar-form" action="/fladmin/product" method="get">
<select name="typeid" id="typeid" style="padding:6px 5px;vertical-align:middle;border:1px solid #DBDBDB;border-radius:4px;">
<option value="0">选择栏目...</option>
<?php $catlist = category_tree(get_category('product_type',0));if($catlist){foreach($catlist as $row){ ?><option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "—";}echo $row["typename"]; ?></option><?php }} ?>
<?php $catlist = category_tree(get_category('product_type',0));if($catlist){foreach($catlist as $row){ ?><option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "—";}echo $row["name"]; ?></option><?php }} ?>
</select>
<div class="form-group"><input type="text" name="keyword" id="keyword" class="form-control required" placeholder="搜索关键词..."></div>
<button type="submit" class="btn btn-info" value="Submit">搜索一下</button></form>
<div class="backpages">{{ $posts->links() }}</div>
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
<script>
//批量删除商品

4
resources/views/admin/producttype/add.blade.php

@ -11,11 +11,11 @@
<tbody>
<tr>
<td align="right">分类名称:</td>
<td><input name="typename" type="text" value="" id="typename" size="30" class="required"></td>
<td><input name="name" type="text" value="" id="name" size="30" class="required"></td>
</tr>
<tr>
<td align="right">上级目录:</td>
<td><?php if($id==0){echo "顶级栏目";}else{echo $postone["typename"];} ?><input style="display:none;" type="text" name="prid" id="prid" value="<?php if($id==0){echo "top";}else{echo $id;} ?>"></td>
<td><?php if($id==0){echo "顶级栏目";}else{echo $postone["name"];} ?><input style="display:none;" type="text" name="prid" id="prid" value="<?php if($id==0){echo "top";}else{echo $id;} ?>"></td>
</tr>
<tr>
<td align="right">别名:</td>

2
resources/views/admin/producttype/edit.blade.php

@ -11,7 +11,7 @@
<tbody>
<tr>
<td align="right">分类名称:</td>
<td><input name="typename" type="text" value="<?php echo $post["typename"]; ?>" id="typename" size="30" class="required"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td>
<td><input name="name" type="text" value="<?php echo $post["name"]; ?>" id="name" size="30" class="required"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td>
</tr>
<tr>
<td align="right">别名:</td>

2
resources/views/admin/producttype/index.blade.php

@ -13,7 +13,7 @@
<?php if($catlist){foreach($catlist as $row){ ?>
<tr id="cat-<?php echo $row["id"]; ?>">
<td><?php echo $row["id"]; ?></td>
<td><a href="/fladmin/product?id=<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["typename"]; ?></a></td>
<td><a href="/fladmin/product?id=<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></a></td>
<td><?php echo catarcnum($row["id"].'product'); ?></td>
<td><?php echo $row["typedir"]; ?></td>
<td><?php echo date('Y-m-d',$row["addtime"]); ?></td>

2
resources/views/admin/searchword/index.blade.php

@ -27,7 +27,7 @@
</tbody>
</table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<div class="backpages">{{ $posts->links() }}</div>
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

2
resources/views/admin/slide/index.blade.php

@ -26,7 +26,7 @@
</tr><?php }} ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<div class="backpages">{{ $posts->links() }}</div>
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

2
resources/views/admin/sysconfig/index.blade.php

@ -24,5 +24,7 @@
</tr><?php } ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

2
resources/views/admin/tag/index.blade.php

@ -28,7 +28,7 @@
</tbody>
</table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<div class="backpages">{{ $posts->links() }}</div>
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

68
resources/views/admin/user/add.blade.php

@ -0,0 +1,68 @@
<!DOCTYPE html><html><head><title>管理员添加_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h5 class="sub-header"><a href="/fladmin/user">管理员列表</a> > 管理员添加</h5>
<form id="addarc" method="post" action="/fladmin/user/doadd" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td align="right">用户名:</td>
<td><input name="username" type="text" id="username" value="" class="required" style="width:30%" placeholder="在此输入用户名"></td>
</tr>
<tr>
<td align="right">密码:</td>
<td><input name="pwd" type="password" id="pwd" value="" class="required" style="width:60%"></td>
</tr>
<tr>
<td align="right">邮箱:</td>
<td><input name="email" type="text" id="email" value="" style="width:60%"></td>
</tr>
<tr>
<td align="right">角色:</td>
<td>
<select name="role_id" id="role_id">
<?php if($rolelist){foreach($rolelist as $row){ ?>
<option value="<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></option>
<?php }} ?>
</select>
</td>
</tr>
<tr>
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td>
</tr>
</tbody></table></form><!-- 表单结束 -->
</div></div><!-- 右边结束 --></div></div>
<script>
$(function(){
$(".required").blur(function(){
var $parent = $(this).parent();
$parent.find(".formtips").remove();
if(this.value=="")
{
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
}
else
{
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
}
});
//重置
$('#addarc input[type="reset"]').click(function(){
$(".formtips").remove();
});
$("#addarc").submit(function(){
$(".required").trigger('blur');
var numError = $('#addarc .onError').length;
if(numError){return false;}
});
});
</script>
</body></html>

83
resources/views/admin/user/edit.blade.php

@ -1,58 +1,71 @@
<!DOCTYPE html><html><head><title>密码修改_后台管理</title>@include('admin.common.header')
<!DOCTYPE html><html><head><title>管理员修改_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<style>.input-error{background-color:#ffe7e7;}</style>
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h2 class="sub-header">密码修改</h2>
<form id="addarc" method="post" action="/fladmin/user/doedit" class="table-responsive" role="form">{{ csrf_field() }}
<h5 class="sub-header"><a href="/fladmin/user">管理员列表</a> > 管理员修改</h5>
<form id="addarc" method="post" action="/fladmin/user/doedit" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td align="right">用户名:</td>
<td><input name="username" type="text" class="" id="username" value="<?php echo $post["username"]; ?>" style="width:30%"></td>
<td><input name="username" type="text" id="username" value="<?php echo $post["username"]; ?>" class="required" style="width:30%" placeholder="在此输入用户名"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td>
</tr>
<tr>
<td align="right">密码:</td>
<td><input name="oldpwd" type="password" class="" id="oldpwd" value="" style="width:30%"></td>
<td align="right">密码:</td>
<td><input name="pwd" type="password" id="pwd" value="" class="required" style="width:30%"></td>
</tr>
<tr>
<td align="right">新密码</td>
<td><input name="newpwd" type="password" class="" id="newpwd" value="" style="width:30%"></td>
<td align="right">邮箱</td>
<td><input name="email" type="text" id="email" value="<?php echo $post["email"]; ?>" style="width:30%"></td>
</tr>
<tr>
<td align="right">确认密码:</td>
<td><input name="newpwd2" type="password" class="" id="newpwd2" value="" style="width:30%"></td>
<td align="right">角色:</td>
<td>
<select name="role_id" id="role_id">
<?php if($rolelist){foreach($rolelist as $row){ ?>
<?php if($post["role_id"]==$row["id"]){ ?>
<option selected value="<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></option>
<?php }else{ ?>
<option value="<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></option>
<?php }}} ?>
</select>
</td>
</tr>
<tr>
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td>
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button></td>
</tr>
</tbody></table></form><!-- 表单结束 -->
</div></div><!-- 右边结束 --></div></div>
<script>
$('#addarc input[type="text"], #addarc input[type="password"]').on('focus', function() {
$(this).removeClass('input-error');
});
$('#addarc').on('submit', function(e) {
$(this).find('input[type="text"], input[type="password"]').each(function(){
if( $(this).val() == "" ) {
e.preventDefault();
$(this).addClass('input-error');
}
else {
$(this).removeClass('input-error');
}
});
if($('#newpwd').val()!=$('#newpwd2').val() || $('#newpwd').val()=='')
{
e.preventDefault();
$('#newpwd').addClass('input-error');
$('#newpwd2').addClass('input-error');
}
else {
$('#newpwd').removeClass('input-error');
$('#newpwd2').removeClass('input-error');
}
$(function(){
$(".required").blur(function(){
var $parent = $(this).parent();
$parent.find(".formtips").remove();
if(this.value=="")
{
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
}
else
{
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
}
});
//重置
$('#addarc input[type="reset"]').click(function(){
$(".formtips").remove();
});
$("#addarc").submit(function(){
$(".required").trigger('blur');
var numError = $('#addarc .onError').length;
if(numError){return false;}
});
});
</script>
</body></html>

58
resources/views/admin/user/edit222.blade.php

@ -0,0 +1,58 @@
<!DOCTYPE html><html><head><title>密码修改_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<style>.input-error{background-color:#ffe7e7;}</style>
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h2 class="sub-header">密码修改</h2>
<form id="addarc" method="post" action="/fladmin/user/doedit" class="table-responsive" role="form">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td align="right">用户名:</td>
<td><input name="username" type="text" class="" id="username" value="<?php echo $post["username"]; ?>" style="width:30%"></td>
</tr>
<tr>
<td align="right">旧密码:</td>
<td><input name="oldpwd" type="password" class="" id="oldpwd" value="" style="width:30%"></td>
</tr>
<tr>
<td align="right">新密码:</td>
<td><input name="newpwd" type="password" class="" id="newpwd" value="" style="width:30%"></td>
</tr>
<tr>
<td align="right">确认密码:</td>
<td><input name="newpwd2" type="password" class="" id="newpwd2" value="" style="width:30%"></td>
</tr>
<tr>
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td>
</tr>
</tbody></table></form><!-- 表单结束 -->
</div></div><!-- 右边结束 --></div></div>
<script>
$('#addarc input[type="text"], #addarc input[type="password"]').on('focus', function() {
$(this).removeClass('input-error');
});
$('#addarc').on('submit', function(e) {
$(this).find('input[type="text"], input[type="password"]').each(function(){
if( $(this).val() == "" ) {
e.preventDefault();
$(this).addClass('input-error');
}
else {
$(this).removeClass('input-error');
}
});
if($('#newpwd').val()!=$('#newpwd2').val() || $('#newpwd').val()=='')
{
e.preventDefault();
$('#newpwd').addClass('input-error');
$('#newpwd2').addClass('input-error');
}
else {
$('#newpwd').removeClass('input-error');
$('#newpwd2').removeClass('input-error');
}
});
</script>
</body></html>

24
resources/views/admin/user/index.blade.php

@ -1,12 +1,30 @@
<!DOCTYPE html><html><head><title>用户列表_后台管理</title>@include('admin.common.header')
<!DOCTYPE html><html><head><title>管理员列表_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h2 class="sub-header">用户管理</h2>
<h2 class="sub-header">管理员列表</h2>[ <a href="/fladmin/user/add">添加管理员</a> ]<br><br>
<a href="/fladmin/user/edit" class="btn btn-success">修改密码</a>
<form name="listarc"><div class="table-responsive"><table class="table table-striped table-hover">
<thead><tr>
<th>ID</th>
<th>用户名</th>
<th>邮箱</th>
<th>状态</th>
<th>管理</th>
</tr></thead>
<tbody>
<?php foreach($posts as $row){ ?><tr>
<td><?php echo $row->id; ?></td>
<td><?php echo $row->username; ?></td>
<td><?php echo $row->email; ?></td>
<td><?php if($row->status==0){echo '正常';}elseif($row->status==1){echo '禁用';}elseif($row->status==2){echo '禁用';} ?></td>
<td><a href="/fladmin/user/edit?id=<?php echo $row->id; ?>">权限设置</a> | <a href="/fladmin/user/edit?id=<?php echo $row->id; ?>">修改</a> | <a onclick="delconfirm('/fladmin/user/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
</tr><?php } ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

65
resources/views/admin/userrole/add.blade.php

@ -0,0 +1,65 @@
<!DOCTYPE html><html><head><title>添加角色_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h5 class="sub-header"><a href="/fladmin/userrole">角色列表</a> > 添加角色</h5>
<form id="addarc" method="post" action="/fladmin/userrole/doadd" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td align="right">角色名称:</td>
<td><input name="name" type="text" id="name" value="" class="required" style="width:30%" placeholder="在此输入角色名称"></td>
</tr>
<tr>
<td align="right">角色描述:</td>
<td><input name="des" type="text" id="des" value="" style="width:60%"></td>
</tr>
<tr>
<td align="right">状态:</td>
<td>
<input type="radio" value='0' name="status" checked />&nbsp;&nbsp;&nbsp;
<input type="radio" value='1' name="status" />&nbsp;
</td>
</tr>
<tr>
<td align="right">排序:</td>
<td><input name="listorder" type="text" id="listorder" value="0" style="width:60%"></td>
</tr>
<tr>
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td>
</tr>
</tbody></table></form><!-- 表单结束 -->
</div></div><!-- 右边结束 --></div></div>
<script>
$(function(){
$(".required").blur(function(){
var $parent = $(this).parent();
$parent.find(".formtips").remove();
if(this.value=="")
{
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
}
else
{
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
}
});
//重置
$('#addarc input[type="reset"]').click(function(){
$(".formtips").remove();
});
$("#addarc").submit(function(){
$(".required").trigger('blur');
var numError = $('#addarc .onError').length;
if(numError){return false;}
});
});
</script>
</body></html>

65
resources/views/admin/userrole/edit.blade.php

@ -0,0 +1,65 @@
<!DOCTYPE html><html><head><title>角色修改_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h5 class="sub-header"><a href="/fladmin/userrole">角色列表</a> > 角色修改</h5>
<form id="addarc" method="post" action="/fladmin/userrole/doedit" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td align="right">角色名称:</td>
<td><input name="name" type="text" id="name" value="<?php echo $post["name"]; ?>" class="required" style="width:30%" placeholder="在此输入角色名称"><input style="display:none;" name="id" type="text" id="id" value="<?php echo $id; ?>"></td>
</tr>
<tr>
<td align="right">角色描述:</td>
<td><input name="des" type="text" id="des" value="<?php echo $post["des"]; ?>" style="width:60%"></td>
</tr>
<tr>
<td align="right">状态:</td>
<td>
<input type="radio" value='0' name="status" <?php if($post['status']==0){echo 'checked';} ?> />&nbsp;启用&nbsp;&nbsp;
<input type="radio" value='1' name="status" <?php if($post['status']==1){echo 'checked';} ?> />&nbsp;禁用
</td>
</tr>
<tr>
<td align="right">排序:</td>
<td><input name="listorder" type="text" id="listorder" value="<?php echo $post["listorder"]; ?>" style="width:60%"></td>
</tr>
<tr>
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button></td>
</tr>
</tbody></table></form><!-- 表单结束 -->
</div></div><!-- 右边结束 --></div></div>
<script>
$(function(){
$(".required").blur(function(){
var $parent = $(this).parent();
$parent.find(".formtips").remove();
if(this.value=="")
{
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
}
else
{
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
}
});
//重置
$('#addarc input[type="reset"]').click(function(){
$(".formtips").remove();
});
$("#addarc").submit(function(){
$(".required").trigger('blur');
var numError = $('#addarc .onError').length;
if(numError){return false;}
});
});
</script>
</body></html>

30
resources/views/admin/userrole/index.blade.php

@ -0,0 +1,30 @@
<!DOCTYPE html><html><head><title>角色管理_后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
<h2 class="sub-header">角色管理</h2>[ <a href="/fladmin/userrole/add">添加角色</a> ]<br><br>
<form name="listarc"><div class="table-responsive"><table class="table table-striped table-hover">
<thead><tr>
<th>ID</th>
<th>角色名称</th>
<th>角色描述</th>
<th>状态</th>
<th>管理</th>
</tr></thead>
<tbody>
<?php foreach($posts as $row){ ?><tr>
<td><?php echo $row->id; ?></td>
<td><?php echo $row->name; ?></td>
<td><?php echo $row->des; ?></td>
<td><?php if($row->status==0){echo '启用';}else{echo '禁用';} ?></td>
<td><a href="/fladmin/userrole/edit?id=<?php echo $row->id; ?>">权限设置</a> | <a href="/fladmin/userrole/edit?id=<?php echo $row->id; ?>">修改</a> | <a onclick="delconfirm('/fladmin/userrole/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
</tr><?php } ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
<nav aria-label="Page navigation">{{ $posts->links() }}</nav>
</div></div><!-- 右边结束 --></div></div>
</body></html>

4
resources/views/home/common/header.blade.php

@ -1,5 +1,5 @@
<div id="header"><div id="navlink" class="box"><a class="webname" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/"><?php echo sysconfig('CMS_WEBNAME'); ?></a><span class="nav">
<?php $posts = dataList('arctype', ['expression'=>[['reid','=',0]], 'orderby'=>['sortrank', 'desc']]); if($posts){foreach ($posts as $row) { ?>
<a href="<?php echo get_front_url(array('catid'=>$row['id'],'type'=>'list')); ?>"><?php echo $row['typename']; ?></a>
<?php $posts = dataList('arctype', ['expression'=>[['pid','=',0]], 'orderby'=>['sortrank', 'desc']]); if($posts){foreach ($posts as $row) { ?>
<a href="<?php echo get_front_url(array('catid'=>$row['id'],'type'=>'list')); ?>"><?php echo $row['name']; ?></a>
<?php }} ?>
<script>navjs();</script></span><form method="get" target="_blank" class="m-sch fr" name="formsearch" action="<?php echo sysconfig('CMS_BASEHOST'); ?>/plus/search.php"><input class="sch-txt" name="q" type="text" value="搜索 按Enter键" onfocus="if(value=='搜索 按Enter键') {value=''}" onblur="if(value=='') {value='搜索 按Enter键'}"></form><div class="cl"></div></div></div>

2
resources/views/home/index/category.blade.php

@ -2,7 +2,7 @@
<title><?php echo $post['seotitle'];if($page!=0){echo ' '.($page+1);} ?></title><meta name="keywords" content="<?php echo $post["keywords"]; ?>" /><meta name="description" content="<?php echo $post["description"]; ?>" /><link rel="stylesheet" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/css/style.css" media="all"><script type="text/javascript" src="<?php echo sysconfig('CMS_BASEHOST'); ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo sysconfig('CMS_BASEHOST'); ?>/js/ad.js"></script><script>uaredirect("http://m.bnbni.com/cat{dede:type}[field:ID /]{/dede:type}");</script></head><body><script>site();</script>
@include('home.common.header')<div id="tad"><script>tjs();</script></div>
<div class="box mt10"><div class="fl_640"><div class="zinfo"><h1><?php echo $post['typename']; ?></h1><?php if(!empty($post['content'])){echo '<div class="zdes">'.$post['content'].'</div>';} ?></div><div id="lad1"><script>ljs1();</script></div>
<div class="box mt10"><div class="fl_640"><div class="zinfo"><h1><?php echo $post['name']; ?></h1><?php if(!empty($post['content'])){echo '<div class="zdes">'.$post['content'].'</div>';} ?></div><div id="lad1"><script>ljs1();</script></div>
<?php if(!empty($posts)){foreach($posts as $row){ ?><div class="list"><?php if(!empty($row['litpic'])){ ?><a class="limg" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><img alt="<?php echo $row['title']; ?>" src="<?php echo $row['litpic']; ?>"></a><?php } ?>
<strong class="tit"><a href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>" target="_blank"><?php echo $row['title']; ?></a></strong><p><?php echo mb_strcut($row['description'],0,150,'UTF-8'); ?>..</p>

4
resources/views/home3/common/header.blade.php

@ -1,5 +1,5 @@
<div id="header"><div id="navlink" class="box"><a class="webname" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/"><?php echo sysconfig('CMS_WEBNAME'); ?></a><span class="nav">
<?php $posts = dataList('arctype', ['expression'=>[['reid','=',0]], 'orderby'=>['sortrank', 'desc']]); if($posts){foreach ($posts as $row) { ?>
<a href="<?php echo get_front_url(array('catid'=>$row['id'],'type'=>'list')); ?>"><?php echo $row['typename']; ?></a>
<?php $posts = dataList('arctype', ['expression'=>[['pid','=',0]], 'orderby'=>['sortrank', 'desc']]); if($posts){foreach ($posts as $row) { ?>
<a href="<?php echo get_front_url(array('catid'=>$row['id'],'type'=>'list')); ?>"><?php echo $row['name']; ?></a>
<?php }} ?>
<script>navjs();</script></span><form method="get" target="_blank" class="m-sch fr" name="formsearch" action="<?php echo sysconfig('CMS_BASEHOST'); ?>/plus/search.php"><input class="sch-txt" name="q" type="text" value="搜索 按Enter键" onfocus="if(value=='搜索 按Enter键') {value=''}" onblur="if(value=='') {value='搜索 按Enter键'}"></form><div class="cl"></div></div></div>

4
resources/views/home3/index/product.blade.php

@ -62,7 +62,7 @@ $('.bxslider').bxSlider({
<div class="row">
<div class="col-xs-12 col-sm-8 col-md-9" style="float:right">
<div class="list_box">
<h2 class="left_h1"><?php echo $post["typename"]; ?></h2>
<h2 class="left_h1"><?php echo $post["name"]; ?></h2>
<div class="col-sm-12 col-md-6 showpic_box">
@ -129,7 +129,7 @@ document.getElementById('price').innerHTML=(3000+sp0+sp1+sp2).toFixed(2);documen
<h3 class="left_h1">栏目导航</h3>
<ul class="left_nav_ul" id="firstpane">
<?php $posts=dataList('arctype', ['expression'=>[['reid','=',0]], 'orderby'=>['sortrank', 'desc']]);if($posts){foreach($posts as $row){ ?>
<li><a class="biglink" href="<?php echo route('home_category',['cat'=>$row['id']]); ?>"><?php echo $row['typename']; ?></a><ul class="left_snav_ul menu_body"></ul></li>
<li><a class="biglink" href="<?php echo route('home_category',['cat'=>$row['id']]); ?>"><?php echo $row['name']; ?></a><ul class="left_snav_ul menu_body"></ul></li>
<?php }} ?>
</ul>
</div>

6
resources/views/home3/index/productcat.blade.php

@ -60,7 +60,7 @@ $('.bxslider').bxSlider({
<div class="row">
<div class="col-xs-12 col-sm-8 col-md-9" style="float:right">
<div class="list_box">
<h1 class="left_h1"><?php echo $post['typename']; ?></h1>
<h1 class="left_h1"><?php echo $post['name']; ?></h1>
<ul class="list_news">
<?php if(!empty($posts)){foreach($posts as $row){ ?>
<li><a href="<?php echo route('home_detail',['id'=>$row->id]); ?>"><?php echo $row->title; ?></a><span class="news_time"><?php echo date('Y-m-d',$row->pubdate); ?></span></li>
@ -73,8 +73,8 @@ $('.bxslider').bxSlider({
<div class="left_nav" id="categories">
<h3 class="left_h1">栏目导航</h3>
<ul class="left_nav_ul" id="firstpane">
<?php $posts=dataList('arctype', ['expression'=>[['reid','=',0]], 'orderby'=>['sortrank', 'desc']]);if($posts){foreach($posts as $row){ ?>
<li><a class="biglink" href="<?php echo route('home_category',['cat'=>$row['id']]); ?>"><?php echo $row['typename']; ?></a><ul class="left_snav_ul menu_body"></ul></li>
<?php $posts=dataList('arctype', ['expression'=>[['pid','=',0]], 'orderby'=>['sortrank', 'desc']]);if($posts){foreach($posts as $row){ ?>
<li><a class="biglink" href="<?php echo route('home_category',['cat'=>$row['id']]); ?>"><?php echo $row['name']; ?></a><ul class="left_snav_ul menu_body"></ul></li>
<?php }} ?>
</ul>
</div>

37
routes/web.php

@ -22,7 +22,7 @@ Route::group(['domain' => env('APP_SUBDOMAIN'), 'namespace' => 'Wap'], function
Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
Route::get('/tag{tag}', 'IndexController@tag'); //标签页
Route::get('/page/{id}', 'IndexController@singlepage')->name('wap_singlepage'); //单页
Route::get('/sitemap.xml', 'IndexController@sitemap')->name('wap_sitemap'); //sitemap
Route::get('/sitemap.xml', 'IndexController@sitemap')->name('wap_sitemap'); //sitemap
Route::get('/aaa', function () {
dd('wap');
});
@ -35,15 +35,15 @@ Route::group(['namespace' => 'Home'], function () {
Route::get('/page404', 'IndexController@page404')->name('page404'); //404页面
Route::get('/tags', 'IndexController@tags')->name('tags');
Route::get('/search', 'IndexController@search');
Route::get('/p/{id}', 'IndexController@detail')->name('home_detail'); //详情页
Route::get('/p/{id}', 'IndexController@detail')->name('home_detail'); //详情页
Route::get('/cat{cat}/{page}', 'IndexController@category'); //分类页,分页
Route::get('/cat{cat}', 'IndexController@category')->name('home_category'); //分类页
Route::get('/cat{cat}', 'IndexController@category')->name('home_category'); //分类页
Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
Route::get('/tag{tag}', 'IndexController@tag'); //标签页
Route::get('/tag{tag}', 'IndexController@tag')->name('tag'); //标签页
Route::get('/page/{id}', 'IndexController@page')->name('singlepage'); //单页
Route::get('/product/{id}', 'IndexController@product')->name('product'); //详情页
Route::get('/productcat{cat}/{page}', 'IndexController@productcat'); //产品分类页,分页
Route::get('/productcat{cat}', 'IndexController@productcat')->name('productcat'); //产品分类页
Route::get('/product/{id}', 'IndexController@product')->name('product'); //详情页
Route::get('/productcat{cat}/{page}', 'IndexController@productcat'); //产品分类页,分页
Route::get('/productcat{cat}', 'IndexController@productcat')->name('productcat'); //产品分类页
Route::get('/sitemap.xml', 'IndexController@sitemap')->name('sitemap'); //sitemap
Route::get('/aaa', function () {
@ -142,16 +142,33 @@ Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['w
Route::get('/sysconfig/edit', 'SysconfigController@edit')->name('admin_sysconfig_edit');
Route::post('/sysconfig/doedit', 'SysconfigController@doedit')->name('admin_sysconfig_doedit');
Route::get('/sysconfig/del', 'SysconfigController@del')->name('admin_sysconfig_del');
//用户
//用户管理
Route::get('/user', 'UserController@index')->name('admin_user');
Route::get('/user/add', 'UserController@add')->name('admin_user_add');
Route::post('/user/doadd', 'UserController@doadd')->name('admin_user_doadd');
Route::get('/user/edit', 'UserController@edit')->name('admin_user_edit');
Route::post('/user/doedit', 'UserController@doedit')->name('admin_user_doedit');
Route::get('/user/del', 'UserController@del')->name('admin_user_del');
//角色管理
Route::get('/userrole', 'UserRoleController@index')->name('admin_userrole');
Route::get('/userrole/add', 'UserRoleController@add')->name('admin_userrole_add');
Route::post('/userrole/doadd', 'UserRoleController@doadd')->name('admin_userrole_doadd');
Route::get('/userrole/edit', 'UserRoleController@edit')->name('admin_userrole_edit');
Route::post('/userrole/doedit', 'UserRoleController@doedit')->name('admin_userrole_doedit');
Route::get('/userrole/del', 'UserRoleController@del')->name('admin_userrole_del');
//菜单管理
Route::get('/menu', 'MenuController@index')->name('admin_menu');
Route::get('/menu/add', 'MenuController@add')->name('admin_menu_add');
Route::post('/menu/doadd', 'MenuController@doadd')->name('admin_menu_doadd');
Route::get('/menu/edit', 'MenuController@edit')->name('admin_menu_edit');
Route::post('/menu/doedit', 'MenuController@doedit')->name('admin_menu_doedit');
Route::get('/menu/del', 'MenuController@del')->name('admin_menu_del');
//后台登录注销
Route::get('/login', 'LoginController@login')->name('admin_login');
Route::post('/dologin', 'LoginController@dologin');
Route::post('/dologin', 'LoginController@dologin')->name('admin_dologin');
Route::get('/logout', 'LoginController@logout')->name('admin_logout');
Route::get('/recoverpwd', 'LoginController@recoverpwd')->name('admin_recoverpwd');
//页面跳转
Route::get('/jump', 'LoginController@jump')->name('admin_jump');
});

Loading…
Cancel
Save