27 changed files with 716 additions and 108 deletions
-
82app/Http/Controllers/Admin/FeedbackController.php
-
36app/Http/Controllers/Admin/UserController.php
-
57app/Http/Controllers/Admin/UserWithdrawController.php
-
40app/Http/Model/User.php
-
64resources/views/admin/UserWithdraw/add.blade.php
-
67resources/views/admin/UserWithdraw/edit.blade.php
-
34resources/views/admin/UserWithdraw/index.blade.php
-
2resources/views/admin/admin/index.blade.php
-
2resources/views/admin/adminrole/index.blade.php
-
2resources/views/admin/category/index.blade.php
-
110resources/views/admin/feedback/add.blade.php
-
110resources/views/admin/feedback/edit.blade.php
-
26resources/views/admin/feedback/index.blade.php
-
2resources/views/admin/friendlink/index.blade.php
-
35resources/views/admin/guestbook/index.blade.php
-
2resources/views/admin/menu/index.blade.php
-
3resources/views/admin/order/detail.blade.php
-
8resources/views/admin/order/index.blade.php
-
4resources/views/admin/slide/index.blade.php
-
58resources/views/admin/user/edit222.blade.php
-
32resources/views/admin/user/index.blade.php
-
26resources/views/admin/user/money.blade.php
-
2resources/views/weixin/order/orderDetail.blade.php
-
2resources/views/weixin/order/orderList.blade.php
-
4resources/views/weixin/user/userDistribution.blade.php
-
2resources/views/weixin/user/userWithdraw.blade.php
-
12routes/web.php
@ -0,0 +1,82 @@ |
|||||
|
<?php |
||||
|
namespace App\Http\Controllers\Admin; |
||||
|
|
||||
|
use App\Http\Controllers\Admin\CommonController; |
||||
|
use DB; |
||||
|
|
||||
|
class FeedbackController extends CommonController |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
} |
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$data['posts'] = parent::pageList('feedback'); |
||||
|
|
||||
|
return view('admin.feedback.index', $data); |
||||
|
} |
||||
|
|
||||
|
public function add() |
||||
|
{ |
||||
|
return view('admin.feedback.add'); |
||||
|
} |
||||
|
|
||||
|
public function doadd() |
||||
|
{ |
||||
|
if(isset($_POST['editorValue'])){unset($_POST['editorValue']);} |
||||
|
unset($_POST["_token"]); |
||||
|
|
||||
|
if(DB::table('feedback')->insert(array_filter($_POST))) |
||||
|
{ |
||||
|
success_jump('添加成功!', route('admin_feedback')); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
error_jump('添加失败!请修改后重新添加'); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public function edit() |
||||
|
{ |
||||
|
if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} |
||||
|
if(preg_match('/[0-9]*/',$id)){}else{exit;} |
||||
|
|
||||
|
$data['id'] = $id; |
||||
|
$data['post'] = object_to_array(DB::table('feedback')->where('id', $id)->first(), 1); |
||||
|
|
||||
|
return view('admin.feedback.edit', $data); |
||||
|
} |
||||
|
|
||||
|
public function doedit() |
||||
|
{ |
||||
|
if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else{$id="";exit;} |
||||
|
|
||||
|
if(isset($_POST['editorValue'])){unset($_POST['editorValue']);} |
||||
|
unset($_POST["_token"]); |
||||
|
|
||||
|
if(DB::table('feedback')->where('id', $id)->update($_POST)) |
||||
|
{ |
||||
|
success_jump('修改成功!', route('admin_slide')); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
error_jump('修改失败!'); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public function del() |
||||
|
{ |
||||
|
if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');} |
||||
|
|
||||
|
if(DB::table('feedback')->whereIn("id", explode(',', $id))->delete()) |
||||
|
{ |
||||
|
success_jump('删除成功'); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
error_jump('删除失败!请重新提交'); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
<?php |
||||
|
namespace App\Http\Controllers\Admin; |
||||
|
|
||||
|
use App\Http\Controllers\Admin\CommonController; |
||||
|
use DB; |
||||
|
use App\Http\Model\UserWithdraw; |
||||
|
|
||||
|
class UserWithdrawController extends CommonController |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
} |
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$posts = parent::pageList('user_withdraw',array('is_delete'=>0)); |
||||
|
|
||||
|
if($posts) |
||||
|
{ |
||||
|
foreach($posts as $k=>$v) |
||||
|
{ |
||||
|
$posts[$k]->user = DB::table('user')->where('id', $v->id)->first(); |
||||
|
$posts[$k]->status_text = UserWithdraw::getStatusText(['status'=>$v->status]); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$data['posts'] = $posts; |
||||
|
return view('admin.UserWithdraw.index', $data); |
||||
|
} |
||||
|
|
||||
|
public function edit() |
||||
|
{ |
||||
|
if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} |
||||
|
if(preg_match('/[0-9]*/',$id)){}else{exit;} |
||||
|
|
||||
|
$data['id'] = $id; |
||||
|
$data['post'] = object_to_array(DB::table('user_withdraw')->where('id', $id)->first(), 1); |
||||
|
|
||||
|
return view('admin.UserWithdraw.edit', $data); |
||||
|
} |
||||
|
|
||||
|
public function doedit() |
||||
|
{ |
||||
|
if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;} |
||||
|
|
||||
|
unset($_POST["_token"]); |
||||
|
if(DB::table('user_withdraw')->where('id', $id)->update($_POST)) |
||||
|
{ |
||||
|
success_jump('修改成功!', route('admin_user')); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
error_jump('修改失败!'); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,64 @@ |
|||||
|
@extends('admin.layouts.app') |
||||
|
@section('title', '管理员添加') |
||||
|
|
||||
|
@section('content') |
||||
|
<h5 class="sub-header"><a href="<?php echo route('admin_admin'); ?>">管理员列表</a> > 管理员添加</h5> |
||||
|
|
||||
|
<form id="addarc" method="post" action="<?php echo route('admin_admin_doadd'); ?>" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }} |
||||
|
<table class="table table-striped table-bordered"> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<td align="right">用户名:</td> |
||||
|
<td><input name="username" type="text" id="username" value="" class="required" style="width:30%" placeholder="在此输入用户名"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">密码:</td> |
||||
|
<td><input name="pwd" type="password" id="pwd" value="" class="required" style="width:60%"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">邮箱:</td> |
||||
|
<td><input name="email" type="text" id="email" value="" style="width:60%"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">角色:</td> |
||||
|
<td> |
||||
|
<select name="role_id" id="role_id"> |
||||
|
<?php if($rolelist){foreach($rolelist as $row){ ?>
|
||||
|
<option value="<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></option>
|
||||
|
<?php }} ?>
|
||||
|
</select> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button> <button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td> |
||||
|
</tr> |
||||
|
</tbody></table></form><!-- 表单结束 --> |
||||
|
<script> |
||||
|
$(function(){ |
||||
|
$(".required").blur(function(){ |
||||
|
var $parent = $(this).parent(); |
||||
|
$parent.find(".formtips").remove(); |
||||
|
if(this.value=="") |
||||
|
{ |
||||
|
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>'); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>'); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//重置
|
||||
|
$('#addarc input[type="reset"]').click(function(){ |
||||
|
$(".formtips").remove(); |
||||
|
}); |
||||
|
|
||||
|
$("#addarc").submit(function(){ |
||||
|
$(".required").trigger('blur'); |
||||
|
var numError = $('#addarc .onError').length; |
||||
|
|
||||
|
if(numError){return false;} |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
@endsection |
@ -0,0 +1,67 @@ |
|||||
|
@extends('admin.layouts.app') |
||||
|
@section('title', '管理员修改') |
||||
|
|
||||
|
@section('content') |
||||
|
<h5 class="sub-header"><a href="<?php echo route('admin_admin'); ?>">管理员列表</a> > 管理员修改</h5> |
||||
|
|
||||
|
<form id="addarc" method="post" action="<?php echo route('admin_admin_doedit'); ?>" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }} |
||||
|
<table class="table table-striped table-bordered"> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<td align="right">用户名:</td> |
||||
|
<td><input name="username" type="text" id="username" value="<?php echo $post["username"]; ?>" class="required" style="width:30%" placeholder="在此输入用户名"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">密码:</td> |
||||
|
<td><input name="pwd" type="password" id="pwd" value="" class="required" style="width:30%"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">邮箱:</td> |
||||
|
<td><input name="email" type="text" id="email" value="<?php echo $post["email"]; ?>" style="width:30%"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">角色:</td> |
||||
|
<td> |
||||
|
<select name="role_id" id="role_id"> |
||||
|
<?php if($rolelist){foreach($rolelist as $row){ ?>
|
||||
|
<?php if($post["role_id"]==$row["id"]){ ?>
|
||||
|
<option selected value="<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></option>
|
||||
|
<?php }else{ ?>
|
||||
|
<option value="<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></option>
|
||||
|
<?php }}} ?>
|
||||
|
</select> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button> <button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button></td> |
||||
|
</tr> |
||||
|
</tbody></table></form><!-- 表单结束 --> |
||||
|
<script> |
||||
|
$(function(){ |
||||
|
$(".required").blur(function(){ |
||||
|
var $parent = $(this).parent(); |
||||
|
$parent.find(".formtips").remove(); |
||||
|
if(this.value=="") |
||||
|
{ |
||||
|
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>'); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>'); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//重置
|
||||
|
$('#addarc input[type="reset"]').click(function(){ |
||||
|
$(".formtips").remove(); |
||||
|
}); |
||||
|
|
||||
|
$("#addarc").submit(function(){ |
||||
|
$(".required").trigger('blur'); |
||||
|
var numError = $('#addarc .onError').length; |
||||
|
|
||||
|
if(numError){return false;} |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
@endsection |
@ -0,0 +1,34 @@ |
|||||
|
@extends('admin.layouts.app') |
||||
|
@section('title', '提现申请列表') |
||||
|
|
||||
|
@section('content') |
||||
|
<h2 class="sub-header">提现申请列表</h2> |
||||
|
|
||||
|
<form name="listarc"><div class="table-responsive"><table class="table table-hover"> |
||||
|
<thead><tr class="info"> |
||||
|
<th>ID</th> |
||||
|
<th>用户名</th> |
||||
|
<th>提现金额</th> |
||||
|
<th>姓名</th> |
||||
|
<th>收款方式</th> |
||||
|
<th>收款账号</th> |
||||
|
<th>申请时间</th> |
||||
|
<th>状态</th> |
||||
|
<th>操作</th> |
||||
|
</tr></thead> |
||||
|
<tbody> |
||||
|
<?php if($posts){foreach($posts as $row){ ?><tr>
|
||||
|
<td><?php echo $row->id; ?></td>
|
||||
|
<td><?php echo $row->user->user_name; ?><br><?php if($row->user->mobile){echo 'TEL:'.$row->user->mobile;} ?></td>
|
||||
|
<td><font color="red"><?php echo $row->money; ?></font></td>
|
||||
|
<td><?php echo $row->name; ?></td>
|
||||
|
<td><?php echo $row->method; ?></td>
|
||||
|
<td>账号:<?php echo $row->account;if($row->bank_name){echo '<br>银行名称:'.$row->bank_name;}if($row->bank_place){echo '<br>开户行:'.$row->bank_place;} ?></td>
|
||||
|
<td><?php echo date('Y-m-d H:i:s',$row->add_time); ?></td>
|
||||
|
<td><?php echo $row->status_text; ?></td>
|
||||
|
<td><a href="">成功</a> <a href="">拒绝</a></td> |
||||
|
</tr><?php }} ?>
|
||||
|
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 --> |
||||
|
|
||||
|
<nav aria-label="Page navigation">{{ $posts->links() }}</nav> |
||||
|
@endsection |
@ -0,0 +1,110 @@ |
|||||
|
@extends('admin.layouts.app') |
||||
|
@section('title', '轮播图添加') |
||||
|
|
||||
|
@section('content') |
||||
|
<h5 class="sub-header"><a href="/fladmin/slide">轮播图列表</a> > 添加轮播图</h5> |
||||
|
|
||||
|
<form id="addarc" method="post" action="/fladmin/slide/doadd" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }} |
||||
|
<table class="table table-striped table-bordered"> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<td align="right">标题:</td> |
||||
|
<td><input name="title" type="text" id="title" value="" class="required" style="width:30%" placeholder="在此输入关键词"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">链接网址:</td> |
||||
|
<td><input name="url" type="text" id="url" value="http://" style="width:60%" class="required"> (请用绝对地址)</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">跳转方式:</td> |
||||
|
<td> |
||||
|
<input type="radio" value='0' name="target" checked /> _blank |
||||
|
<input type="radio" value='1' name="target" /> _self |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">是否显示:</td> |
||||
|
<td> |
||||
|
<input type="radio" value='0' name="is_show" checked /> 是 |
||||
|
<input type="radio" value='1' name="is_show" /> 否 |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">排序:</td> |
||||
|
<td> |
||||
|
<input name="rank" type="text" id="rank" value="" size="3" /> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">所属的组:</td> |
||||
|
<td> |
||||
|
<input name="group_id" type="text" id="group_id" value="" size="3" /> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td style="vertical-align:middle;" align="right">图片:</td> |
||||
|
<td style="vertical-align:middle;"><button type="button" onclick="upImage();">选择图片</button> <input class="required" name="pic" type="text" id="pic" value="" style="width:40%"> <img style="margin-left:20px;display:none;" src="" width="120" height="80" id="picview"></td> |
||||
|
</tr> |
||||
|
<!-- 配置文件 --><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 _editor; |
||||
|
$(function() { |
||||
|
//重新实例化一个编辑器,防止在上面的editor编辑器中显示上传的图片或者文件
|
||||
|
_editor = UE.getEditor('ueditorimg'); |
||||
|
_editor.ready(function () { |
||||
|
//设置编辑器不可用
|
||||
|
_editor.setDisabled('insertimage'); |
||||
|
//隐藏编辑器,因为不会用到这个编辑器实例,所以要隐藏
|
||||
|
_editor.hide(); |
||||
|
//侦听图片上传
|
||||
|
_editor.addListener('beforeInsertImage', function (t, arg) { |
||||
|
//将地址赋值给相应的input,只取第一张图片的路径
|
||||
|
$('#pic').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 colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button> <button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button></td> |
||||
|
</tr> |
||||
|
</tbody></table></form><!-- 表单结束 --> |
||||
|
<script> |
||||
|
$(function(){ |
||||
|
$(".required").blur(function(){ |
||||
|
var $parent = $(this).parent(); |
||||
|
$parent.find(".formtips").remove(); |
||||
|
if(this.value=="") |
||||
|
{ |
||||
|
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>'); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>'); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//重置
|
||||
|
$('#addarc input[type="reset"]').click(function(){ |
||||
|
$(".formtips").remove(); |
||||
|
}); |
||||
|
|
||||
|
$("#addarc").submit(function(){ |
||||
|
$(".required").trigger('blur'); |
||||
|
var numError = $('#addarc .onError').length; |
||||
|
|
||||
|
if(numError){return false;} |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
@endsection |
@ -0,0 +1,110 @@ |
|||||
|
@extends('admin.layouts.app') |
||||
|
@section('title', '轮播图修改') |
||||
|
|
||||
|
@section('content') |
||||
|
<h5 class="sub-header"><a href="/fladmin/slide">轮播图列表</a> > 轮播图修改</h5> |
||||
|
|
||||
|
<form id="addarc" method="post" action="/fladmin/slide/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="<?php echo $post['title']; ?>" class="required" style="width:30%" placeholder="在此输入关键词"><input style="display:none;" name="id" type="text" id="id" value="<?php echo $id; ?>"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">链接网址:</td> |
||||
|
<td><input name="url" type="text" id="url" value="<?php echo $post['url']; ?>" style="width:60%" class="required"> (请用绝对地址)</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">跳转方式:</td> |
||||
|
<td> |
||||
|
<input type="radio" value='0' name="target" <?php if(isset($post['target']) && $post['target']==0){echo 'checked';} ?> /> _blank
|
||||
|
<input type="radio" value='1' name="target" <?php if(isset($post['target']) && $post['target']==1){echo 'checked';} ?> /> _self
|
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">是否显示:</td> |
||||
|
<td> |
||||
|
<input type="radio" value='0' name="is_show" <?php if(isset($post['is_show']) && $post['is_show']==0){echo 'checked';} ?> /> 是
|
||||
|
<input type="radio" value='1' name="is_show" <?php if(isset($post['is_show']) && $post['is_show']==1){echo 'checked';} ?> /> 否
|
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">排序:</td> |
||||
|
<td> |
||||
|
<input name="rank" type="text" id="rank" value="<?php echo $post['rank']; ?>" size="3" /> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">所属的组:</td> |
||||
|
<td> |
||||
|
<input name="group_id" type="text" id="group_id" value="<?php echo $post['group_id']; ?>" size="3" /> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td style="vertical-align:middle;" align="right">图片:</td> |
||||
|
<td style="vertical-align:middle;"><button type="button" onclick="upImage();">选择图片</button> <input name="pic" type="text" id="pic" value="<?php echo $post['pic']; ?>" style="width:40%"> <img style="margin-left:20px;<?php if(empty($post["pic"]) || !imgmatch($post["pic"])){ echo "display:none;"; } ?>" src="<?php if(imgmatch($post["pic"])){echo $post["pic"];} ?>" width="120" height="80" id="picview"></td> |
||||
|
</tr> |
||||
|
<!-- 配置文件 --><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 _editor; |
||||
|
$(function() { |
||||
|
//重新实例化一个编辑器,防止在上面的editor编辑器中显示上传的图片或者文件
|
||||
|
_editor = UE.getEditor('ueditorimg'); |
||||
|
_editor.ready(function () { |
||||
|
//设置编辑器不可用
|
||||
|
_editor.setDisabled('insertimage'); |
||||
|
//隐藏编辑器,因为不会用到这个编辑器实例,所以要隐藏
|
||||
|
_editor.hide(); |
||||
|
//侦听图片上传
|
||||
|
_editor.addListener('beforeInsertImage', function (t, arg) { |
||||
|
//将地址赋值给相应的input,只取第一张图片的路径
|
||||
|
$('#pic').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 colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button> <button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button></td> |
||||
|
</tr> |
||||
|
</tbody></table></form><!-- 表单结束 --> |
||||
|
<script> |
||||
|
$(function(){ |
||||
|
$(".required").blur(function(){ |
||||
|
var $parent = $(this).parent(); |
||||
|
$parent.find(".formtips").remove(); |
||||
|
if(this.value=="") |
||||
|
{ |
||||
|
$parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>'); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
$parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>'); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//重置
|
||||
|
$('#addarc input[type="reset"]').click(function(){ |
||||
|
$(".formtips").remove(); |
||||
|
}); |
||||
|
|
||||
|
$("#addarc").submit(function(){ |
||||
|
$(".required").trigger('blur'); |
||||
|
var numError = $('#addarc .onError').length; |
||||
|
|
||||
|
if(numError){return false;} |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
@endsection |
@ -0,0 +1,26 @@ |
|||||
|
@extends('admin.layouts.app') |
||||
|
@section('title', '意见反馈列表') |
||||
|
|
||||
|
@section('content') |
||||
|
<h2 class="sub-header">意见反馈列表</h2> |
||||
|
|
||||
|
<form name="listarc"><div class="table-responsive"><table class="table table-hover"> |
||||
|
<thead><tr class="info"> |
||||
|
<th>ID</th> |
||||
|
<th>标题</th> |
||||
|
<th>内容</th> |
||||
|
<th>时间</th> |
||||
|
<th>管理</th> |
||||
|
</tr></thead> |
||||
|
<tbody> |
||||
|
<?php if($posts){foreach($posts as $row){ ?><tr>
|
||||
|
<td><?php echo $row->id; ?></td>
|
||||
|
<td><?php echo $row->title; ?></td>
|
||||
|
<td><?php echo $row->content; ?></td>
|
||||
|
<td><?php echo $row->created_at; ?></td>
|
||||
|
<td><a onclick="delconfirm('<?php echo route('admin_feedback_del',array('id'=>$row->id)); ?>')" href="javascript:;">删除</a></td> |
||||
|
</tr><?php }} ?>
|
||||
|
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 --> |
||||
|
|
||||
|
<nav aria-label="Page navigation">{{ $posts->links() }}</nav> |
||||
|
@endsection |
@ -1,58 +0,0 @@ |
|||||
<!DOCTYPE html><html><head><title>密码修改_后台管理</title>@include('admin.common.header') |
|
||||
<div class="container-fluid"> |
|
||||
<div class="row"> |
|
||||
<!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 --> |
|
||||
<style>.input-error{background-color:#ffe7e7;}</style>
|
|
||||
<!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox"> |
|
||||
<h2 class="sub-header">密码修改</h2> |
|
||||
<form id="addarc" method="post" action="/fladmin/user/doedit" class="table-responsive" role="form">{{ csrf_field() }} |
|
||||
<table class="table table-striped table-bordered"> |
|
||||
<tbody> |
|
||||
<tr> |
|
||||
<td align="right">用户名:</td> |
|
||||
<td><input name="username" type="text" class="" id="username" value="<?php echo $post["username"]; ?>" style="width:30%"></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td align="right">旧密码:</td> |
|
||||
<td><input name="oldpwd" type="password" class="" id="oldpwd" value="" style="width:30%"></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td align="right">新密码:</td> |
|
||||
<td><input name="newpwd" type="password" class="" id="newpwd" value="" style="width:30%"></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td align="right">确认密码:</td> |
|
||||
<td><input name="newpwd2" type="password" class="" id="newpwd2" value="" style="width:30%"></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button> <button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td> |
|
||||
</tr> |
|
||||
</tbody></table></form><!-- 表单结束 --> |
|
||||
</div></div><!-- 右边结束 --></div></div> |
|
||||
<script> |
|
||||
$('#addarc input[type="text"], #addarc input[type="password"]').on('focus', function() { |
|
||||
$(this).removeClass('input-error'); |
|
||||
}); |
|
||||
$('#addarc').on('submit', function(e) { |
|
||||
$(this).find('input[type="text"], input[type="password"]').each(function(){ |
|
||||
if( $(this).val() == "" ) { |
|
||||
e.preventDefault(); |
|
||||
$(this).addClass('input-error'); |
|
||||
} |
|
||||
else { |
|
||||
$(this).removeClass('input-error'); |
|
||||
} |
|
||||
}); |
|
||||
if($('#newpwd').val()!=$('#newpwd2').val() || $('#newpwd').val()=='') |
|
||||
{ |
|
||||
e.preventDefault(); |
|
||||
$('#newpwd').addClass('input-error'); |
|
||||
$('#newpwd2').addClass('input-error'); |
|
||||
} |
|
||||
else { |
|
||||
$('#newpwd').removeClass('input-error'); |
|
||||
$('#newpwd2').removeClass('input-error'); |
|
||||
} |
|
||||
}); |
|
||||
</script> |
|
||||
</body></html> |
|
@ -1,25 +1,35 @@ |
|||||
@extends('admin.layouts.app') |
@extends('admin.layouts.app') |
||||
@section('title', '管理员列表') |
|
||||
|
@section('title', '会员列表') |
||||
|
|
||||
@section('content') |
@section('content') |
||||
<h2 class="sub-header">管理员列表</h2>[ <a href="<?php echo route('admin_admin_add'); ?>">添加管理员</a> ]<br><br> |
|
||||
|
<h2 class="sub-header">会员列表</h2>[ <a href="<?php echo route('admin_user_add'); ?>">添加会员</a> ] [ <a href="<?php echo route('admin_user_money'); ?>">账户记录</a> ]<br><br> |
||||
|
|
||||
<form name="listarc"><div class="table-responsive"><table class="table table-striped table-hover"> |
|
||||
<thead><tr> |
|
||||
|
<form name="listarc"><div class="table-responsive"><table class="table table-hover"> |
||||
|
<thead><tr class="info"> |
||||
<th>ID</th> |
<th>ID</th> |
||||
|
<th>头像</th> |
||||
<th>用户名</th> |
<th>用户名</th> |
||||
<th>邮箱</th> |
|
||||
|
<th>性别</th> |
||||
|
<th>余额</th> |
||||
|
<th>积分</th> |
||||
|
<th>佣金</th> |
||||
|
<th>注册时间</th> |
||||
<th>状态</th> |
<th>状态</th> |
||||
<th>管理</th> |
<th>管理</th> |
||||
</tr></thead> |
</tr></thead> |
||||
<tbody> |
<tbody> |
||||
<?php foreach($posts as $row){ ?><tr>
|
|
||||
|
<?php if($posts){foreach($posts as $row){ ?><tr>
|
||||
<td><?php echo $row->id; ?></td>
|
<td><?php echo $row->id; ?></td>
|
||||
<td><?php echo $row->username; ?></td>
|
|
||||
<td><?php echo $row->email; ?></td>
|
|
||||
<td><?php if($row->status==0){echo '正常';}elseif($row->status==1){echo '禁用';}elseif($row->status==2){echo '禁用';} ?></td>
|
|
||||
<td><a href="<?php echo route('admin_admin_edit'); ?>?id=<?php echo $row->id; ?>">修改</a><?php if($row->id<>1){ ?> | <a onclick="delconfirm('<?php echo route('admin_admin_del'); ?>?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a><?php } ?></td>
|
|
||||
</tr><?php } ?>
|
|
||||
|
<td><img src="<?php echo $row->head_img; ?>" style="width:24px;height:24px;"></td> |
||||
|
<td><?php if($row->user_name){echo $row->user_name;}else{echo $row->mobile;} ?></td>
|
||||
|
<td><?php echo $row->sex_text; ?></td>
|
||||
|
<td><?php echo $row->money; ?></td>
|
||||
|
<td><?php echo $row->point; ?></td>
|
||||
|
<td><font color="red"><?php echo $row->commission; ?></font></td>
|
||||
|
<td><?php echo date('Y-m-d H:i:s',$row->add_time); ?></td>
|
||||
|
<td><?php echo $row->status_text; ?></td>
|
||||
|
<td><a href="">人工充值</a> | <a href="<?php echo route('admin_user_money',array('user_id'=>$row->id)); ?>">帐户记录</a> | <a href="<?php echo route('admin_user_edit'); ?>?id=<?php echo $row->id; ?>">修改</a><?php if($row->id<>1){ ?> | <a onclick="delconfirm('<?php echo route('admin_user_del'); ?>?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a><?php } ?></td>
|
||||
|
</tr><?php }} ?>
|
||||
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 --> |
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 --> |
||||
|
|
||||
<nav aria-label="Page navigation">{{ $posts->links() }}</nav> |
<nav aria-label="Page navigation">{{ $posts->links() }}</nav> |
@ -0,0 +1,26 @@ |
|||||
|
@extends('admin.layouts.app') |
||||
|
@section('title', '账户记录列表') |
||||
|
|
||||
|
@section('content') |
||||
|
<h2 class="sub-header">账户记录列表</h2> |
||||
|
|
||||
|
<form name="listarc"><div class="table-responsive"><table class="table table-hover"> |
||||
|
<thead><tr class="info"> |
||||
|
<th>ID</th> |
||||
|
<th>用户名</th> |
||||
|
<th>金额</th> |
||||
|
<th>说明</th> |
||||
|
<th>时间</th> |
||||
|
</tr></thead> |
||||
|
<tbody> |
||||
|
<?php if($posts){foreach($posts as $row){ ?><tr>
|
||||
|
<td><?php echo $row->id; ?></td>
|
||||
|
<td><a href="<?php echo route('admin_user_money',array('user_id'=>$row->user_id)); ?>"><?php if($row->user->user_name){echo $row->user->user_name;}else{echo $row->user->mobile;} ?></a></td>
|
||||
|
<td><font<?php if($row->type==1){echo ' color="#0C0"';}else{echo ' color="red"';} ?>><?php if($row->type==1){echo '-';} ?><?php echo $row->money; ?></font></td>
|
||||
|
<td><?php echo $row->des; ?></td>
|
||||
|
<td><?php echo date('Y-m-d H:i:s',$row->add_time); ?></td>
|
||||
|
</tr><?php }} ?>
|
||||
|
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 --> |
||||
|
|
||||
|
<nav aria-label="Page navigation">{{ $posts->links() }}</nav> |
||||
|
@endsection |
Write
Preview
Loading…
Cancel
Save
Reference in new issue