ZLW-PC\Administrator 6 years ago
parent
commit
416d59af2f
  1. 15
      app/Common/function.php
  2. 2
      app/Http/Controllers/Admin/AdminController.php
  3. 2
      app/Http/Controllers/Admin/AdminRoleController.php
  4. 2
      app/Http/Controllers/Admin/ArticleController.php
  5. 6
      app/Http/Controllers/Admin/CategoryController.php
  6. 2
      app/Http/Controllers/Admin/CommonController.php
  7. 4
      app/Http/Controllers/Admin/GoodsBrandController.php
  8. 6
      app/Http/Controllers/Admin/GoodsController.php
  9. 6
      app/Http/Controllers/Admin/GoodstypeController.php
  10. 4
      app/Http/Controllers/Admin/IndexController.php
  11. 6
      app/Http/Controllers/Admin/KeywordController.php
  12. 6
      app/Http/Controllers/Admin/KuaidiController.php
  13. 6
      app/Http/Controllers/Admin/LoginController.php
  14. 6
      app/Http/Controllers/Admin/MenuController.php
  15. 4
      app/Http/Controllers/Admin/OrderController.php
  16. 4
      app/Http/Controllers/Admin/PageController.php
  17. 6
      app/Http/Controllers/Admin/SearchController.php
  18. 6
      app/Http/Controllers/Admin/SearchwordController.php
  19. 4
      app/Http/Controllers/Admin/SysconfigController.php
  20. 6
      app/Http/Controllers/Admin/TagController.php
  21. 6
      app/Http/Controllers/Admin/UserController.php
  22. 6
      app/Http/Controllers/Admin/UserRankController.php
  23. 4
      app/Http/Controllers/Admin/UserWithdrawController.php
  24. 6
      app/Http/Controllers/Admin/WeixinMenuController.php
  25. 2
      public/css/style.css

15
app/Common/function.php

@ -1284,4 +1284,17 @@ function checkIsNumber($data)
return false;
}
// 车牌号校验
function isCarLicense($license)
{
if (empty($license)) {
return false;
}
$regular = "/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/u";
preg_match($regular, $license, $match);
if (isset($match[0])) {
return true;
}
return false;
}

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

@ -107,7 +107,7 @@ class AdminController extends CommonController
if(!empty($_POST["username"])){$data['username'] = $map['username'] = $_POST["username"];}else{error_jump('用户名不能为空');exit;}//用户名
if(!empty($_POST["oldpwd"])){$map['pwd'] = md5($_POST["oldpwd"]);}else{error_jump('旧密码错误');exit;}
if($_POST["newpwd"]==$_POST["newpwd2"]){$data['pwd'] = md5($_POST["newpwd"]);}else{error_jump('密码错误');exit;}
if($_POST["oldpwd"]==$_POST["newpwd"]){error_jump('新旧密码不能一致');exit;}
if($_POST["oldpwd"]==$_POST["newpwd"]){error_jump('新旧密码不能一致');exit;}
$User = object_to_array(DB::table("admin")->where($map)->first(), 1);

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

@ -110,7 +110,7 @@ class AdminRoleController extends CommonController
//角色权限设置视图
public function permissions()
{
if(!empty($_GET["id"])){$data['role_id'] = $_GET["id"];}else{error_jump('您访问的页面不存在或已被删除');}
if(!empty($_GET["id"])){$data['role_id'] = $_GET["id"];}else{error_jump('您访问的页面不存在或已被删除');}
$menu = [];
$access = model('Access')->getAll(['role_id'=>$data['role_id']]);

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

@ -236,7 +236,7 @@ class ArticleController extends CommonController
//推荐文章
public function recommendarc()
{
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump("您访问的页面不存在或已被删除");} //if(preg_match('/[0-9]*/',$id)){}else{exit;}
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump("您访问的页面不存在或已被删除");} //if(preg_match('/[0-9]*/',$id)){}else{exit;}
$data['tuijian'] = 1;

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

@ -60,7 +60,7 @@ class CategoryController extends CommonController
if(DB::table('arctype')->insert($_POST))
{
success_jump('添加成功');
success_jump('添加成功');
}
else
{
@ -91,7 +91,7 @@ class CategoryController extends CommonController
if(DB::table('arctype')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_category'));
success_jump('修改成功', route('admin_category'));
}
else
{
@ -119,7 +119,7 @@ class CategoryController extends CommonController
}
else
{
error_jump('栏目下的文章删除失败');
error_jump('栏目下的文章删除失败');
}
}
else

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

@ -39,7 +39,7 @@ class CommonController extends Controller
if(!$check)
{
error_jump('你没有权限访问,请联系管理员', route('admin'));
error_jump('你没有权限访问,请联系管理员', route('admin'));
}
}
}

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

@ -27,7 +27,7 @@ class GoodsBrandController extends CommonController
if(DB::table("goods_brand")->insert($_POST))
{
success_jump('添加成功', route('admin_goodsbrand'));
success_jump('添加成功', route('admin_goodsbrand'));
}
else
{
@ -60,7 +60,7 @@ class GoodsBrandController extends CommonController
if(DB::table('goods_brand')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_goodsbrand'));
success_jump('修改成功', route('admin_goodsbrand'));
}
else
{

6
app/Http/Controllers/Admin/GoodsController.php

@ -101,7 +101,7 @@ class GoodsController extends CommonController
DB::table('goods_img')->insert($tmp);
}
success_jump('添加成功', route('admin_goods'));
success_jump('添加成功', route('admin_goods'));
}
else
{
@ -175,11 +175,11 @@ class GoodsController extends CommonController
DB::table('goods_img')->insert($tmp);
}
success_jump('修改成功', route('admin_goods'));
success_jump('修改成功', route('admin_goods'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

6
app/Http/Controllers/Admin/GoodstypeController.php

@ -61,7 +61,7 @@ class GoodsTypeController extends CommonController
if(DB::table("goods_type")->insert($_POST))
{
success_jump('添加成功', route('admin_goodstype'));
success_jump('添加成功', route('admin_goodstype'));
}
else
{
@ -92,7 +92,7 @@ class GoodsTypeController extends CommonController
if(DB::table("goods_type")->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_goodstype'));
success_jump('修改成功', route('admin_goodstype'));
}
else
{
@ -120,7 +120,7 @@ class GoodsTypeController extends CommonController
}
else
{
error_jump('分类下的商品删除失败');
error_jump('分类下的商品删除失败');
}
}
else

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

@ -27,7 +27,7 @@ class IndexController extends CommonController
public function upconfig()
{
cache()->forget('sysconfig'); //删除缓存
success_jump('更新成功');
success_jump('更新成功');
}
//更新缓存
@ -35,6 +35,6 @@ class IndexController extends CommonController
{
cache()->forget('sysconfig'); //删除缓存
dir_delete(storage_path().'/framework/cache/data/');
success_jump('更新成功');
success_jump('更新成功');
}
}

6
app/Http/Controllers/Admin/KeywordController.php

@ -28,7 +28,7 @@ class KeywordController extends CommonController
unset($_POST["_token"]);
if(DB::table('keyword')->insert($_POST))
{
success_jump("添加成功", route('admin_keyword'));
success_jump("添加成功", route('admin_keyword'));
}
else
{
@ -54,11 +54,11 @@ class KeywordController extends CommonController
unset($_POST["_token"]);
if(DB::table('keyword')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_keyword'));
success_jump('修改成功', route('admin_keyword'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

6
app/Http/Controllers/Admin/KuaidiController.php

@ -37,7 +37,7 @@ class KuaidiController extends CommonController
if(DB::table('kuaidi')->insert(array_filter($_POST)))
{
success_jump('添加成功', route('admin_kuaidi'));
success_jump('添加成功', route('admin_kuaidi'));
}
else
{
@ -59,11 +59,11 @@ class KuaidiController extends CommonController
if(DB::table('kuaidi')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_kuaidi'));
success_jump('修改成功', route('admin_kuaidi'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

6
app/Http/Controllers/Admin/LoginController.php

@ -60,7 +60,7 @@ class LoginController extends BaseController
{
session_unset();
session_destroy();// 退出登录,清除session
success_jump('退出成功', route('home'));
success_jump('退出成功', route('home'));
}
//密码恢复
@ -71,11 +71,11 @@ class LoginController extends BaseController
if(DB::table('admin')->where('id', 1)->update($data))
{
success_jump('密码恢复成功', route('admin_login'));
success_jump('密码恢复成功', route('admin_login'));
}
else
{
error_jump('密码恢复失败', route('home'));
error_jump('密码恢复失败', route('home'));
}
}

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

@ -39,7 +39,7 @@ class MenuController extends CommonController
{
DB::table('access')->insert(['role_id' => 1, 'menu_id' => $menuid]);
success_jump('添加成功', route('admin_menu'));
success_jump('添加成功', route('admin_menu'));
}
else
{
@ -66,11 +66,11 @@ class MenuController extends CommonController
unset($_POST["_token"]);
if(DB::table('menu')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_menu'));
success_jump('修改成功', route('admin_menu'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

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

@ -134,7 +134,7 @@ class OrderController extends CommonController
if(Order::insert($_POST))
{
success_jump('添加成功', route('admin_order'));
success_jump('添加成功', route('admin_order'));
}
else
{
@ -167,7 +167,7 @@ class OrderController extends CommonController
if(Order::where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_order'));
success_jump('修改成功', route('admin_order'));
}
else
{

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

@ -27,7 +27,7 @@ class PageController extends CommonController
if(DB::table("page")->insert($_POST))
{
success_jump('添加成功');
success_jump('添加成功');
}
else
{
@ -61,7 +61,7 @@ class PageController extends CommonController
if(DB::table('page')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_page'));
success_jump('修改成功', route('admin_page'));
}
else
{

6
app/Http/Controllers/Admin/SearchController.php

@ -25,7 +25,7 @@ class Search extends Base
if(db('search')->insert($_POST))
{
$this->success('添加成功', FLADMIN.'/Search' , 1);
$this->success('添加成功', FLADMIN.'/Search' , 1);
}
else
{
@ -57,11 +57,11 @@ class Search extends Base
if(db('search')->where("id=$id")->update($_POST))
{
$this->success('修改成功', FLADMIN.'/Search' , 1);
$this->success('修改成功', FLADMIN.'/Search' , 1);
}
else
{
$this->error('修改失败', FLADMIN.'/Search/edit?id='.$_POST["id"] , 3);
$this->error('修改失败', FLADMIN.'/Search/edit?id='.$_POST["id"] , 3);
}
}

6
app/Http/Controllers/Admin/SearchwordController.php

@ -33,7 +33,7 @@ class SearchwordController extends CommonController
if($insertId = DB::table('searchword')->insertGetId($_POST))
{
success_jump('添加成功', route('admin_searchword'));
success_jump('添加成功', route('admin_searchword'));
}
else
{
@ -63,11 +63,11 @@ class SearchwordController extends CommonController
if(DB::table('searchword')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_searchword'));
success_jump('修改成功', route('admin_searchword'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

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

@ -42,7 +42,7 @@ class SysconfigController extends CommonController
if($_POST['varname']!="" && DB::table('sysconfig')->insert($_POST))
{
cache()->forget('sysconfig'); //删除缓存
success_jump('添加成功', route('admin_sysconfig'));
success_jump('添加成功', route('admin_sysconfig'));
}
else
{
@ -83,7 +83,7 @@ class SysconfigController extends CommonController
if(DB::table('sysconfig')->where('id', $id)->update($_POST))
{
cache()->forget('sysconfig'); //删除缓存
success_jump('更新成功', route('admin_sysconfig'));
success_jump('更新成功', route('admin_sysconfig'));
}
else
{

6
app/Http/Controllers/Admin/TagController.php

@ -49,7 +49,7 @@ class TagController extends CommonController
}
}
success_jump('添加成功', route('admin_tag'));
success_jump('添加成功', route('admin_tag'));
}
else
{
@ -125,11 +125,11 @@ class TagController extends CommonController
DB::table("taglist")->where('tid', $id)->delete();
}
success_jump('修改成功', route('admin_tag'));
success_jump('修改成功', route('admin_tag'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

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

@ -102,7 +102,7 @@ class UserController extends CommonController
if(DB::table('user')->insert($_POST))
{
success_jump('添加成功', route('admin_user'));
success_jump('添加成功', route('admin_user'));
}
else
{
@ -124,11 +124,11 @@ class UserController extends CommonController
unset($_POST["_token"]);
if(DB::table('user')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_user'));
success_jump('修改成功', route('admin_user'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

6
app/Http/Controllers/Admin/UserRankController.php

@ -40,7 +40,7 @@ class UserRankController extends CommonController
if(DB::table('user_rank')->insert(array_filter($_POST)))
{
success_jump('添加成功', route('admin_userrank'));
success_jump('添加成功', route('admin_userrank'));
}
else
{
@ -65,11 +65,11 @@ class UserRankController extends CommonController
if(DB::table('user_rank')->where('id', $id)->update($_POST) !== false)
{
success_jump('修改成功', route('admin_userrank'));
success_jump('修改成功', route('admin_userrank'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

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

@ -46,11 +46,11 @@ class UserWithdrawController extends CommonController
unset($_POST["_token"]);
if(DB::table('user_withdraw')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_user'));
success_jump('修改成功', route('admin_user'));
}
else
{
error_jump('修改失败');
error_jump('修改失败');
}
}

6
app/Http/Controllers/Admin/WeixinMenuController.php

@ -59,7 +59,7 @@ class WeixinMenuController extends CommonController
if(DB::table('weixin_menu')->insert($_POST))
{
success_jump('添加成功');
success_jump('添加成功');
}
else
{
@ -89,7 +89,7 @@ class WeixinMenuController extends CommonController
if(DB::table('weixin_menu')->where('id', $id)->update($_POST))
{
success_jump('修改成功', route('admin_weixinmenu'));
success_jump('修改成功', route('admin_weixinmenu'));
}
else
{
@ -206,6 +206,6 @@ class WeixinMenuController extends CommonController
$wechat_menu->create_menu($jsonmenu);
success_jump('修改菜单,生成后,不会立即显示,有24小时的缓存,除非你取消关注,然后重新关注', route('admin_weixinmenu'),5);
success_jump('修改菜单,生成后,不会立即显示,有24小时的缓存,除非你取消关注,然后重新关注', route('admin_weixinmenu'),5);
}
}

2
public/css/style.css

@ -15,7 +15,7 @@ a{color:#313131;text-decoration:none;}a:hover{text-decoration:none;color:#22ac38
.pul{margin-right:-15px;font-family:"Microsoft Yahei";}.pul a:hover .title{text-decoration:underline;}
.pul li{background-color: #fff;float:left;overflow:hidden;margin-right:15px;margin-bottom:15px;border:1px solid #dcdcdc;}.pul li a:hover{text-decoration:none;}
.pul li img{width:308px;height:308px;display:block;margin-bottom:10px;}
.pul li .title{overflow:hidden;white-space:nowrap;width:293px;height:20px;margin:0 5px 2px 10px;font-weight:400;display: block;color: #333;font-size: 14px;line-height: 15px;}
.pul li .title{overflow:hidden;white-space:nowrap;width:290px;height:20px;margin:0 8px 2px 10px;font-weight:400;display: block;color: #333;font-size: 14px;line-height: 15px;}
.pul li .desc{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:288px;margin:0 10px 5px 10px;font-size: 12px;line-height: 16px;padding: 0;color: #999;height: 20px;}
.pul li .desc .price-point{display: inline-block;font-weight: 400;color: #e61414;}
.pul .item-prices{height: 50px;}.pul .red{background-color: #e61414;}.pul .green{background-color: #26a96d;}

Loading…
Cancel
Save