Browse Source

home

master
林一峰 8 years ago
parent
commit
7c38cb92e5
  1. 63
      app/Common/function.php
  2. 138
      app/Http/Controllers/Admin/ProductController.php
  3. 76
      app/Http/Controllers/Admin/ProducttypeController.php
  4. 197
      app/Http/Controllers/Home/IndexController.php
  5. 1
      app/Http/Model/Arctype.php
  6. 14
      app/Http/Model/Friendlink.php
  7. 14
      app/Http/Model/Guestbook.php
  8. 14
      app/Http/Model/Keyword.php
  9. 14
      app/Http/Model/Page.php
  10. 43
      app/Http/Model/Product.php
  11. 13
      app/Http/Model/ProductPic.php
  12. 26
      app/Http/Model/ProductType.php
  13. 35
      app/Http/Model/Searchword.php
  14. 12
      app/Http/Model/Slide.php
  15. 2
      app/Http/Model/Sysconfig.php
  16. 35
      app/Http/Model/Tagindex.php
  17. 12
      app/Http/Model/Taglist.php
  18. 2
      app/Http/Model/User.php
  19. 2
      app/Http/Model/UserRole.php
  20. 2
      resources/views/admin/common/leftmenu.blade.php
  21. 16
      resources/views/admin/product/add.blade.php
  22. 36
      resources/views/admin/product/edit.blade.php
  23. 28
      resources/views/admin/product/index.blade.php
  24. 95
      resources/views/admin/producttype/add.blade.php
  25. 115
      resources/views/admin/producttype/edit.blade.php
  26. 12
      resources/views/admin/producttype/index.blade.php
  27. 1
      resources/views/home/common/footer.blade.php
  28. 1
      resources/views/home/common/header.blade.php
  29. 62
      resources/views/home/index/category.blade.php
  30. 57
      resources/views/home/index/category2.blade.php
  31. 60
      resources/views/home/index/detail.blade.php
  32. 70
      resources/views/home/index/index.blade.php
  33. 171
      resources/views/home/index/login.blade.php
  34. 8
      resources/views/home/index/page.blade.php
  35. 35
      resources/views/home/index/search.blade.php
  36. 9
      resources/views/home/index/sitemap.blade.php
  37. 62
      resources/views/home/index/tag.blade.php
  38. 58
      resources/views/home/index/tag2.blade.php
  39. 57
      resources/views/home/index/tag3.blade.php
  40. 7
      resources/views/home/index/tags.blade.php
  41. 49
      routes/web.php

63
app/Common/function.php

@ -113,24 +113,59 @@ function get_wap_front_url(array $param)
*/
function arclist(array $param)
{
$map=array();
if(isset($param['tuijian'])){$map['tuijian']=$param['tuijian'];}
if(isset($param['typeid'])){$map['typeid']=$param['typeid'];}
if(isset($param['image'])){$map['litpic']=array('NEQ','');}
if(isset($param['limit'])){$limit=$param['limit'];}else{if(isset($param['row'])){$limit="0,".$param['row'];}else{$limit='0,'.cms_pagesize;}}
if(isset($param['orderby'])){$orderby=$param['orderby'];}else{$orderby='id desc';}
$modelname = 'article';
if(isset($param['table'])){$modelname = $param['table'];}
$model = \DB::table($modelname);
if(isset($param['sql']))
{
$Artlist = db("article")->field('body',true)->where($param['sql'])->order($orderby)->limit($limit)->select();
}
else
$size = sysconfig('CMS_PAGESIZE');$page = 1;$skip = 0;
if(isset($param['limit'])){$limit=explode(',',$param['limit']); $skip = $limit[0]; $size = $limit[1];}else{if(isset($param['row'])){$size = $param['row'];}} // 参数格式:$param['limit'] = '2,10';$param['row'] = 10;
//查询条件
$where = function ($query) use ($param) {
if(isset($param['tuijian']))
{
$query->where('tuijian', $param['tuijian']);
//$query->where('title', 'like', '%'.$_REQUEST['keyword'].'%');
}
if(isset($param['typeid']))
{
$query->where('typeid', $param["typeid"]);
}
if(isset($param['image']))
{
$query->where('litpic', '<>', '');
}
};
if(!empty($where)){$model = $model->where($where);}
//排序
if(isset($param['orderby']))
{
$Artlist = db("article")->field('body',true)->where($map)->order($orderby)->limit($limit)->select();
$orderby = $param['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(isset($param['field'])){$model = $model->select(\DB::raw($param['field']));}
if($skip==0){$skip = ($page-1)*$size;}
return $Artlist;
return object_to_array($model->skip($skip)->take($size)->get());
}
/**

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

@ -1,49 +1,55 @@
<?php
namespace app\fladmin\controller;
namespace App\Http\Controllers\Admin;
class Product extends Base
use App\Http\Controllers\Admin\CommonController;
use DB;
class ProductController extends CommonController
{
public function _initialize()
{
parent::_initialize();
public function __construct()
{
parent::__construct();
}
public function index()
{
$where = array();
if(isset($_REQUEST["keyword"]))
{
$where['title'] = array('like','%'.$_REQUEST['keyword'].'%');
}
if(isset($_REQUEST["typeid"]) && $_REQUEST["typeid"]!=0)
{
$where['typeid'] = $_REQUEST["typeid"];
}
if(isset($_REQUEST["id"]))
{
$where['typeid'] = $_REQUEST["id"];
}
$prolist = parent::pageList('product',$where);
$posts = array();
foreach($prolist as $key=>$value)
$res = '';
$where = function ($query) use ($res) {
if(isset($_REQUEST["keyword"]))
{
$query->where('title', 'like', '%'.$_REQUEST['keyword'].'%');
}
if(isset($_REQUEST["typeid"]) && $_REQUEST["typeid"]!=0)
{
$query->where('typeid', $_REQUEST["typeid"]);
}
if(isset($_REQUEST["id"]))
{
$query->where('typeid', $_REQUEST["id"]);
}
};
$posts = parent::pageList('product', $where);
foreach($posts as $key=>$value)
{
$info = db('product_type')->field('content',true)->where("id=".$value['typeid'])->find();
$value['typename'] = $info['typename'];
$posts[] = $value;
$info = DB::table('product_type')->select('typename')->where("id", $value->typeid)->first();
$posts[$key]->typename = $info->typename;
$posts[$key]->body = '';
}
$this->assign('page',$prolist->render());
$this->assign('posts',$posts);
$data['posts'] = $posts;
return $this->fetch();
return view('admin.product.index', $data);
}
public function add()
{
if(!empty($_GET["catid"])){$this->assign('catid',$_GET["catid"]);}else{$this->assign('catid',0);}
$data = [];
if(!empty($_GET["catid"])){$data['catid'] = $_GET["catid"];}else{$data['catid'] = 0;}
return $this->fetch();
return view('admin.product.add', $data);
}
public function doadd()
@ -51,7 +57,7 @@ class Product extends Base
$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
$_POST['user_id'] = $_SESSION['admin_user_info']['id']; // 发布者id
//关键词
if(!empty($_POST["keywords"]))
@ -69,15 +75,16 @@ class Product extends Base
}
}
unset($_POST["_token"]);
if(isset($_POST['editorValue'])){unset($_POST['editorValue']);}
if(db('product')->insert($_POST))
if(DB::table('product')->insert($_POST))
{
$this->success('添加成功!', FLADMIN.'/Product' , 1);
success_jump('添加成功!', route('admin_product'));
}
else
{
$this->error('添加失败!请修改后重新添加', FLADMIN.'/Product/add' , 3);
error_jump('添加失败!请修改后重新添加');
}
}
@ -85,10 +92,10 @@ class Product extends Base
{
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());
$data['id'] = $id;
$data['post'] = object_to_array(DB::table('product')->where('id', $id)->first(), 1);
return $this->fetch();
return view('admin.product.edit', $data);
}
public function doedit()
@ -98,7 +105,7 @@ class Product extends Base
$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
$_POST['user_id'] = $_SESSION['admin_user_info']['id']; // 修改者id
//关键词
if(!empty($_POST["keywords"]))
@ -116,66 +123,65 @@ class Product extends Base
}
}
unset($_POST["_token"]);
if(isset($_POST['editorValue'])){unset($_POST['editorValue']);}
if(db('product')->where("id=$id")->update($_POST))
if(DB::table('product')->where('id', $id)->update($_POST))
{
$this->success('修改成功!', FLADMIN.'/Product' , 1);
success_jump('修改成功!', route('admin_product'));
}
else
{
$this->error('修改失败!', FLADMIN.'/Product/edit?id='.$_POST["id"] , 3);
error_jump('修改失败!');
}
}
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(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
if(db('product')->where("id in ($id)")->delete())
if(DB::table('product')->whereIn("id", explode(',', $id))->delete())
{
$this->success("$id ,删除成功", FLADMIN.'/Product' , 1);
success_jump("$id ,删除成功");
}
else
{
$this->error("$id ,删除失败!请重新提交", FLADMIN.'/Product', 3);
error_jump("$id ,删除失败!请重新提交");
}
}
//商品推荐
public function recommendarc()
{
if(!empty($_GET["id"])){$id = $_GET["id"];}else{$this->error('删除失败!请重新提交',FLADMIN.'/Product' , 3);} //if(preg_match('/[0-9]*/',$id)){}else{exit;}
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
$data['tuijian'] = 1;
if(db('product')->where("id in ($id)")->update($data))
if(DB::table('product')->whereIn("id", explode(',', $id))->update($data))
{
$this->success("$id ,推荐成功", FLADMIN.'/Product', 1);
success_jump("$id ,推荐成功");
}
else
{
$this->error("$id ,推荐失败!请重新提交", FLADMIN.'/Product', 3);
error_jump("$id ,推荐失败!请重新提交");
}
}
//商品是否存在
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();
$res = '';
$where = function ($query) use ($res) {
if(isset($_REQUEST["title"]))
{
$query->where('title', $_REQUEST["title"]);
}
if(isset($_REQUEST["id"]))
{
$query->where('id', '<>', $_REQUEST["id"]);
}
};
return DB::table("product")->where($where)->count();
}
}

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

@ -1,18 +1,20 @@
<?php
namespace app\fladmin\controller;
namespace App\Http\Controllers\Admin;
class Producttype extends Base
use App\Http\Controllers\Admin\CommonController;
use DB;
class ProductTypeController extends CommonController
{
public function _initialize()
{
parent::_initialize();
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->assign('catlist',tree(get_category('product_type',0)));
return $this->fetch();
$data['catlist'] = category_tree(get_category('product_type',0));
return view('admin.producttype.index', $data);
}
public function add()
@ -21,18 +23,20 @@ class Producttype extends Base
{
$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());
$data['postone'] = object_to_array(DB::table("product_type")->where('id', $id)->first(), 1);
}
$this->assign('id',$id);
$data['id'] = $id;
}
else
{
$this->assign('id',0);
$data['id'] = 0;
}
return $this->fetch();
return view('admin.producttype.add', $data);
}
public function doadd()
@ -40,13 +44,16 @@ class Producttype extends Base
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))
unset($_POST["_token"]);
if(isset($_POST['editorValue'])){unset($_POST['editorValue']);}
if(DB::table("product_type")->insert($_POST))
{
$this->success('添加成功!', FLADMIN.'/Producttype' , 1);
success_jump('添加成功!', route('admin_producttype'));
}
else
{
$this->error('添加失败!请修改后重新添加', FLADMIN.'/Producttype' , 3);
error_jump('添加失败!请修改后重新添加');
}
}
@ -54,13 +61,13 @@ class Producttype extends Base
{
$id = $_GET["id"];if(preg_match('/[0-9]*/',$id)){}else{exit;}
$this->assign('id',$id);
$post = db("product_type")->where("id=$id")->find();
$data['id'] = $id;
$post = object_to_array(DB::table("product_type")->where('id', $id)->first(), 1);
$reid = $post['reid'];
if($reid!=0){$this->assign('postone',db("product_type")->where("id=$reid")->find());}
$this->assign('post',$post);
if($reid!=0){$data['postone'] = object_to_array(DB::table("product_type")->where('id', $reid)->first(), 1);}
$data['post'] = $post;
return $this->fetch();
return view('admin.producttype.edit', $data);
}
public function doedit()
@ -68,47 +75,50 @@ class Producttype extends Base
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))
unset($_POST["_token"]);
if(isset($_POST['editorValue'])){unset($_POST['editorValue']);}
if(DB::table("product_type")->where('id', $id)->update($_POST))
{
$this->success('修改成功!', FLADMIN.'/Producttype' , 1);
success_jump('修改成功!', route('admin_producttype'));
}
else
{
$this->error('修改失败!请修改后重新添加', FLADMIN.'/Producttype/edit?id='.$_POST["id"] , 3);
error_jump('修改失败!请修改后重新添加');
}
}
public function del()
{
if(!empty($_GET["id"])){$id = $_GET["id"];}else{$this->error('删除失败!请重新提交',FLADMIN.'/Producttype' , 3);}
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
if(db("product_type")->where("reid=$id")->find())
if(DB::table("product_type")->where('reid', $id)->first())
{
$this->error('删除失败!请先删除子分类', FLADMIN.'/Producttype', 3);
error_jump('删除失败!请先删除子分类');
}
else
{
if(db("product_type")->where("id=$id")->delete())
if(DB::table("product_type")->where('id', $id)->delete())
{
if(db("product")->where("typeid=$id")->count()>0) //判断该分类下是否有商品,如果有把该分类下的商品也一起删除
if(DB::table("product")->where('typeid', $id)->count()>0) //判断该分类下是否有商品,如果有把该分类下的商品也一起删除
{
if(db("product")->where("typeid=$id")->delete())
if(DB::table("product")->where('typeid', $id)->delete())
{
$this->success('删除成功', FLADMIN.'/Producttype' , 1);
success_jump('删除成功');
}
else
{
$this->error('分类下的商品删除失败!', FLADMIN.'/Producttype', 3);
error_jump('分类下的商品删除失败!');
}
}
else
{
$this->success('删除成功', FLADMIN.'/Producttype' , 1);
success_jump('删除成功');
}
}
else
{
$this->error('删除失败!请重新提交', FLADMIN.'/Producttype', 3);
error_jump('删除失败!请重新提交');
}
}
}

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

@ -13,24 +13,199 @@ class IndexController extends CommonController
parent::__construct();
}
public function index()
//首页
public function index()
{
$user = DB::table('article')->where('id', '1')->first();
echo $user->title;
//$Article = Article::find(1)->arctype;
//$Article = Article::find(1);
//$Article = Arctype::find(1)->article()->get()->toArray();
return view('home.index.index');
}
//列表页
public function category()
{
$cat=input('cat');
$pagenow=input('page');
if(empty($cat) || !preg_match('/[0-9]+/',$cat)){$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;}
if(cache("catid$cat")){$post=cache("catid$cat");}else{$post = db('arctype')->where("id=$cat")->find();if(empty($post)){$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;}cache("catid$cat",$post,2592000);}
$this->assign('post',$post);
$subcat="";$sql="";
$post2=db('arctype')->field('id')->where("reid=$cat")->select();
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;
$this->assign('sql',$sql);
//$comment = Article::find(1)->arctype()->first()->toArray();
//echo $comment->arctype->typename;
//print_r($comment);
$counts=db("article")->where($sql)->count('id');
if($counts>CMS_MAXARC){$counts=CMS_MAXARC;}
$pagesize=CMS_PAGESIZE;$page=0;
if($counts % $pagesize){//取总数据量除以每页数的余数
$pages = intval($counts/$pagesize) + 1; //如果有余数,则页数等于总数据量除以每页数的结果取整再加一,如果没有余数,则页数等于总数据量除以每页数的结果
}else{$pages = $counts/$pagesize;}
if(!empty($pagenow)){if($pagenow==1 || $pagenow>$pages){header("HTTP/1.0 404 Not Found");$this->error('您访问的页面不存在或已被删除!');exit;}$page = $pagenow-1;$nextpage=$pagenow+1;$previouspage=$pagenow-1;}else{$page = 0;$nextpage=2;$previouspage=0;}
$this->assign('page',$page);
$this->assign('pages',$pages);
$this->assign('counts',$counts);
$start=$page*$pagesize;
//dd($comment);
$this->assign('posts',arclist(array("sql"=>$sql,"limit"=>"$start,$pagesize"))); //获取列表
$this->assign('pagenav',get_listnav(array("counts"=>$counts,"pagesize"=>$pagesize,"pagenow"=>$page+1,"catid"=>$cat))); //获取分页列表
if($post['templist']=='category2'){if(!empty($pagenow)){$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;}}
return $this->fetch($post['templist']);
return view('home.index.index');
}
//文章详情页
public function detail()
{
$id=input('id');
if(empty($id) || !preg_match('/[0-9]+/',$id)){$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;}
if(cache("detailid$id")){$post=cache("detailid$id");}else{$post = db('article')->where("id=$id")->find();if(empty($post)){$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;}$post['typename'] = db('arctype')->where("id=".$post['typeid'])->value('typename');cache("detailid$id",$post,2592000);}
if($post)
{
$cat=$post['typeid'];
$post['body']=ReplaceKeyword($post['body']);
if(!empty($post['writer'])){$post['writertitle']=$post['title'].' '.$post['writer'];}
$this->assign('post',$post);
$this->assign('pre',get_article_prenext(array('aid'=>$post["id"],'typeid'=>$post["typeid"],'type'=>"pre")));
}
else
{
$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;
}
if(cache("catid$cat")){$post=cache("catid$cat");}else{$post = db('arctype')->where("id=$cat")->find();cache("catid$cat",$post,2592000);}
return $this->fetch($post['temparticle']);return view('home.index.index');
}
//标签详情页,共有3种显示方式,1正常列表,2列表显示文章,3显示描述
public function tag()
{
$tag=input('tag');
$pagenow=input('page');
if(empty($tag) || !preg_match('/[0-9]+/',$tag)){$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;}
if(cache("tagid$tag")){$post=cache("tagid$tag");}else{$post = db('tagindex')->where("id=$tag")->find();cache("tagid$tag",$post,2592000);}
$this->assign('post',$post);
$counts=db("taglist")->where("tid=$tag")->count('aid');
if($counts>CMS_MAXARC){$counts=CMS_MAXARC;}
$pagesize=CMS_PAGESIZE;$page=0;
if($counts % $pagesize){//取总数据量除以每页数的余数
$pages = intval($counts/$pagesize) + 1; //如果有余数,则页数等于总数据量除以每页数的结果取整再加一,如果没有余数,则页数等于总数据量除以每页数的结果
}else{$pages = $counts/$pagesize;}
if(!empty($pagenow)){if($pagenow==1 || $pagenow>$pages){header("HTTP/1.0 404 Not Found");$this->error('您访问的页面不存在或已被删除!');exit;}$page = $pagenow-1;$nextpage=$pagenow+1;$previouspage=$pagenow-1;}else{$page = 0;$nextpage=2;$previouspage=0;}
$this->assign('page',$page);
$this->assign('pages',$pages);
$this->assign('counts',$counts);
$start=$page*$pagesize;
$posts=db("taglist")->where("tid=$tag")->order('aid desc')->limit("$start,$pagesize")->select();
foreach($posts as $row)
{
$aid[] = $row["aid"];
}
$aid = isset($aid)?implode(',',$aid):"";
if($aid!="")
{
if($post['template']=='tag2')
{
$this->assign('posts',arclist(array("sql"=>"id in ($aid)","orderby"=>"id desc","limit"=>"$pagesize","field"=>"title,body"))); //获取列表
}
else
{
$this->assign('posts',arclist(array("sql"=>"id in ($aid)","orderby"=>"id desc","limit"=>"$pagesize"))); //获取列表
}
}
else
{
$this->assign('posts',""); //获取列表
}
$this->assign('pagenav',get_listnav(array("counts"=>$counts,"pagesize"=>$pagesize,"pagenow"=>$page+1,"catid"=>$tag,"urltype"=>"tag"))); //获取分页列表
if($post['template']=='tag2' || $post['template']=='tag3'){if(!empty($pagenow)){$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;}}
return $this->fetch($post['template']);
return view('home.index.index');
}
//标签页
public function tags()
{
return view('home.index.tags');
}
//搜索页
public function search()
{
if(!empty($_GET["keyword"]))
{
$keyword = $_GET["keyword"]; //搜索的关键词
if(strstr($keyword,"&")) exit;
$map['title'] = array('LIKE',"%$keyword%");
$this->assign('posts',db("article")->field('body',true)->where($map)->order('id desc')->limit(30)->select());
$this->assign('keyword',$keyword);
}
else
{
$this->error('请输入正确的关键词', '/' , 3);exit;
}
return view('home.index.search');
}
//单页面
public function page()
{
$id=input('id');
if(!empty($id) && preg_match('/[a-z0-9]+/',$id))
{
$map['filename']=$id;
if(cache("pageid$id")){$post=cache("pageid$id");}else{$post = db('page')->where($map)->find();cache("pageid$id",$post,2592000);}
if($post)
{
$this->assign('post',$post);
}
else
{
$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;
}
}
else
{
$this->error('您访问的页面不存在或已被删除!', '/' , 3);exit;
}
return view('home.index.'.$post['template']);
}
//sitemap页面
public function sitemap()
{
return $this->fetch();
}
//404页面
public function page404()
{
return view('home.404');
}
//测试页面
public function test()
{
return date("Y-m-d H:i:s",strtotime("2017-04"));
}
}

1
app/Http/Model/Arctype.php

@ -13,7 +13,6 @@ class Arctype extends Model
* @var string
*/
protected $table = 'arctype';
public $timestamps = false;
/**
* 表明模型是否应该被打上时间戳

14
app/Http/Model/Friendlink.php

@ -0,0 +1,14 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Friendlink extends Model
{
//友情链接
protected $table = 'friendlink';
public $timestamps = false;
protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
}

14
app/Http/Model/Guestbook.php

@ -0,0 +1,14 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Guestbook extends Model
{
//在线留言
protected $table = 'guestbook';
public $timestamps = false;
protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
}

14
app/Http/Model/Keyword.php

@ -0,0 +1,14 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Keyword extends Model
{
//内链关键词
protected $table = 'keyword';
public $timestamps = false;
protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
}

14
app/Http/Model/Page.php

@ -0,0 +1,14 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Page extends Model
{
//单页模型
protected $table = 'page';
public $timestamps = false;
protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
}

43
app/Http/Model/Product.php

@ -0,0 +1,43 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
//产品模型
/**
* 关联到模型的数据表
*
* @var string
*/
protected $table = 'product';
/**
* 表明模型是否应该被打上时间戳
* 默认情况下,Eloquent 期望 created_at 和updated_at 已经存在于数据表中,如果你不想要这些 Laravel 自动管理的数据列,在模型类中设置 $timestamps 属性为 false
*
* @var bool
*/
public $timestamps = false;
//protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
//protected $fillable = ['name']; //定义哪些字段是可以进行赋值的,与$guarded相反
/**
* The connection name for the model.
* 默认情况下,所有的 Eloquent 模型使用应用配置中的默认数据库连接,如果你想要为模型指定不同的连接,可以通过 $connection 属性来设置
* @var string
*/
//protected $connection = 'connection-name';
/**
* 获取关联到产品的分类
*/
public function producttype()
{
return $this->belongsTo(ProductType::class, 'typeid', 'id');
}
}

13
app/Http/Model/ProductPic.php

@ -0,0 +1,13 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class ProductPic extends Model
{
//产品图片
protected $table = 'product_pic';
public $timestamps = false;
}

26
app/Http/Model/ProductType.php

@ -0,0 +1,26 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class ProductType extends Model
{
//产品分类模型
/**
* 关联到模型的数据表
*
* @var string
*/
protected $table = 'product_type';
public $timestamps = false;
/**
* 获取分类对应的产品
*/
public function product()
{
return $this->hasMany(ProductType::class, 'typeid', 'id');
}
}

35
app/Http/Model/Searchword.php

@ -0,0 +1,35 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Searchword extends Model
{
//搜索关键词模型
/**
* 关联到模型的数据表
*
* @var string
*/
protected $table = 'searchword';
/**
* 表明模型是否应该被打上时间戳
* 默认情况下,Eloquent 期望 created_at 和updated_at 已经存在于数据表中,如果你不想要这些 Laravel 自动管理的数据列,在模型类中设置 $timestamps 属性为 false
*
* @var bool
*/
public $timestamps = false;
//protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
//protected $fillable = ['name']; //定义哪些字段是可以进行赋值的,与$guarded相反
/**
* The connection name for the model.
* 默认情况下,所有的 Eloquent 模型使用应用配置中的默认数据库连接,如果你想要为模型指定不同的连接,可以通过 $connection 属性来设置
* @var string
*/
//protected $connection = 'connection-name';
}

12
app/Http/Model/Slide.php

@ -0,0 +1,12 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Slide extends Model
{
protected $table = 'slide';
public $timestamps = false;
protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
}

2
app/Http/Model/Sysconfig.php

@ -5,6 +5,8 @@ use Illuminate\Database\Eloquent\Model;
class Sysconfig extends Model
{
//系统参数配置
protected $table = 'sysconfig';
public $timestamps = false;

35
app/Http/Model/Tagindex.php

@ -0,0 +1,35 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Tagindex extends Model
{
//Tag标签模型
/**
* 关联到模型的数据表
*
* @var string
*/
protected $table = 'tagindex';
/**
* 表明模型是否应该被打上时间戳
* 默认情况下,Eloquent 期望 created_at 和updated_at 已经存在于数据表中,如果你不想要这些 Laravel 自动管理的数据列,在模型类中设置 $timestamps 属性为 false
*
* @var bool
*/
public $timestamps = false;
//protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
//protected $fillable = ['name']; //定义哪些字段是可以进行赋值的,与$guarded相反
/**
* The connection name for the model.
* 默认情况下,所有的 Eloquent 模型使用应用配置中的默认数据库连接,如果你想要为模型指定不同的连接,可以通过 $connection 属性来设置
* @var string
*/
//protected $connection = 'connection-name';
}

12
app/Http/Model/Taglist.php

@ -0,0 +1,12 @@
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class Taglist extends Model
{
protected $table = 'taglist';
public $timestamps = false;
protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
}

2
app/Http/Model/User.php

@ -5,6 +5,8 @@ use Illuminate\Database\Eloquent\Model;
class User extends Model
{
//用户模型
protected $table = 'user';
public $timestamps = false;

2
app/Http/Model/UserRole.php

@ -5,6 +5,8 @@ use Illuminate\Database\Eloquent\Model;
class UserRole extends Model
{
//用户角色
protected $table = 'user_role';
public $timestamps = false;

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

@ -8,7 +8,7 @@
<dt>商品管理</dt>
<dd><a href="<?php echo route('admin'); ?>/product"><span class="glyphicon glyphicon-pencil"></span> 商品列表</a></dd>
<dd><a href="<?php echo route('admin'); ?>/product/add"><span class="glyphicon glyphicon-file"></span> 添加商品</a></dd>
<dd><a href="<?php echo route('admin'); ?>/productType"><span class="glyphicon glyphicon-th-list"></span> 商品分类</a></dd>
<dd><a href="<?php echo route('admin'); ?>/producttype"><span class="glyphicon glyphicon-th-list"></span> 商品分类</a></dd>
<dt>批量维护</dt>
<dd><a href="<?php echo route('admin'); ?>/tag"><span class="glyphicon glyphicon-tag"></span> TAG标签管理</a></dd>
<dd><a href="<?php echo route('admin'); ?>/searchword"><span class="glyphicon glyphicon-fire"></span> 关键词管理</a></dd>

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

@ -1,12 +1,12 @@
<!DOCTYPE html><html><head><title>添加商品信息_后台管理</title>{include file="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 file="common/leftmenu"/}</div><!-- 左边结束 -->
<!-- 左边开始 --><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/Product">商品列表</a> > 添加商品</h5>
<h5 class="sub-header"><a href="/fladmin/product">商品列表</a> > 添加商品</h5>
<form id="addarc" method="post" action="/fladmin/Product/doadd" role="form" enctype="multipart/form-data" class="table-responsive">
<form id="addarc" method="post" action="/fladmin/product/doadd" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
@ -32,7 +32,7 @@
<td align="right">推荐:</td>
<td>
<select name="tuijian" id="tuijian">
<?php $tuijian = config('tuijian');
<?php $tuijian = config('custom.tuijian');
for($i=0;$i<count($tuijian);$i++){ ?><option value="<?php echo $i; ?>"><?php echo $tuijian[$i]; ?></option><?php } ?>
</select>
</td>
@ -77,7 +77,7 @@ function upImage()
<td align="right">商品类目:</td>
<td>
<select name="typeid" id="typeid">
<?php $catlist = tree(get_category('product_type',0));foreach($catlist as $row){
<?php $catlist = category_tree(get_category('product_type',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>
<?php }else{ ?>
@ -146,7 +146,7 @@ $(function(){
//var description = $("#description").val();
/*$.ajax({
url: "/fladmin/Product/doedit",
url: "/fladmin/product/doedit",
type: "POST",
dataType: "json",
cache: false,
@ -173,7 +173,7 @@ $(function(){
if(data.code==200)
{
//alert(data.info);
window.location.replace("/fladmin/Product");
window.location.replace("/fladmin/product");
}
}
}); */

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

@ -1,38 +1,38 @@
<!DOCTYPE html><html><head><title>修改商品信息_后台管理</title>{include file="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 file="common/leftmenu"/}</div><!-- 左边结束 -->
<!-- 左边开始 --><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/Product">商品列表</a> > 修改商品</h5>
<h5 class="sub-header"><a href="/fladmin/product">商品列表</a> > 修改商品</h5>
<form id="addarc" method="post" action="/fladmin/Product/doedit" role="form" enctype="multipart/form-data" class="table-responsive">
<form id="addarc" method="post" action="/fladmin/product/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="title" type="text" id="title" value="{$post["title"]}" class="required" style="width:60%" placeholder="在此输入标题"><input style="display:none;" type="text" name="id" id="id" value="{$id}"></td>
<td><input name="title" type="text" id="title" value="<?php echo $post["title"]; ?>" class="required" style="width:60%" placeholder="在此输入标题"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td>
</tr>
<tr>
<td align="right">货号:</td>
<td colspan="2"><input name="serial_no" type="text" id="serial_no" style="width:180px" value="{$post["serial_no"]}">&nbsp;&nbsp; 运费:<input name="delivery_fee" type="text" id="delivery_fee" style="width:100px" value="{$post["delivery_fee"]}">&nbsp;&nbsp; 销量:<input name="sales" type="text" id="sales" style="width:60px" value="{$post["sales"]}"></td>
<td colspan="2"><input name="serial_no" type="text" id="serial_no" style="width:180px" value="<?php echo $post["serial_no"]; ?>">&nbsp;&nbsp; 运费:<input name="delivery_fee" type="text" id="delivery_fee" style="width:100px" value="<?php echo $post["delivery_fee"]; ?>">&nbsp;&nbsp; 销量:<input name="sales" type="text" id="sales" style="width:60px" value="<?php echo $post["sales"]; ?>"></td>
</tr>
<tr>
<td align="right">商品价格:</td>
<td colspan="2"><input name="price" type="text" id="price" style="width:100px" value="{$post["price"]}">&nbsp;&nbsp; 原价:<input name="origin_price" type="text" id="origin_price" style="width:100px" value="{$post["origin_price"]}">&nbsp;&nbsp; 库存:<input name="inventory" type="text" id="inventory" style="width:60px" value="{$post["inventory"]}">&nbsp;&nbsp; 浏览次数:<input type="text" name="click" id="click" value="{$post["click"]}" style="width:60px;"></td>
<td colspan="2"><input name="price" type="text" id="price" style="width:100px" value="<?php echo $post["price"]; ?>">&nbsp;&nbsp; 原价:<input name="origin_price" type="text" id="origin_price" style="width:100px" value="<?php echo $post["origin_price"]; ?>">&nbsp;&nbsp; 库存:<input name="inventory" type="text" id="inventory" style="width:60px" value="<?php echo $post["inventory"]; ?>">&nbsp;&nbsp; 浏览次数:<input type="text" name="click" id="click" value="<?php echo $post["click"]; ?>" style="width:60px;"></td>
</tr>
<tr>
<td align="right">上架:</td>
<td>
<input type="radio" value='0' name="status" {if condition="$post['status']==0"}checked{/if} />&nbsp;&nbsp;&nbsp;
<input type="radio" value='1' name="status" {if condition="$post['status']==1"}checked{/if} />&nbsp;
<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;否
</td>
</tr>
<tr>
<td align="right">推荐:</td>
<td>
<select name="tuijian" id="tuijian">
<?php $tuijian = config('tuijian');
<?php $tuijian = config('custom.tuijian');
for($i=0;$i<count($tuijian);$i++){if($i==$post["tuijian"]){?><option selected="selected" value="<?php echo $i; ?>"><?php echo $tuijian[$i]; ?></option>
<?php }else{?><option value="<?php echo $i; ?>"><?php echo $tuijian[$i]; ?></option><?php }} ?>
</select>
@ -40,11 +40,11 @@
</tr>
<tr>
<td align="right">seoTitle:</td>
<td><input name="seotitle" type="text" id="seotitle" value="{$post["seotitle"]}" style="width:60%"></td>
<td><input name="seotitle" type="text" id="seotitle" value="<?php echo $post["seotitle"]; ?>" style="width:60%"></td>
</tr>
<tr>
<td align="right" style="vertical-align:middle;">缩略图:</td>
<td style="vertical-align:middle;"><button type="button" onclick="upImage();">选择图片</button> <input name="litpic" type="text" id="litpic" value="{$post["litpic"]}" style="width:40%"> <img style="margin-left:20px;<?php if(empty($post["litpic"]) || !imgmatch($post["litpic"])){ echo "display:none;"; } ?>" src="<?php if(imgmatch($post["litpic"])){echo $post["litpic"];} ?>" width="120" height="80" id="picview" name="picview"></td>
<td style="vertical-align:middle;"><button type="button" onclick="upImage();">选择图片</button> <input name="litpic" type="text" id="litpic" value="<?php echo $post["litpic"]; ?>" style="width:40%"> <img style="margin-left:20px;<?php if(empty($post["litpic"]) || !imgmatch($post["litpic"])){ echo "display:none;"; } ?>" src="<?php if(imgmatch($post["litpic"])){echo $post["litpic"];} ?>" width="120" height="80" id="picview" name="picview"></td>
</tr>
<script type="text/javascript">
var _editor;
@ -78,7 +78,7 @@ function upImage()
<td align="right">商品类目:</td>
<td>
<select name="typeid" id="typeid">
<?php $catlist = tree(get_category('product_type',0));foreach($catlist as $row){
<?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>
<?php }else{ ?>
@ -89,18 +89,18 @@ function upImage()
</tr>
<tr>
<td align="right">关键词:</td>
<td><input type="text" name="keywords" id="keywords" style="width:50%" value="{$post["keywords"]}"> (多个用","分开)</td>
<td><input type="text" name="keywords" id="keywords" style="width:50%" value="<?php echo $post["keywords"]; ?>"> (多个用","分开)</td>
</tr>
<tr>
<td align="right" style="vertical-align:middle;">内容摘要:</td>
<td><textarea name="description" rows="5" id="description" style="width:60%;height:70px;vertical-align:middle;">{$post["description"]}</textarea></td>
<td><textarea name="description" rows="5" id="description" style="width:60%;height:70px;vertical-align:middle;"><?php echo $post["description"]; ?></textarea></td>
</tr>
<tr>
<td colspan="2"><strong>图文描述:</strong></td>
</tr>
<tr>
<td colspan="2">
<!-- 加载编辑器的容器 --><script id="container" name="body" type="text/plain">{$post["body"]}</script>
<!-- 加载编辑器的容器 --><script id="container" name="body" type="text/plain"><?php echo $post["body"]; ?></script>
<!-- 配置文件 --><script type="text/javascript" src="/other/flueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 --><script type="text/javascript" src="/other/flueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 --><script type="text/javascript">var ue = UE.getEditor('container',{maximumWords:100000,initialFrameHeight:320,enableAutoSave:false});</script></td>
@ -147,7 +147,7 @@ $(function(){
//var description = $("#description").val();
/*$.ajax({
url: "/fladmin/Product/doedit",
url: "/fladmin/product/doedit",
type: "POST",
dataType: "json",
cache: false,
@ -174,7 +174,7 @@ $(function(){
if(data.code==200)
{
//alert(data.info);
window.location.replace("/fladmin/Product");
window.location.replace("/fladmin/product");
}
}
}); */

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

@ -1,9 +1,9 @@
<!DOCTYPE html><html><head><title>商品列表_<?php echo CMS_WEBNAME; ?>后台管理</title>{include file="common/header"/}
<!DOCTYPE html><html><head><title>商品列表_<?php echo sysconfig('CMS_WEBNAME'); ?>后台管理</title>@include('admin.common.header')
<div class="container-fluid">
<div class="row">
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">{include file="common/leftmenu"/}</div><!-- 左边结束 -->
<!-- 左边开始 --><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/ProductType">商品分类</a> > <a href="/fladmin/Product">商品列表</a> [ <a href="/fladmin/Product/add<?php if(!empty($_GET["id"])){echo '?catid='.$_GET["id"];}?>">发布商品</a> ]</h5>
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox"><h5 class="sub-header"><a href="/fladmin/producttype">商品分类</a> > <a href="/fladmin/product">商品列表</a> [ <a href="/fladmin/product/add<?php if(!empty($_GET["id"])){echo '?catid='.$_GET["id"];}?>">发布商品</a> ]</h5>
<div class="table-responsive">
<table class="table table-striped table-hover">
@ -19,11 +19,11 @@
<tbody>
<?php foreach($posts as $row){ ?>
<tr>
<td><?php echo $row["id"]; ?></td>
<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>";} ?> </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 get_front_url(array("type"=>"content","catid"=>$row["typeid"],"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><?php echo $row->id; ?></td>
<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 get_front_url(array("type"=>"content","catid"=>$row->typeid,"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>
@ -37,15 +37,15 @@
</table>
</div><!-- 表格结束 -->
<div>
<form id="searcharc" class="navbar-form" action="/fladmin/Product/index" method="get">
<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 = tree(get_category('product_type',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('product_type',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 } ?>
</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">{$page}</div>
<div class="backpages">{{ $posts->links() }}</div>
<script>
//批量删除商品
@ -55,13 +55,13 @@ function delArc(aid)
if(checkvalue=='')
{
alert('必须选择一个或多个文档!');
alert('必须选择一个或多个商品!');
return;
}
if(confirm("确定删除吗"))
{
location="/fladmin/Product/del?id="+checkvalue;
location="<?php echo route('admin_product_del'); ?>?id="+checkvalue;
}
else
{
@ -82,7 +82,7 @@ function tjArc(aid)
if(confirm("确定要推荐吗"))
{
location="/fladmin/Product/recommendarc?id="+checkvalue;
location="<?php echo route('admin_product_recommendarc'); ?>?id="+checkvalue;
}
else
{

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

@ -1,12 +1,12 @@
<!DOCTYPE html><html><head><title>添加分类_后台管理</title>{include file="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 file="common/leftmenu"/}</div><!-- 左边结束 -->
<!-- 左边开始 --><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/Producttype">商品分类管理</a> > 添加分类</h5>
<h5 class="sub-header"><a href="/fladmin/producttype">商品分类管理</a> > 添加分类</h5>
<form method="post" action="/fladmin/Producttype/doadd" role="form" id="addcat" class="table-responsive">
<form method="post" action="/fladmin/producttype/doadd" role="form" id="addcat" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
@ -23,41 +23,44 @@
</tr>
<tr>
<td align="right">列表模板:</td>
<td><input name="templist" id="templist" type="text" value="productcategory.html" class="required" size="20"></td>
<td><input name="templist" id="templist" type="text" value="productcategory" class="required" size="20"></td>
</tr>
<tr>
<td align="right">文章模板:</td>
<td><input name="temparticle" id="temparticle" type="text" value="productdetail.html" class="required" size="20"></td>
<td><input name="temparticle" id="temparticle" type="text" value="productdetail" class="required" size="20"></td>
</tr>
<tr>
<td align="right" style="vertical-align:middle;">缩略图:</td>
<td style="vertical-align:middle;"><input id="file_upload" value="选择文件" name="file_upload" type="file" multiple="true"> <input name="litpic" type="text" id="litpic" value="" style="width:40%"> <img style="margin-left:20px;display:none;" src="" width="120" height="80" id="picview"></td>
<td style="vertical-align:middle;"><button type="button" onclick="upImage();">选择图片</button> <input name="litpic" type="text" id="litpic" value="" style="width:40%"> <img style="margin-left:20px;display:none;" src="" width="120" height="80" id="picview"></td>
</tr>
<style>.uploadify{display:inline-block;}.uploadify-queue{display:none;}</style>
<script type="text/javascript">
<?php $timestamp = time();?>
bidtype="选择文件";
$(function() {
$('#file_upload').uploadify({
'buttonText': bidtype,//按钮文字
'auto':true,//选择完图片以后是否自动上传
'multi': false,//是否开启一次性上传多个文件
'fileTypeExts': "*.jpg;*.png;*.gif;*.jpeg;",//允许的文件类型
'width': 60,//buttonImg的大小
'height': 26,
'formData' : {
'timestamp' : '<?php echo $timestamp;?>',
'token' : '<?php echo md5('unique_salt' . $timestamp);?>'
},
'swf' : '/other/uploadify/uploadify.swf',//路径要正确
'uploader' : '/uploadImage.php',//路径要正确
'onUploadSuccess': function (file, data, response) { //一个文件上传成功后的响应事件处理
$('#litpic').val(data);
$('#picview').attr("src",data).css("display","inline-block");
}
});
var _editor;
$(function() {
//重新实例化一个编辑器,防止在上面的editor编辑器中显示上传的图片或者文件
_editor = UE.getEditor('ueditorimg');
_editor.ready(function () {
//设置编辑器不可用
_editor.setDisabled('insertimage');
//隐藏编辑器,因为不会用到这个编辑器实例,所以要隐藏
_editor.hide();
//侦听图片上传
_editor.addListener('beforeInsertImage', function (t, arg) {
//将地址赋值给相应的input,只取第一张图片的路径
$('#litpic').val(arg[0].src);
//图片预览
$('#picview').attr("src",arg[0].src).css("display","inline-block");
})
});
});
//弹出图片上传的对话框
function upImage()
{
var myImage = _editor.getDialog("insertimage");
myImage.render();
myImage.open();
}
</script>
<script type="text/plain" id="ueditorimg"></script>
<tr>
<td align="right">SEO标题:</td>
<td><input name="seotitle" type="text" style="width:70%" id="seotitle" class="alltxt" value=""></td>
@ -137,40 +140,6 @@ $('#addcat input[type="submit"]').click(function(){
if(numError){
return false;
}
//$("#contents").val = ue.getContent();
//var datas = $('#addcat').serialize();//#form要在form里面
//var content = ue.getContent();
/* $.ajax({
url: "/fladmin/Producttype/doedit",
type: "POST",
dataType: "json",
data: {
"id":$("#id").val(),
"typename":$("#typename").val(),
"typedir":$("#typedir").val(),
"templist":$("#templist").val(),
"temparticle":$("#temparticle").val(),
"litpic":$("#litpic").val(),
"seotitle":$("#seotitle").val(),
"keywords":$("#keywords").val(),
"seokeyword":$("#seokeyword").val(),
"description":$("#description").val(),
"content":content
//"seotitle":seotitle.replace("'", "&#039;"),
//"keywords":keywords.replace("'", "&#039;"),
//"description":description.replace("'", "&#039;"),
//"contents":content.replace("'", "&#039;")
},
success: function(data){
if(data.code==200)
{
//alert(data.info);
window.location.replace("/fladmin/Producttype");
}
}
}); */
});
</script>
</body></html>

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

@ -1,87 +1,84 @@
<!DOCTYPE html><html><head><title>修改分类_后台管理</title>{include file="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 file="common/leftmenu"/}</div><!-- 左边结束 -->
<!-- 左边开始 --><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/Producttype">商品分类管理</a> > 修改分类</h5>
<h5 class="sub-header"><a href="/fladmin/producttype">商品分类管理</a> > 修改分类</h5>
<form method="post" action="/fladmin/Producttype/doedit" role="form" id="addcat" class="table-responsive">
<form method="post" action="/fladmin/producttype/doedit" role="form" id="addcat" class="table-responsive">{{ csrf_field() }}
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td align="right">分类名称:</td>
<td><input name="typename" type="text" value="{$post["typename"]}" id="typename" size="30" class="required"><if condition="$action_name=='edit'"><input style="display:none;" type="text" name="id" id="id" value="{$id}"></if></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>
</tr>
<?php if($action_name=='add'){ ?>
<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>
</tr>
<?php } ?>
<tr>
<td align="right">别名:</td>
<td><input name="typedir" type="text" value="{$post["typedir"]}" id="typedir" class="required" style="width:30%"> <small>(包含字母或数字,字母开头)</small></td>
<td><input name="typedir" type="text" value="<?php echo $post["typedir"]; ?>" id="typedir" class="required" style="width:30%"> <small>(包含字母或数字,字母开头)</small></td>
</tr>
<tr>
<td align="right">列表模板:</td>
<td><input name="templist" id="templist" type="text" value="{$post["templist"]}" class="required" size="20"></td>
<td><input name="templist" id="templist" type="text" value="<?php echo $post["templist"]; ?>" class="required" size="20"></td>
</tr>
<tr>
<td align="right">文章模板:</td>
<td><input name="temparticle" id="temparticle" type="text" value="{$post["temparticle"]}" class="required" size="20"></td>
<td><input name="temparticle" id="temparticle" type="text" value="<?php echo $post["temparticle"]; ?>" class="required" size="20"></td>
</tr>
<tr>
<td align="right" style="vertical-align:middle;">缩略图:</td>
<td style="vertical-align:middle;"><input id="file_upload" value="选择文件" name="file_upload" type="file" multiple="true"> <input name="litpic" type="text" id="litpic" value="{$post["litpic"]}" style="width:40%"> <img style="margin-left:20px;<?php if(empty($post["litpic"]) || !imgmatch($post["litpic"])){ echo "display:none;"; } ?>" src="<?php if(imgmatch($post["litpic"])){echo $post["litpic"];} ?>" width="120" height="80" id="picview" name="picview"></td>
<td style="vertical-align:middle;"><button type="button" onclick="upImage();">选择图片</button> <input name="litpic" type="text" id="litpic" value="<?php echo $post["litpic"]; ?>" style="width:40%"> <img style="margin-left:20px;<?php if(empty($post["litpic"]) || !imgmatch($post["litpic"])){ echo "display:none;"; } ?>" src="<?php if(imgmatch($post["litpic"])){echo $post["litpic"];} ?>" width="120" height="80" id="picview" name="picview"></td>
</tr>
<style>.uploadify{display:inline-block;}.uploadify-queue{display:none;}</style>
<script type="text/javascript">
<?php $timestamp = time();?>
bidtype="选择文件";
$(function() {
$('#file_upload').uploadify({
'buttonText': bidtype,//按钮文字
'auto':true,//选择完图片以后是否自动上传
'multi': false,//是否开启一次性上传多个文件
'fileTypeExts': "*.jpg;*.png;*.gif;*.jpeg;",//允许的文件类型
'width': 60,//buttonImg的大小
'height': 26,
'formData' : {
'timestamp' : '<?php echo $timestamp;?>',
'token' : '<?php echo md5('unique_salt' . $timestamp);?>'
},
'swf' : '/other/uploadify/uploadify.swf',//路径要正确
'uploader' : '/uploadImage.php',//路径要正确
'onUploadSuccess': function (file, data, response) { //一个文件上传成功后的响应事件处理
$('#litpic').val(data);
$('#picview').attr("src",data).css("display","inline-block");
}
});
var _editor;
$(function() {
//重新实例化一个编辑器,防止在上面的editor编辑器中显示上传的图片或者文件
_editor = UE.getEditor('ueditorimg');
_editor.ready(function () {
//设置编辑器不可用
_editor.setDisabled('insertimage');
//隐藏编辑器,因为不会用到这个编辑器实例,所以要隐藏
_editor.hide();
//侦听图片上传
_editor.addListener('beforeInsertImage', function (t, arg) {
//将地址赋值给相应的input,只取第一张图片的路径
$('#litpic').val(arg[0].src);
//图片预览
$('#picview').attr("src",arg[0].src).css("display","inline-block");
})
});
});
//弹出图片上传的对话框
function upImage()
{
var myImage = _editor.getDialog("insertimage");
myImage.render();
myImage.open();
}
</script>
<script type="text/plain" id="ueditorimg"></script>
<tr>
<td align="right">SEO标题:</td>
<td><input name="seotitle" type="text" style="width:70%" id="seotitle" class="alltxt" value="{$post["seotitle"]}"></td>
<td><input name="seotitle" type="text" style="width:70%" id="seotitle" class="alltxt" value="<?php echo $post["seotitle"]; ?>"></td>
</tr>
<tr>
<td align="right">关键字:</td>
<td><input name="keywords" type="text" style="width:50%" id="keywords" class="alltxt" value="{$post["keywords"]}"> (","分开)</td>
<td><input name="keywords" type="text" style="width:50%" id="keywords" class="alltxt" value="<?php echo $post["keywords"]; ?>"> (","分开)</td>
</tr>
<tr>
<td align="right">SEO关键字:</td>
<td><input name="seokeyword" type="text" style="width:50%" id="seokeyword" class="alltxt" value="{$post["seokeyword"]}"> (","分开)</td>
<td><input name="seokeyword" type="text" style="width:50%" id="seokeyword" class="alltxt" value="<?php echo $post["seokeyword"]; ?>"> (","分开)</td>
</tr>
<tr>
<td align="right" style="vertical-align:middle;">分类描述:</td>
<td><textarea name="description" cols="70" style="height:70px;vertical-align:middle;width:70%" rows="3" id="description" class="alltxt">{$post["description"]}</textarea></td>
<td><textarea name="description" cols="70" style="height:70px;vertical-align:middle;width:70%" rows="3" id="description" class="alltxt"><?php echo $post["description"]; ?></textarea></td>
</tr>
<tr>
<td colspan="2"><strong>分类内容:</strong></td>
</tr>
<tr>
<td colspan="2">
<!-- 加载编辑器的容器 --><script id="container" name="content" type="text/plain">{$post["content"]}</script>
<!-- 加载编辑器的容器 --><script id="container" name="content" type="text/plain"><?php echo $post["content"]; ?></script>
<!-- 配置文件 --><script type="text/javascript" src="/other/flueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 --><script type="text/javascript" src="/other/flueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 --><script type="text/javascript">var ue = UE.getEditor('container',{maximumWords:100000,initialFrameHeight:320,enableAutoSave:false});</script>
@ -139,40 +136,6 @@ $('#addcat input[type="submit"]').click(function(){
if(numError){
return false;
}
//$("#contents").val = ue.getContent();
//var datas = $('#addcat').serialize();//#form要在form里面
//var content = ue.getContent();
/* $.ajax({
url: "/fladmin/Producttype/doedit",
type: "POST",
dataType: "json",
data: {
"id":$("#id").val(),
"typename":$("#typename").val(),
"typedir":$("#typedir").val(),
"templist":$("#templist").val(),
"temparticle":$("#temparticle").val(),
"litpic":$("#litpic").val(),
"seotitle":$("#seotitle").val(),
"keywords":$("#keywords").val(),
"seokeyword":$("#seokeyword").val(),
"description":$("#description").val(),
"content":content
//"seotitle":seotitle.replace("'", "&#039;"),
//"keywords":keywords.replace("'", "&#039;"),
//"description":description.replace("'", "&#039;"),
//"contents":content.replace("'", "&#039;")
},
success: function(data){
if(data.code==200)
{
//alert(data.info);
window.location.replace("/fladmin/Producttype");
}
}
}); */
});
</script>
</body></html>

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

@ -1,10 +1,10 @@
<!DOCTYPE html><html><head><title>商品分类_后台管理</title>{include file="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 file="common/leftmenu"/}</div><!-- 左边结束 -->
<!-- 左边开始 --><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/Producttype/add">增加顶级分类</a> ] [ <a href="/fladmin/Product/add">发布商品</a> ]<br><br>
<h2 class="sub-header">商品分类管理</h2>[ <a href="/fladmin/producttype/add">增加顶级分类</a> ] [ <a href="/fladmin/product/add">发布商品</a> ]<br><br>
<form name="listarc"><div class="table-responsive">
<table class="table table-striped table-hover">
@ -13,11 +13,11 @@
<?php 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><?php echo catarcnum($row["id"].'Product'); ?></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><?php echo catarcnum($row["id"].'product'); ?></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/Product/add?catid=<?php echo $row["id"]; ?>">发布商品</a> | <a href="/fladmin/Producttype/add?reid=<?php echo $row["id"]; ?>">增加子类</a> | <a href="/fladmin/Producttype/edit?id=<?php echo $row["id"]; ?>">更改</a> | <a onclick="delconfirm('/fladmin/Producttype/del?id=<?php echo $row["id"]; ?>')" href="javascript:;">删除</a></td>
<td><a href="<?php echo get_front_url(array("type"=>"list","catid"=>$row["id"])); ?>" target="_blank">预览</a> | <a href="/fladmin/product/add?catid=<?php echo $row["id"]; ?>">发布商品</a> | <a href="/fladmin/producttype/add?reid=<?php echo $row["id"]; ?>">增加子类</a> | <a href="/fladmin/producttype/edit?id=<?php echo $row["id"]; ?>">更改</a> | <a onclick="delconfirm('/fladmin/producttype/del?id=<?php echo $row["id"]; ?>')" href="javascript:;">删除</a></td>
</tr><?php } ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
</div></div><!-- 右边结束 --></div></div>

1
resources/views/home/common/footer.blade.php

@ -0,0 +1 @@
<div id="footer" class="box">&copy;<?php echo sysconfig('CMS_WEBNAME'); ?> 部分文章来源于网络,如果侵犯了您的权益,请<a href="<?php echo sysconfig('CMS_BASEHOST'); ?>/contact.html">联系我们</a>。<a target="_blank" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/sitemap.xml">网站地图</a><div class="m-auto"><script>count_js();</script></div></div>

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

@ -0,0 +1 @@
<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"><a href="<?php echo sysconfig('CMS_BASEHOST'); ?>/cat1">笔记本电脑知识</a><a href="<?php echo sysconfig('CMS_BASEHOST'); ?>/cat2">笔记本推荐</a><a href="<?php echo sysconfig('CMS_BASEHOST'); ?>/cat3">笔记本系统</a><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>

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

@ -0,0 +1,62 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.bnbni.com<?php echo GetCurUrl(); ?>">
<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 CMS_BASEHOST; ?>/images/style.css" media="all"><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo 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>
<?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>
<div class="info"><span class="fl"><em><?php echo date("m-d H:i",$row['pubdate']); ?></em></span><span class="fr"><em><?php echo $row['click']; ?></em>人阅读</span></div><div class="cl"></div></div><?php }} ?><div id="lad2"><script>ljs2();</script></div>
<div class="pages"><ul><?php echo $pagenav; ?></ul><div class="cl"></div></div><div id="lad3"><script>ljs3();</script></div></div><!-- fl_640 end -->
<div class="fr_300"><div id="rad1"><script>rjs1();</script></div>
<div class="side"><div class="stit"><h3>热门文章</h3><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['id']; ?>,tuijian:1,mode:1,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<ul class="uli chs" id="xglist"><?php $posts=arclist(array("row"=>5,"typeid"=>$post['id'],"tuijian"=>1));foreach($posts as $row){ ?><li><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></li><?php } ?></ul><div class="cl"></div></div>
<div id="rad3"><script>rjs3();</script></div>
<div class="side"><div class="stit"><h3>猜你喜欢</h3><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['id']; ?>,mode:2,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<div class="uli2" id="xglike"><?php $posts=arclist(array("row"=>5,"typeid"=>$post['id'],"orderby"=>'rand()'));foreach($posts as $row){ ?><div class="suli"><?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 } ?><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><div class="sulii"><?php if(!empty($row['writer'])){echo '<span class="time">'.$row['writer'].'</span>';}elseif(!empty($row['source'])){echo '<span class="time">'.$row['source'].'</span>';} ?> 阅读(<?php echo $row['click']; ?>)</div><div class="cl"></div></div><?php } ?><div class="cl"></div></div></div>
<div id="rad2"><script>rjs2();</script></div></div><!-- fr_300 end --></div><!-- box end -->
<script>
function getmore(condition)
{
var url = "<?php echo CMS_BASEHOST; ?>/api/listarc";
//var typeid = "";
$.post(url,condition,function(res){
if(res.code==0)
{
var json = res.data; //数组
var str = '';
$.each(json, function (index) {
//循环获取数据
//var title = json[index].title;
if(condition.mode==1)
{
str = str + '<li><a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a></li>';
}
else if(condition.mode==2)
{
var litpic = '';if(json[index].litpic!==''){litpic = '<a class="limg" href="'+json[index].url+'"><img alt="'+json[index].title+'" src="'+json[index].litpic+'"></a>';}
str = str + '<div class="suli">'+litpic+'<a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a><div class="sulii">阅读('+json[index].click+')</div><div class="cl"></div></div>';
}
});
if(str!='' && str!=null && condition.mode==1)
{
$('#xglist').html(str);
}
else if(str!='' && str!=null && condition.mode==2)
{
$('#xglike').html(str);
}
}
else
{
}
},'json');
}
</script>
@include('home.common.footer')</body></html>

57
resources/views/home/index/category2.blade.php

@ -0,0 +1,57 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.bnbni.com<?php echo GetCurUrl(); ?>">
<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 CMS_BASEHOST; ?>/images/style.css" media="all"><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo 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"><h1 class="arct"><?php echo $post["typename"]; ?></h1>
<div class="content"><?php echo $post["content"]; ?></div><div id="lad1"><script>ljs1();</script></div></div><!-- fl_640 end -->
<div class="fr_300"><div id="rad1"><script>rjs1();</script></div>
<div class="side"><div class="stit"><h3>热门文章</h3><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['id']; ?>,tuijian:1,mode:1,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<ul class="uli chs" id="xglist"><?php $posts=arclist(array("row"=>5,"typeid"=>$post['id'],"tuijian"=>1));foreach($posts as $row){ ?><li><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></li><?php } ?></ul><div class="cl"></div></div>
<div id="rad3"><script>rjs3();</script></div>
<div class="side"><div class="stit"><h3>猜你喜欢</h3><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['id']; ?>,mode:2,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<div class="uli2" id="xglike"><?php $posts=arclist(array("row"=>5,"typeid"=>$post['id'],"orderby"=>'rand()'));foreach($posts as $row){ ?><div class="suli"><?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 } ?><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><div class="sulii"><?php if(!empty($row['writer'])){echo '<span class="time">'.$row['writer'].'</span>';}elseif(!empty($row['source'])){echo '<span class="time">'.$row['source'].'</span>';} ?> 阅读(<?php echo $row['click']; ?>)</div><div class="cl"></div></div><?php } ?><div class="cl"></div></div></div>
<div id="rad2"><script>rjs2();</script></div></div><!-- fr_300 end --></div><!-- box end -->
<script>
function getmore(condition)
{
var url = "<?php echo CMS_BASEHOST; ?>/api/listarc";
//var typeid = "";
$.post(url,condition,function(res){
if(res.code==0)
{
var json = res.data; //数组
var str = '';
$.each(json, function (index) {
//循环获取数据
//var title = json[index].title;
if(condition.mode==1)
{
str = str + '<li><a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a></li>';
}
else if(condition.mode==2)
{
var litpic = '';if(json[index].litpic!==''){litpic = '<a class="limg" href="'+json[index].url+'"><img alt="'+json[index].title+'" src="'+json[index].litpic+'"></a>';}
str = str + '<div class="suli">'+litpic+'<a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a><div class="sulii">阅读('+json[index].click+')</div><div class="cl"></div></div>';
}
});
if(str!='' && str!=null && condition.mode==1)
{
$('#xglist').html(str);
}
else if(str!='' && str!=null && condition.mode==2)
{
$('#xglike').html(str);
}
}
else
{
}
},'json');
}
</script>
@include('home.common.footer')</body></html>

60
resources/views/home/index/detail.blade.php

@ -0,0 +1,60 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.bnbni.com<?php echo GetCurUrl(); ?>">
<title><?php if(!empty($post['seotitle'])){echo $post['seotitle'];}elseif(!empty($post['writer'])){echo $post['writertitle'].'_'.CMS_WEBNAME;}else{echo $post['title'].'_'.CMS_WEBNAME;} ?></title><meta name="keywords" content="<?php echo $post["keywords"]; ?>" /><meta name="description" content="<?php echo $post["description"]; ?>" /><link rel="stylesheet" href="<?php echo CMS_BASEHOST; ?>/images/style.css" media="all"><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/ad.js"></script><script>uaredirect("http://m.bnbni.com/cat{dede:type}[field:id/]{/dede:type}/id{dede:field name='aid' /}");</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">
<h1 class="arct"><?php echo $post["title"]; ?></h1><div class="timely"><?php if(!empty($post['writer'])){ echo '<span id="awriter">'.$post['writer'].'</span> '; } ?><span id="atime"><?php echo date("Y-m-d H:i",$post['pubdate']); ?></span> <?php if(!empty($post['source'])){ ?><?php echo '<span id="asource">'.$post['source'].'</span> '; ?><?php } ?><span id="aclick">阅读:<?php echo $post["click"]; ?>次</span> <span id="akeyword">关键词:<?php echo $post["keywords"]; ?></span></div><div class="dad1"><script>djs1();</script></div>
<div class="content"><?php echo $post["body"]; ?><div class="dad2"><script>djs2();</script></div>
<div class="dinfo"><span class="fr">下一篇:<?php if($pre){ ?><a href="<?php echo get_front_url(array("id"=>$pre['id'],"catid"=>$pre["typeid"],"type"=>'content')); ?>"><?php echo $pre["title"]; ?></a><?php }else{echo '没有了';} ?></span><div class="cl"></div></div>
</div><div class="dad3"><script>djs3(<?php echo $post["id"]; ?>);</script></div></div><!-- fl_640 end -->
<div class="fr_300"><div id="rad1"><script>rjs1();</script></div>
<div class="side"><div class="stit"><h3>近期文章</h3><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['typeid']; ?>,mode:1,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<ul class="uli chs" id="xglist"><?php $posts=arclist(array("row"=>5,"typeid"=>$post['typeid'],"where"=>array("id"=>array('lt',$pre['id']))));foreach($posts as $row){ ?><li><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></li><?php } ?></ul><div class="cl"></div></div>
<div id="rad3"><script>rjs3();</script></div>
<div class="side"><div class="stit"><h3>猜你喜欢</h3><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['typeid']; ?>,mode:2,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<div class="uli2" id="xglike"><?php $posts=arclist(array("row"=>5,"typeid"=>$post['typeid'],"orderby"=>'rand()'));foreach($posts as $row){ ?><div class="suli"><?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 } ?><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><div class="sulii"><?php if(!empty($row['writer'])){echo '<span class="time">'.$row['writer'].'</span>';}elseif(!empty($row['source'])){echo '<span class="time">'.$row['source'].'</span>';} ?> 阅读(<?php echo $row['click']; ?>)</div><div class="cl"></div></div><?php } ?><div class="cl"></div></div></div>
<div id="rad2"><script>rjs2();</script></div></div><!-- fr_300 end --></div><!-- box end -->
<script>
function getmore(condition)
{
var url = "<?php echo CMS_BASEHOST; ?>/api/listarc";
//var typeid = "";
$.post(url,condition,function(res){
if(res.code==0)
{
var json = res.data; //数组
var str = '';
$.each(json, function (index) {
//循环获取数据
//var title = json[index].title;
if(condition.mode==1)
{
str = str + '<li><a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a></li>';
}
else if(condition.mode==2)
{
var litpic = '';if(json[index].litpic!==''){litpic = '<a class="limg" href="'+json[index].url+'"><img alt="'+json[index].title+'" src="'+json[index].litpic+'"></a>';}
str = str + '<div class="suli">'+litpic+'<a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a><div class="sulii">阅读('+json[index].click+')</div><div class="cl"></div></div>';
}
});
if(str!='' && str!=null && condition.mode==1)
{
$('#xglist').html(str);
}
else if(str!='' && str!=null && condition.mode==2)
{
$('#xglike').html(str);
}
}
else
{
}
},'json');
}
</script>
@include('home.common.footer')</body></html>

70
resources/views/home/index/index.blade.php

@ -0,0 +1,70 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.nbnbk.com/"><link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.nbnbk.com/" />
<title><?php echo sysconfig('CMS_SEOTITLE'); ?></title><meta name="keywords" content="<?php echo sysconfig('CMS_KEYWORDS'); ?>" /><meta name="description" content="<?php echo sysconfig('CMS_DESCRIPTION'); ?>" /><link rel="stylesheet" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/images/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.nbnbk.com/");</script></head><body><script>site();</script>
<div id="header"><div id="navlink" class="box"><h1><a class="webname" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/"><?php echo sysconfig('CMS_WEBNAME'); ?></a></h1><span class="nav"><a href="<?php echo sysconfig('CMS_BASEHOST'); ?>/cat1">笔记本电脑知识</a><a href="<?php echo sysconfig('CMS_BASEHOST'); ?>/cat2">笔记本推荐</a><a href="<?php echo sysconfig('CMS_BASEHOST'); ?>/cat3">笔记本系统</a><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><div id="tad"><script>tjs();</script></div>
<div class="box mt10"><div class="fl_640">
<div class="notice">苹果/ThinkPad笔记本电脑无须担心质量问题。</div>
<?php $posts=arclist(array("row"=>11,"where"=>array("tuijian"=>array('NEQ',1))));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>
<div class="info"><span class="fl"><?php if(!empty($row['writer'])){ echo '<i>'.$row['writer'].'</i>'; }elseif(!empty($row['source'])){ echo '<i>'.$row['source'].'</i>'; } ?><em><?php echo date("m-d H:i",$row['pubdate']); ?></em></span><span class="fr"><em><?php echo $row['click']; ?></em>人阅读</span></div><div class="cl"></div></div><?php } ?>
<div id="iad2"><script>ijs2();</script></div><div class="pages"><ul><li><a href="http://www.nbnbk.com/cat1">更多笔记本知识</a></li></ul><div class="cl"></div></div>
<div id="iad3"><script>ijs3();</script></div></div><!-- fl_640 end -->
<div class="fr_300"><div id="rad1"><script>rjs1();</script></div>
<div class="side"><div class="stit"><div class="stith"><strong>热门话题</strong></div><a href="http://www.nbnbk.com/tags.html" target="_blank" class="more">更多</a><div class="cl"></div></div>
<div class="ws-tag"><a href="http://www.nbnbk.com/cat5" target="_blank">重装系统</a><a href="http://www.nbnbk.com/cat4" target="_blank">笔记本电脑配置知识</a></div></div>
<div class="side"><div class="stit"><h2>文章排行</h2><a href="javascript:getmore({PageSize:5,tuijian:1,mode:1,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<ul class="uli chs" id="xglist"><?php $posts=arclist(array("row"=>5,"tuijian"=>1));foreach($posts as $row){ ?><li><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></li><?php } ?></ul><div class="cl"></div></div>
<div class="side"><div class="stit"><h2>猜你喜欢</h2><a href="javascript:getmore({PageSize:5,mode:2,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<div class="uli2" id="xglike"><?php $posts=arclist(array("row"=>5,"orderby"=>'rand()'));foreach($posts as $row){ ?><div class="suli"><?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 } ?><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><div class="sulii"><?php if(!empty($row['writer'])){echo '<span class="time">'.$row['writer'].'</span>';}elseif(!empty($row['source'])){echo '<span class="time">'.$row['source'].'</span>';} ?> 阅读(<?php echo $row['click']; ?>)</div><div class="cl"></div></div><?php } ?><div class="cl"></div></div></div>
<div id="rad3"><script>rjs3();</script></div>
<div class="side"><div class="stit"><div class="stith"><strong>友情链接</strong></div><div class="cl"></div></div>
<div class="rtags mt10"><a href="http://www.nbnbk.com/">笔记本之家官网</a></div></div>
<div id="rad2"><script>rjs2();</script></div></div><!-- fr_300 end --></div><!-- box end -->
<script>
function getmore(condition)
{
var url = "<?php echo CMS_BASEHOST; ?>/api/listarc";
//var typeid = "";
$.post(url,condition,function(res){
if(res.code==0)
{
var json = res.data; //数组
var str = '';
$.each(json, function (index) {
//循环获取数据
//var title = json[index].title;
if(condition.mode==1)
{
str = str + '<li><a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a></li>';
}
else if(condition.mode==2)
{
var litpic = '';if(json[index].litpic!==''){litpic = '<a class="limg" href="'+json[index].url+'"><img alt="'+json[index].title+'" src="'+json[index].litpic+'"></a>';}
str = str + '<div class="suli">'+litpic+'<a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a><div class="sulii">阅读('+json[index].click+')</div><div class="cl"></div></div>';
}
});
if(str!='' && str!=null && condition.mode==1)
{
$('#xglist').html(str);
}
else if(str!='' && str!=null && condition.mode==2)
{
$('#xglike').html(str);
}
}
else
{
}
},'json');
}
</script>
@include('home.common.footer')</body></html>

171
resources/views/home/index/login.blade.php

@ -0,0 +1,171 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1">
<title>后台登录</title>
<link rel="stylesheet" href="/css/bootstrap.min.css"><link rel="stylesheet" href="/css/admin.css"><script src="/js/jquery.min.js"></script><script src="/js/ad.js"></script></head><body>
<style>
body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 16px;
color: #888;
line-height: 30px;
text-align: center;
background-color: #000;
}
.form-box {
margin-top: 35px;
}
.form-top {
overflow: hidden;
padding: 0 25px 15px 25px;
background: #fff;
-moz-border-radius: 4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
text-align: left;
}
.form-top-left {
float: left;
width: 75%;
padding-top: 25px;
}
.form-top-left h3 { margin-top: 0;
font-size: 22px;
font-weight: 300;
color: #555;
line-height: 30px;}
.form-top-right {
float: left;
width: 25%;
padding-top: 5px;margin-top:15px;
font-size: 66px;
color: #ddd;
text-align: right;
}
.form-bottom {
padding: 25px 25px 30px 25px;
background: #eee;
-moz-border-radius: 0 0 4px 4px; -webkit-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;
text-align: left;
}
.form-bottom form textarea {
height: 100px;
}
.form-bottom form button.btn {
width: 100%;
}
.form-bottom form .input-error {
border-color: #4aaf51;
}
.social-login {
margin-top: 35px;
}
.social-login h3 {
color: #fff;
}
.social-login-buttons {
margin-top: 25px;
}
input[type="text"], input[type="password"], textarea, textarea.form-control {
height: 50px;
margin: 0;
padding: 0 20px;
vertical-align: middle;
background: #f8f8f8;
border: 3px solid #ddd;
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;
line-height: 50px;
color: #888;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
-o-transition: all .3s;
-moz-transition: all .3s;
-webkit-transition: all .3s;
-ms-transition: all .3s;
transition: all .3s;
}
button.btn {
height: 50px;
margin: 0;
padding: 0 20px;
vertical-align: middle;
background: #4aaf51;
border: 0;
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;
line-height: 50px;
color: #fff;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
text-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
-o-transition: all .3s;
-moz-transition: all .3s;
-webkit-transition: all .3s;
-ms-transition: all .3s;
transition: all .3s;
}
button.btn:hover { opacity: 0.6; color: #fff; }
</style>
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-sm-offset-3 form-box">
<div class="form-top">
<div class="form-top-left">
<h3>后台登录</h3>
<p>请输入您的用户名、密码:</p>
</div>
<div class="form-top-right">
<i class="glyphicon glyphicon-user"></i>
</div>
</div>
<div class="form-bottom">
<form method="post" action="/dologin" class="login-form" role="form">
<div class="form-group">
<label class="sr-only" for="form-username">Username</label>
<input type="text" id="username" name="username" placeholder="用户名/邮箱/手机号..." class="form-username form-control">
</div>
<div class="form-group">
<label class="sr-only" for="form-password">Password</label>
<input type="password" id="pwd" name="pwd" placeholder="输入密码..." class="form-password form-control">
</div>
<button type="submit" class="btn">立即登录</button>
</form>
</div>
</div>
</div>
</div>
<script>
$('.login-form input[type="text"], .login-form input[type="password"], .login-form textarea').on('focus', function() {
$(this).removeClass('input-error');
});
$('.login-form').on('submit', function(e) {
$(this).find('input[type="text"], input[type="password"], textarea').each(function(){
if( $(this).val() == "" ) {
e.preventDefault();
$(this).addClass('input-error');
}
else {
$(this).removeClass('input-error');
}
});
});
</script>
<script src="/js/bootstrap.min.js"></script></body></html>

8
resources/views/home/index/page.blade.php

@ -0,0 +1,8 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.bnbni.com/cat{dede:type}[field:id/]{/dede:type}/id{dede:field name='aid' /}">
<title><?php if(empty($post["seotitle"])){echo $post["title"];}else{echo $post["seotitle"];} ?>_<?php echo CMS_WEBNAME; ?></title><meta name="keywords" content="<?php echo $post["keywords"]; ?>" /><meta name="description" content="<?php echo $post["description"]; ?>" /><link rel="stylesheet" href="<?php echo CMS_BASEHOST; ?>/images/style.css" media="all"><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/ad.js"></script><script>uaredirect("http://m.bnbni.com/cat{dede:type}[field:id/]{/dede:type}/id{dede:field name='aid' /}");</script></head><body><script>site();</script>
@include('home.common.header')<div id="tad"><script>tjs();</script></div>
<div class="box mt10">
<h1 class="arct" style="text-align:center"><?php echo $post["title"]; ?></h1><div class="dad1"><script>djs1();</script></div>
<div class="content"><?php echo $post["body"]; ?><div class="dad2"><script>djs2();</script></div></div>
</div><!-- box end -->@include('home.common.footer')</body></html>

35
resources/views/home/index/search.blade.php

@ -0,0 +1,35 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>搜索结果_<?php echo CMS_WEBNAME; ?></title>
<link rel="stylesheet" href="/css/bootstrap.min.css"><link rel="stylesheet" href="/css/style.css"><script src="/js/jquery.min.js"></script><script src="/js/bootstrap.min.js"></script></head><body>
@include('home.common.header')
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-xs-12 col-sm-9">
<div class="bread"><a href="/"><?php echo CMS_INDEXNAME; ?></a> > <?php echo '搜索结果'; ?></div>
<h1 class="page-header">搜索结果</h1>
<?php foreach($posts as $row){ ?><div class="list"><?php if(!empty($row['litpic'])){echo '<a class="limg" href="'.get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')).'"><img alt="'.$row["title"].'" src="'.$row["litpic"].'"></a>';} ?>
<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,160,'utf-8'); ?></p>
<div class="info"><span class="fl"><?php $taglist=taglist($row['id']);foreach($taglist as $row){ ?><a target="_blank" href="<?php echo get_front_url(array("tagid"=>$row['id'],"type"=>'tags')); ?>"><?php echo $row['tag']; ?></a><?php } ?><em><?php echo date("Y-m-d",$row["pubdate"]); ?></em></span><span class="fr"><em><?php echo $row['click']; ?></em>人阅读</span></div><div class="cl"></div></div><?php } ?>
<div class="pages"><ul><?php echo $pagenav; ?></ul><div class="cl"></div></div>
</div><!--/.col-xs-12.col-sm-9-->
<div class="col-xs-12 col-sm-3 sidebar-offcanvas" id="sidebar">
<div class="panel panel-info">
<div class="panel-heading">热门推荐</div>
<div class="list-group"><?php $posts=arclist(array("row"=>5,"orderby"=>'rand()'));foreach($posts as $row){ ?>
<a class="list-group-item" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><?php } ?>
</div>
</div>
</div><!--/.sidebar-offcanvas-->
</div><!--/row-->
</div><!-- /.container -->
@include('home.common.footer')</body></html>

9
resources/views/home/index/sitemap.blade.php

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://www.nbnbk.com/</loc><changefreq>daily</changefreq><priority>1.0</priority></url>
<url><loc>http://www.nbnbk.com/contact.html</loc></url>
<?php $posts=arclist(array("row"=>300));foreach($posts as $row){ ?><url><loc>http://www.nbnbk.com<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?></loc><lastmod><?php echo date("Y-m-d",$row['pubdate']); ?></lastmod><changefreq>monthly</changefreq></url><?php } ?>
<?php $posts=arclist(array("row"=>100,"orderby"=>'rand()'));foreach($posts as $row){ ?><url><loc>http://www.nbnbk.com<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?></loc><lastmod><?php echo date("Y-m-d",$row['pubdate']); ?></lastmod><changefreq>monthly</changefreq></url><?php } ?>
<?php $posts=dataList("arctype");foreach($posts as $row){ ?><url><loc>http://www.nbnbk.com<?php echo get_front_url(array("catid"=>$row['id'],"type"=>'list')); ?></loc></url><?php } ?>
</urlset>

62
resources/views/home/index/tag.blade.php

@ -0,0 +1,62 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.bnbni.com<?php echo GetCurUrl(); ?>">
<title><?php if(empty($post["title"])){echo $post["tag"];}else{echo $post["title"];}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 CMS_BASEHOST; ?>/images/style.css" media="all"><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo 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["tag"]; ?></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>
<div class="info"><span class="fl"><em><?php echo date("m-d H:i",$row['pubdate']); ?></em></span><span class="fr"><em><?php echo $row['click']; ?></em>人阅读</span></div><div class="cl"></div></div><?php }} ?><div id="lad2"><script>ljs2();</script></div>
<div class="pages"><ul><?php echo $pagenav; ?></ul><div class="cl"></div></div><div id="lad3"><script>ljs3();</script></div></div><!-- fl_640 end -->
<div class="fr_300"><div id="rad1"><script>rjs1();</script></div>
<div class="side"><div class="stit"><h2>相关推荐</h2><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['id']; ?>,tuijian:1,mode:1,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<ul class="uli chs" id="xglist"><?php $posts=arclist(array("row"=>5,"tuijian"=>1));foreach($posts as $row){ ?><li><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></li><?php } ?></ul><div class="cl"></div></div>
<div id="rad3"><script>rjs3();</script></div>
<div class="side"><div class="stit"><h2>猜你喜欢</h2><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['id']; ?>,mode:2,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<div class="uli2" id="xglike"><?php $posts=arclist(array("row"=>5,"orderby"=>'rand()'));foreach($posts as $row){ ?><div class="suli"><?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 } ?><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><div class="sulii"><?php if(!empty($row['writer'])){echo '<span class="time">'.$row['writer'].'</span>';}elseif(!empty($row['source'])){echo '<span class="time">'.$row['source'].'</span>';} ?> 阅读(<?php echo $row['click']; ?>)</div><div class="cl"></div></div><?php } ?><div class="cl"></div></div></div>
<div id="rad2"><script>rjs2();</script></div></div><!-- fr_300 end --></div><!-- box end -->
<script>
function getmore(condition)
{
var url = "<?php echo CMS_BASEHOST; ?>/api/listarc";
//var typeid = "";
$.post(url,condition,function(res){
if(res.code==0)
{
var json = res.data; //数组
var str = '';
$.each(json, function (index) {
//循环获取数据
//var title = json[index].title;
if(condition.mode==1)
{
str = str + '<li><a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a></li>';
}
else if(condition.mode==2)
{
var litpic = '';if(json[index].litpic!==''){litpic = '<a class="limg" href="'+json[index].url+'"><img alt="'+json[index].title+'" src="'+json[index].litpic+'"></a>';}
str = str + '<div class="suli">'+litpic+'<a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a><div class="sulii">阅读('+json[index].click+')</div><div class="cl"></div></div>';
}
});
if(str!='' && str!=null && condition.mode==1)
{
$('#xglist').html(str);
}
else if(str!='' && str!=null && condition.mode==2)
{
$('#xglike').html(str);
}
}
else
{
}
},'json');
}
</script>
@include('home.common.footer')</body></html>

58
resources/views/home/index/tag2.blade.php

@ -0,0 +1,58 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.bnbni.com<?php echo GetCurUrl(); ?>">
<title><?php if(empty($post["title"])){echo $post["tag"];}else{echo $post["title"];}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 CMS_BASEHOST; ?>/images/style.css" media="all"><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo 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["tag"]; ?></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){ ?><h2 class="tagarct"><?php echo $row["title"]; ?></h2><div class="content"><?php echo $row["body"]; ?></div><?php }} ?><div id="lad2"><script>ljs2();</script></div></div><!-- fl_640 end -->
<div class="fr_300"><div id="rad1"><script>rjs1();</script></div>
<div class="side"><div class="stit"><h2>相关推荐</h2><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['id']; ?>,tuijian:1,mode:1,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<ul class="uli chs" id="xglist"><?php $posts=arclist(array("row"=>5,"tuijian"=>1));foreach($posts as $row){ ?><li><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></li><?php } ?></ul><div class="cl"></div></div>
<div id="rad3"><script>rjs3();</script></div>
<div class="side"><div class="stit"><h2>猜你喜欢</h2><a href="javascript:getmore({PageSize:5,typeid:<?php echo $post['id']; ?>,mode:2,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<div class="uli2" id="xglike"><?php $posts=arclist(array("row"=>5,"orderby"=>'rand()'));foreach($posts as $row){ ?><div class="suli"><?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 } ?><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><div class="sulii"><?php if(!empty($row['writer'])){echo '<span class="time">'.$row['writer'].'</span>';}elseif(!empty($row['source'])){echo '<span class="time">'.$row['source'].'</span>';} ?> 阅读(<?php echo $row['click']; ?>)</div><div class="cl"></div></div><?php } ?><div class="cl"></div></div></div>
<div id="rad2"><script>rjs2();</script></div></div><!-- fr_300 end --></div><!-- box end -->
<script>
function getmore(condition)
{
var url = "<?php echo CMS_BASEHOST; ?>/api/listarc";
//var typeid = "";
$.post(url,condition,function(res){
if(res.code==0)
{
var json = res.data; //数组
var str = '';
$.each(json, function (index) {
//循环获取数据
//var title = json[index].title;
if(condition.mode==1)
{
str = str + '<li><a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a></li>';
}
else if(condition.mode==2)
{
var litpic = '';if(json[index].litpic!==''){litpic = '<a class="limg" href="'+json[index].url+'"><img alt="'+json[index].title+'" src="'+json[index].litpic+'"></a>';}
str = str + '<div class="suli">'+litpic+'<a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a><div class="sulii">阅读('+json[index].click+')</div><div class="cl"></div></div>';
}
});
if(str!='' && str!=null && condition.mode==1)
{
$('#xglist').html(str);
}
else if(str!='' && str!=null && condition.mode==2)
{
$('#xglike').html(str);
}
}
else
{
}
},'json');
}
</script>
@include('home.common.footer')</body></html>

57
resources/views/home/index/tag3.blade.php

@ -0,0 +1,57 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.bnbni.com<?php echo GetCurUrl(); ?>">
<title><?php if(empty($post["title"])){echo $post["tag"];}else{echo $post["title"];}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 CMS_BASEHOST; ?>/images/style.css" media="all"><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo 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"><h1 class="arct"><?php echo $post["tag"]; ?></h1>
<div class="content"><?php echo $post["content"]; ?></div><div id="lad1"><script>ljs1();</script></div></div><!-- fl_640 end -->
<div class="fr_300"><div id="rad1"><script>rjs1();</script></div>
<div class="side"><div class="stit"><h2>相关推荐</h2><a href="javascript:getmore({PageSize:5,tuijian:1,mode:1,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<ul class="uli chs" id="xglist"><?php $posts=arclist(array("row"=>5,"tuijian"=>1));foreach($posts as $row){ ?><li><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></li><?php } ?></ul><div class="cl"></div></div>
<div id="rad3"><script>rjs3();</script></div>
<div class="side"><div class="stit"><h2>猜你喜欢</h2><a href="javascript:getmore({PageSize:5,mode:2,orderby:'rand()'});" class="more">换一换</a><div class="cl"></div></div>
<div class="uli2" id="xglike"><?php $posts=arclist(array("row"=>5,"orderby"=>'rand()'));foreach($posts as $row){ ?><div class="suli"><?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 } ?><a target="_blank" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><div class="sulii"><?php if(!empty($row['writer'])){echo '<span class="time">'.$row['writer'].'</span>';}elseif(!empty($row['source'])){echo '<span class="time">'.$row['source'].'</span>';} ?> 阅读(<?php echo $row['click']; ?>)</div><div class="cl"></div></div><?php } ?><div class="cl"></div></div></div>
<div id="rad2"><script>rjs2();</script></div></div><!-- fr_300 end --></div><!-- box end -->
<script>
function getmore(condition)
{
var url = "<?php echo CMS_BASEHOST; ?>/api/listarc";
//var typeid = "";
$.post(url,condition,function(res){
if(res.code==0)
{
var json = res.data; //数组
var str = '';
$.each(json, function (index) {
//循环获取数据
//var title = json[index].title;
if(condition.mode==1)
{
str = str + '<li><a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a></li>';
}
else if(condition.mode==2)
{
var litpic = '';if(json[index].litpic!==''){litpic = '<a class="limg" href="'+json[index].url+'"><img alt="'+json[index].title+'" src="'+json[index].litpic+'"></a>';}
str = str + '<div class="suli">'+litpic+'<a target="_blank" href="'+json[index].url+'">'+json[index].title+'</a><div class="sulii">阅读('+json[index].click+')</div><div class="cl"></div></div>';
}
});
if(str!='' && str!=null && condition.mode==1)
{
$('#xglist').html(str);
}
else if(str!='' && str!=null && condition.mode==2)
{
$('#xglike').html(str);
}
}
else
{
}
},'json');
}
</script>
@include('home.common.footer')</body></html>

7
resources/views/home/index/tags.blade.php

@ -0,0 +1,7 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta http-equiv="Cache-Control" content="no-siteapp" /><meta http-equiv="Cache-Control" content="no-transform" /><meta name="mobile-agent" content="format=xhtml;url=http://m.bnbni.com/cat{dede:type}[field:id/]{/dede:type}/id{dede:field name='aid' /}">
<title>笔记本电脑相关知识_<?php echo CMS_WEBNAME; ?></title><meta name="keywords" content="" /><meta name="description" content="" /><link rel="stylesheet" href="<?php echo CMS_BASEHOST; ?>/images/style.css" media="all"><script type="text/javascript" src="<?php echo CMS_BASEHOST; ?>/js/ad.js"></script><script>uaredirect("http://m.bnbni.com/cat{dede:type}[field:id/]{/dede:type}/id{dede:field name='aid' /}");</script></head><body><script>site();</script>
@include('home.common.header')<div id="tad"><script>tjs();</script></div>
<div class="box mt10">
<div class="ws-tag"><?php $posts=tagslist(); foreach($posts as $row) { ?>
<a target="_blank" href="<?php echo get_front_url(array("type"=>"tags","tagid"=>$row["id"])); ?>"><?php echo $row['tag']; ?></a>&nbsp;<?php } ?></div>
</div><!-- box end -->@include('home.common.footer')</body></html>

49
routes/web.php

@ -21,7 +21,7 @@ Route::group(['domain' => env('APP_SUBDOMAIN'), 'namespace' => 'Wap'], function
Route::get('/cat{cat}', 'IndexController@category'); //分类页
Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
Route::get('/tag{tag}', 'IndexController@tag'); //标签页
Route::get('/page/{id}', 'IndexController@singlepage')->name('wap_singlepage'); //单页
Route::get('/page/{id}', 'IndexController@singlepage')->name('wap_singlepage'); //单页
Route::get('/aaa', function () {
dd('wap');
});
@ -31,7 +31,7 @@ Route::group(['domain' => env('APP_SUBDOMAIN'), 'namespace' => 'Wap'], function
//前台路由
Route::group(['namespace' => 'Home'], function () {
Route::get('/', 'IndexController@index')->name('home');
Route::get('/page404', 'IndexController@page404')->name('page404'); //404页面
Route::get('/page404', 'IndexController@page404')->name('page404'); //404页面
Route::get('/tags', 'IndexController@tags')->name('tags');
Route::get('/search', 'IndexController@search');
Route::get('/cat{cat}/id{id}', 'IndexController@detail'); //详情页
@ -39,7 +39,7 @@ Route::group(['namespace' => 'Home'], function () {
Route::get('/cat{cat}', 'IndexController@category'); //分类页
Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
Route::get('/tag{tag}', 'IndexController@tag'); //标签页
Route::get('/page/{id}', 'IndexController@page')->name('page'); //单页
Route::get('/page/{id}', 'IndexController@page')->name('page'); //单页
Route::get('/aaa', function () {
dd('wap');
@ -69,6 +69,13 @@ Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['w
Route::get('/category/edit', 'CategoryController@edit')->name('admin_category_edit');
Route::post('/category/doedit', 'CategoryController@doedit')->name('admin_category_doedit');
Route::get('/category/del', 'CategoryController@del')->name('admin_category_del');
//标签
Route::get('/tag', 'TagController@index')->name('admin_tag');
Route::get('/tag/add', 'TagController@add')->name('admin_tag_add');
Route::post('/tag/doadd', 'TagController@doadd')->name('admin_tag_doadd');
Route::get('/tag/edit', 'TagController@edit')->name('admin_tag_edit');
Route::post('/tag/doedit', 'TagController@doedit')->name('admin_tag_doedit');
Route::get('/tag/del', 'TagController@del')->name('admin_tag_del');
//单页
Route::get('/page', 'PageController@index')->name('admin_page');
Route::get('/page/add', 'PageController@add')->name('admin_page_add');
@ -76,6 +83,22 @@ Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['w
Route::get('/page/edit', 'PageController@edit')->name('admin_page_edit');
Route::post('/page/doedit', 'PageController@doedit')->name('admin_page_doedit');
Route::get('/page/del', 'PageController@del')->name('admin_page_del');
//产品
Route::get('/product', 'ProductController@index')->name('admin_product');
Route::get('/product/add', 'ProductController@add')->name('admin_product_add');
Route::post('/product/doadd', 'ProductController@doadd')->name('admin_product_doadd');
Route::get('/product/edit', 'ProductController@edit')->name('admin_product_edit');
Route::post('/product/doedit', 'ProductController@doedit')->name('admin_product_doedit');
Route::get('/product/del', 'ProductController@del')->name('admin_product_del');
Route::get('/product/recommendarc', 'ProductController@recommendarc')->name('admin_product_recommendarc');
Route::get('/product/articleexists', 'ProductController@productexists')->name('admin_product_productexists');
//产品分类
Route::get('/producttype', 'ProductTypeController@index')->name('admin_producttype');
Route::get('/producttype/add', 'ProductTypeController@add')->name('admin_producttype_add');
Route::post('/producttype/doadd', 'ProductTypeController@doadd')->name('admin_producttype_doadd');
Route::get('/producttype/edit', 'ProductTypeController@edit')->name('admin_producttype_edit');
Route::post('/producttype/doedit', 'ProductTypeController@doedit')->name('admin_producttype_doedit');
Route::get('/producttype/del', 'ProductTypeController@del')->name('admin_producttype_del');
//友情链接
Route::get('/friendlink', 'FriendlinkController@index')->name('admin_friendlink');
Route::get('/friendlink/add', 'FriendlinkController@add')->name('admin_friendlink_add');
@ -83,9 +106,6 @@ Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['w
Route::get('/friendlink/edit', 'FriendlinkController@edit')->name('admin_friendlink_edit');
Route::post('/friendlink/doedit', 'FriendlinkController@doedit')->name('admin_friendlink_doedit');
Route::get('/friendlink/del', 'FriendlinkController@del')->name('admin_friendlink_del');
//在线留言管理
Route::get('/guestbook', 'GuestbookController@index')->name('admin_guestbook');
Route::get('/guestbook/del', 'GuestbookController@del')->name('admin_guestbook_del');
//关键词管理
Route::get('/keyword', 'KeywordController@index')->name('admin_keyword');
Route::get('/keyword/add', 'KeywordController@add')->name('admin_keyword_add');
@ -93,13 +113,6 @@ Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['w
Route::get('/keyword/edit', 'KeywordController@edit')->name('admin_keyword_edit');
Route::post('/keyword/doedit', 'KeywordController@doedit')->name('admin_keyword_doedit');
Route::get('/keyword/del', 'KeywordController@del')->name('admin_keyword_del');
//产品
Route::get('/product', 'ProductController@index')->name('admin_product');
Route::get('/product/add', 'ProductController@add')->name('admin_product_add');
Route::post('/product/doadd', 'ProductController@doadd')->name('admin_product_doadd');
Route::get('/product/edit', 'ProductController@edit')->name('admin_product_edit');
Route::post('/product/doedit', 'ProductController@doedit')->name('admin_product_doedit');
Route::get('/product/del', 'ProductController@del')->name('admin_product_del');
//搜索关键词
Route::get('/searchword', 'SearchwordController@index')->name('admin_searchword');
Route::get('/searchword/add', 'SearchwordController@add')->name('admin_searchword_add');
@ -114,13 +127,9 @@ Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['w
Route::get('/slide/edit', 'SlideController@edit')->name('admin_slide_edit');
Route::post('/slide/doedit', 'SlideController@doedit')->name('admin_slide_doedit');
Route::get('/slide/del', 'SlideController@del')->name('admin_slide_del');
//标签
Route::get('/tag', 'TagController@index')->name('admin_tag');
Route::get('/tag/add', 'TagController@add')->name('admin_tag_add');
Route::post('/tag/doadd', 'TagController@doadd')->name('admin_tag_doadd');
Route::get('/tag/edit', 'TagController@edit')->name('admin_tag_edit');
Route::post('/tag/doedit', 'TagController@doedit')->name('admin_tag_doedit');
Route::get('/tag/del', 'TagController@del')->name('admin_tag_del');
//在线留言管理
Route::get('/guestbook', 'GuestbookController@index')->name('admin_guestbook');
Route::get('/guestbook/del', 'GuestbookController@del')->name('admin_guestbook_del');
//系统参数配置
Route::get('/sysconfig', 'SysconfigController@index')->name('admin_sysconfig');
Route::get('/sysconfig/add', 'SysconfigController@add')->name('admin_sysconfig_add');

Loading…
Cancel
Save