init: 从宝塔同步到 Gitea
This commit is contained in:
@@ -0,0 +1,256 @@
|
||||
{include file="public/header"}
|
||||
<style>
|
||||
.x-body .layui-row{ margin-top:-10px; line-height:25px; background:#f5f5f5; border-radius:10px; }
|
||||
.x-body .layui-row .xblock button{ margin-top:-20px; }
|
||||
.x-body .layui-form{ margin-top:15px; margin-bottom:10px; }
|
||||
.x-body .layui-form .layui-input-block{ display:inline-block; width:150px; margin-left:0; }
|
||||
.x-body .layui-form .layui-form-item{ display:inline-block; margin-left:0; }
|
||||
.x-body .layui-form .layui-form-item .layui-form-label{ width:48px; }
|
||||
.x-body .layui-form .layui-form-item .layui-input-block{ margin-left:-10px; width:100px; }
|
||||
.x-body .layui-form .layui-form-item .layui-input-block .layui-form-radio i{ margin-right:4px; }
|
||||
.x-body .layui-form .layui-form-item .layui-form-radio{ margin-top:6px; margin-right:-8px; }
|
||||
.layui-input-block dl{ text-align:left; }
|
||||
.x-so{ margin:0; }
|
||||
.x-so input.layui-input{ width:150px; }
|
||||
.x-nav{overflow: inherit; } .x-nav .refresh{margin-right: 20px; }
|
||||
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
|
||||
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
|
||||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="x-nav" style="padding: 0px;">
|
||||
<span class="change_box">
|
||||
<a href="javascript:;" class="list-one actived" data-id="1">活动列表</a>
|
||||
<a href="javascript:;" class="list-two" data-id="2">活动添加</a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
|
||||
href="javascript:location.replace(location.href);" title="刷新">
|
||||
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="x-body">
|
||||
<div class="layui-row">
|
||||
<form class="layui-form layui-col-md12 x-so float-left" action="/memo/activity" method="get">
|
||||
<input type="text" name="title" id="title" placeholder="标题" autocomplete="off" class="layui-input" value="<?php if(isset($get['title'])) {echo $get['title'];} ?>">
|
||||
<div class="layui-input-block" >
|
||||
<select name="status" id="status">
|
||||
<option value="-1" selected>请选择状态</option>
|
||||
<option value="1" <?php if(isset($get['status']) && $get['status'] == 1) {echo 'selected';} ?>>正常</option>
|
||||
<option value="2" <?php if(isset($get['status']) && $get['status'] == 2) {echo 'selected';} ?>>锁定</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon"></i></button>
|
||||
<span class="layui-btn" id="export">导出excel</span>
|
||||
<!-- <span class="layui-btn" id="print">打印</span> -->
|
||||
</form>
|
||||
</div>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>桌子名称</th>
|
||||
<th>标题</th>
|
||||
<th>url链接</th>
|
||||
<th>内容</th>
|
||||
<th>备注</th>
|
||||
<th>显示位置</th>
|
||||
<th>创建时间</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach name="memo_list" item="vo"}
|
||||
<tr>
|
||||
<td>{$vo.table_name}</td>
|
||||
<td>{$vo.title}</td>
|
||||
<td>{$vo.url}</td>
|
||||
<td>{$vo.content}</td>
|
||||
<td>{$vo.remark}</td>
|
||||
<td>{$vo.position}</td>
|
||||
<td>{$vo.create_time}</td>
|
||||
{if condition="$vo.status == 1"}
|
||||
<td class="td-status">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini">正常</span>
|
||||
</td>
|
||||
{else}
|
||||
<td class="td-status">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#ff5050;">锁定中</span>
|
||||
</td>
|
||||
{/if}
|
||||
<td class="td-manage">
|
||||
{if condition="$vo.status == 1"}
|
||||
<a onclick="member_stop(this,'{$vo.id}')" href="javascript:;" title="锁定">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini">锁定</span>
|
||||
</a>
|
||||
{else}
|
||||
<a onclick="member_stop(this,'{$vo.id}')" href="javascript:;" title="解锁">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini">解锁</span>
|
||||
</a>
|
||||
{/if}
|
||||
<a href="/memo/activity_edit?id={$vo.id}">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#009688;">修改</span>
|
||||
</a>
|
||||
<a onclick="member_del(this,'{$vo.id}')" href="javascript:;">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#ff5050;">删除</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{$memo_list->render()}
|
||||
</div>
|
||||
<script>
|
||||
// 代理列表和添加代理切换
|
||||
$('.x-nav .change_box a').click(function(){
|
||||
// 样式切换
|
||||
$('.x-nav .change_box a').removeClass('actived');
|
||||
$(this).addClass('actived');
|
||||
// 页面切换
|
||||
var id = $(this).attr('data-id');
|
||||
if(id == "1") location.href = '/memo/activity';
|
||||
if(id == "2") location.href = '/memo/activity_add';
|
||||
});
|
||||
// 时间选择器
|
||||
layui.use('laydate', function () {
|
||||
var laydate = layui.laydate;
|
||||
|
||||
// 开始时间
|
||||
laydate.render({
|
||||
elem: '#start',
|
||||
type: 'datetime'
|
||||
});
|
||||
|
||||
// 结束时间
|
||||
laydate.render({
|
||||
elem: '#end',
|
||||
type: 'datetime'
|
||||
});
|
||||
});
|
||||
|
||||
/*锁定/解锁*/
|
||||
function member_stop(obj, id) {
|
||||
layer.confirm('确认要' + $(obj).attr('title') + '吗?', function (index) {
|
||||
if ($(obj).attr('title') == '锁定') {
|
||||
// 拼装数据发送后台 锁定 会员
|
||||
var query = new Object;
|
||||
query.id = id;
|
||||
query.type = 2;
|
||||
query.status = 0;
|
||||
var result = ajax('/memo/change_status', query);
|
||||
} else {
|
||||
// 拼装数据发送后台 解锁 会员
|
||||
var query = new Object;
|
||||
query.id = id;
|
||||
query.type = 2;
|
||||
query.status = 1;
|
||||
var result = ajax('/memo/change_status', query);
|
||||
}
|
||||
|
||||
// 判断结果 弹出提示
|
||||
if (result.code == 1) {
|
||||
layer.msg(result.msg, {icon: 1, time: 1500});
|
||||
setInterval(function () {
|
||||
location.reload();
|
||||
}, 1500);
|
||||
} else {
|
||||
layer.msg(result.msg, {icon: 2, time: 1500});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/*用户-删除*/
|
||||
function member_del(obj, id) {
|
||||
layer.confirm('确认要删除吗?',function () {
|
||||
// 数据验证
|
||||
if(id <= 0){
|
||||
layer.msg('删除出错!');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 拼装数据
|
||||
var query = new Object;
|
||||
query.id = id;
|
||||
query.type = 2;
|
||||
|
||||
// 发送数据到后台删除会员
|
||||
var result = ajax('/memo/delete',query);
|
||||
if(result.code == 1){
|
||||
layer.msg(result.msg, {icon: 1, time: 1000},function(){
|
||||
location.reload();
|
||||
});
|
||||
}else if(result.code == 0){
|
||||
layer.msg(result.msg, {icon: 2, time: 1000});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装 AJAX 函数
|
||||
* @param url 目标地址
|
||||
* @param query 参数
|
||||
* @returns {string}
|
||||
*/
|
||||
function ajax(url, query) {
|
||||
var returnData = "";
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: query,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
returnData = data;
|
||||
}
|
||||
});
|
||||
return returnData;
|
||||
}
|
||||
$('#print').click(function(){
|
||||
var qs = getQueryString();
|
||||
var title = qs["title"];
|
||||
var status = qs["status"];
|
||||
if(title == undefined){
|
||||
title = '';
|
||||
}
|
||||
if(status == undefined){
|
||||
status = '';
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title:'活动列表打印',
|
||||
content: '/memo/activity_print?title='+title+'&status='+status,
|
||||
area: ['95%', '95%']
|
||||
});
|
||||
});
|
||||
function getQueryString() {
|
||||
var qs = location.search.substr(1), // 获取url中"?"符后的字串
|
||||
args = {}, // 保存参数数据的对象
|
||||
items = qs.length ? qs.split("&") : [], // 取得每一个参数项,
|
||||
item = null,
|
||||
len = items.length;
|
||||
|
||||
for(var i = 0; i < len; i++) {
|
||||
item = items[i].split("=");
|
||||
var name = decodeURIComponent(item[0]),
|
||||
value = decodeURIComponent(item[1]);
|
||||
if(name) {
|
||||
args[name] = value;
|
||||
}
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
$('#export').click(function(){
|
||||
var title = $('#title').val();
|
||||
var status = $('#status').val();
|
||||
layer.confirm('确定导出 excel 吗?',function(index){
|
||||
location.href = "/memo/activity?export=1&&title="+title+"&&status="+status;
|
||||
layer.close(index);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,180 @@
|
||||
{include file="public/header"}
|
||||
<style type="text/css">
|
||||
textarea, input[type="text"], input[type="password"],
|
||||
.uneditable-input{border: 1px solid #ccc;background-color: #fff;}
|
||||
textarea{padding:6px}
|
||||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||||
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
|
||||
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
|
||||
.x-nav{overflow: inherit; }
|
||||
.x-nav .refresh{margin-right: 20px; }
|
||||
.control-group{overflow: hidden; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dotted #dddddd; }
|
||||
.control-label{float: left; padding-top: 3px; width: 160px; text-align: right; font-size: 14px; }
|
||||
.controls{text-align: left; overflow-x: auto; overflow-y: hidden; margin-left: 180px; }
|
||||
.controls input{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls select{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls textarea{width: 400px; height: 90px; border-radius: 4px; } .form-horizontal{margin: 0 10px; }
|
||||
.bottom-buttom{border-top: 1px solid #e5e5e5; margin-top: 20px; background-color: #f5f5f5; padding: 30px 0; }
|
||||
.submit{width: 50px; text-align: center; background-color:#3daae9; color: #fff; padding: 5px 10px; font-size: 16px; border-radius: 4px; cursor:pointer; }
|
||||
</style>
|
||||
<body>
|
||||
<div class="x-nav" style="padding: 0px;">
|
||||
<span class="change_box">
|
||||
<a href="javascript:;" class="list-one" data-id="1">活动列表</a>
|
||||
<a href="javascript:;" class="list-two actived" data-id="2">活动添加</a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
|
||||
href="javascript:location.replace(location.href);" title="刷新">
|
||||
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="info_from form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label">请选择桌子:</label>
|
||||
<div class="controls">
|
||||
<select id="L_tablename" name="L_tablename" type="text" value maxlength="50" minlength="3" class="required">
|
||||
<option value="-1" selected>请选择桌子</option>
|
||||
<option value="all" >所有桌子</option>
|
||||
<option value="all_baccarat" >百家乐桌台</option>
|
||||
<option value="all_dt" >龙虎桌台</option>
|
||||
{foreach name="$table_list" item="vo"}
|
||||
<option value="{$vo.id}" <?php if(isset($get['table_id']) && $get['table_id'] == $vo['id']) {echo 'selected';} ?>>{$vo.table_name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">活动标题:</label>
|
||||
<div class="controls">
|
||||
<input id="L_title" name="L_title" type="text" value maxlength="50" minlength="3" class="required">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">链接地址:</label>
|
||||
<div class="controls">
|
||||
<input id="L_url" name="L_url" type="text" value maxlength="50" minlength="3" class="required">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">活动内容:</label>
|
||||
<div class="controls">
|
||||
<textarea id="L_content" name="L_content" type="text" value maxlength="50" minlength="3" class="required"></textarea>
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">备注信息:</label>
|
||||
<div class="controls">
|
||||
<textarea id="L_remark" name="L_remark" type="text" value maxlength="50" minlength="3" class="required"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">请选择活动位置:</label>
|
||||
<div class="controls">
|
||||
<select id="L_position" name="L_position" type="text" value maxlength="50" minlength="3" class="required">
|
||||
<option value="-1" selected>请选择活动位置</option>
|
||||
<option value="1">投注页面</option>
|
||||
<option value="2">现场页面</option>
|
||||
<option value="3">所有页面</option>
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-buttom">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<div class='submit'>保存</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// 代理列表和添加代理切换
|
||||
$('.x-nav .change_box a').click(function(){
|
||||
// 样式切换
|
||||
$('.x-nav .change_box a').removeClass('actived');
|
||||
$(this).addClass('actived');
|
||||
// 页面切换
|
||||
var id = $(this).attr('data-id');
|
||||
if(id == "1") location.href = '/memo/activity';
|
||||
if(id == "2") location.href = '/memo/activity_add';
|
||||
});
|
||||
|
||||
//监听提交
|
||||
$('.submit').click(function (data) {
|
||||
// 获取和拼装添加代理的数据
|
||||
var query = new Object();
|
||||
query.table_id = $('#L_tablename').val();
|
||||
query.title = $('#L_title').val();
|
||||
query.url = $('#L_url').val();
|
||||
query.content = $('#L_content').val();
|
||||
query.remark = $('#L_remark').val();
|
||||
query.position = $('#L_position').val();
|
||||
query.type = 2;
|
||||
|
||||
// 验证数据
|
||||
if(query.table_id == -1){
|
||||
layer.alert("请选择桌子!");
|
||||
return false;
|
||||
}
|
||||
if(query.title.length == 0){
|
||||
layer.alert("请填写活动标题!");
|
||||
return false;
|
||||
}
|
||||
if(query.url.length == 0){
|
||||
layer.alert("请填写活动链接!");
|
||||
return false;
|
||||
}
|
||||
if(query.content.length <= 0){
|
||||
layer.alert("请填写活动内容!");
|
||||
return false;
|
||||
}
|
||||
if(query.position == -1){
|
||||
layer.alert("请选择活动位置!");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 发送数据到后台添加会员
|
||||
var result = ajax('/memo/do_memo_add',query);
|
||||
if(result.code == 1){
|
||||
layer.alert(result.msg, {icon: 6}, function () {
|
||||
location.href = "/memo/activity";
|
||||
});
|
||||
}else{
|
||||
layer.alert(result.msg,{icon:2});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// AJAX函数封装
|
||||
function ajax(url,query){
|
||||
var returnData = 0;
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:query,
|
||||
type:'POST',
|
||||
dataType:'JSON',
|
||||
async:false,
|
||||
success:function(data){
|
||||
returnData = data;
|
||||
}
|
||||
});
|
||||
return returnData;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,134 @@
|
||||
{include file="public/header"}
|
||||
<style type="text/css">
|
||||
textarea, input[type="text"], input[type="password"],
|
||||
.uneditable-input{border: 1px solid #ccc;background-color: #fff;}
|
||||
textarea{padding:6px}
|
||||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||||
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
|
||||
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
|
||||
.x-nav{overflow: inherit; }
|
||||
.x-nav .refresh{margin-right: 20px; }
|
||||
.control-group{overflow: hidden; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dotted #dddddd; }
|
||||
.control-label{float: left; padding-top: 3px; width: 160px; text-align: right; font-size: 14px; }
|
||||
.controls{text-align: left; overflow-x: auto; overflow-y: hidden; margin-left: 180px; }
|
||||
.controls input{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls select{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls textarea{width: 400px; height: 90px; border-radius: 4px; } .form-horizontal{margin: 0 10px; }
|
||||
.bottom-buttom{border-top: 1px solid #e5e5e5; margin-top: 20px; background-color: #f5f5f5; padding: 30px 0; }
|
||||
.submit{width: 50px; text-align: center; background-color:#3daae9; color: #fff; padding: 5px 10px; font-size: 16px; border-radius: 4px; cursor:pointer; }
|
||||
</style>
|
||||
<body>
|
||||
<div class="x-nav" style="padding: 0px;">
|
||||
<span class="change_box">
|
||||
<a href="javascript:;" class="list-one" data-id="1">活动列表</a>
|
||||
<a href="javascript:;" class="list-two actived" data-id="2">活动修改</a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
|
||||
href="javascript:location.replace(location.href);" title="刷新">
|
||||
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="info_from form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label">活动标题:</label>
|
||||
<div class="controls">
|
||||
<input id="L_title" name="L_title" type="text" value="{$memo.title}" maxlength="50" minlength="3" class="required">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">链接地址:</label>
|
||||
<div class="controls">
|
||||
<input id="L_url" name="L_url" type="text" value="{$memo.url}" maxlength="50" minlength="3" class="required">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">活动内容:</label>
|
||||
<div class="controls">
|
||||
<textarea id="L_content" name="L_content" type="text" value maxlength="50" minlength="3" class="required">{$memo.content}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">备注信息:</label>
|
||||
<div class="controls">
|
||||
<textarea id="L_remark" name="L_remark" type="text" value maxlength="50" minlength="3" class="required">{$memo.remark}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-buttom">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<div class='submit'>保存</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 隐藏参数 -->
|
||||
<input type="hidden" id="memo_id" value="{$memo.id}">
|
||||
<script>
|
||||
// 代理列表和添加代理切换
|
||||
$('.x-nav .change_box a').click(function(){
|
||||
// 样式切换
|
||||
$('.x-nav .change_box a').removeClass('actived');
|
||||
$(this).addClass('actived');
|
||||
// 页面切换
|
||||
var id = $(this).attr('data-id');
|
||||
if(id == "1") location.href = '/memo/activity';
|
||||
if(id == "2") location.href = '/memo/activity_edit';
|
||||
});
|
||||
|
||||
//监听提交
|
||||
$('.submit').click(function (data) {
|
||||
// 获取和拼装添加代理的数据
|
||||
var query = new Object();
|
||||
query.id = $('#memo_id').val();
|
||||
query.title = $('#L_title').val();
|
||||
query.url = $('#L_url').val();
|
||||
query.content = $('#L_content').val();
|
||||
query.remark = $('#L_remark').val();
|
||||
query.type = 2;
|
||||
|
||||
// 验证数据
|
||||
if(query.title.length == 0){
|
||||
layer.alert("请填写活动标题!");
|
||||
return false;
|
||||
}
|
||||
if(query.content.length <= 0){
|
||||
layer.alert("请填写活动内容!");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 发送数据到后台添加会员
|
||||
var result = ajax('/memo/do_memo_edit',query);
|
||||
if(result.code == 1){
|
||||
layer.alert(result.msg, {icon: 6}, function () {
|
||||
location.href = "/memo/activity";
|
||||
});
|
||||
}else{
|
||||
layer.alert(result.msg,{icon:2});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// AJAX函数封装
|
||||
function ajax(url,query){
|
||||
var returnData = 0;
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:query,
|
||||
type:'POST',
|
||||
dataType:'JSON',
|
||||
async:false,
|
||||
success:function(data){
|
||||
returnData = data;
|
||||
}
|
||||
});
|
||||
return returnData;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
{include file="public/header"}
|
||||
<body>
|
||||
<div class="x-body">
|
||||
<div class="layui-btn no-print" onclick="jQuery('html').print()">打印</div>
|
||||
<table class="layui-table">
|
||||
<div style="text-align: center;font-size: 18px;font-weight:bold;">活动列表</div>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center;">桌子名称</th>
|
||||
<th style="text-align: center;">标题</th>
|
||||
<th style="text-align: center;">url链接</th>
|
||||
<th style="text-align: center;">内容</th>
|
||||
<th style="text-align: center;">备注</th>
|
||||
<th style="text-align: center;">显示位置</th>
|
||||
<th style="text-align: center;">创建时间</th>
|
||||
<th style="text-align: center;">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach name="memo_list" item="vo"}
|
||||
<tr>
|
||||
<td>{$vo.table_name}</td>
|
||||
<td>{$vo.title}</td>
|
||||
<td>{$vo.url}</td>
|
||||
<td>{$vo.content}</td>
|
||||
<td>{$vo.position}</td>
|
||||
<td>{$vo.remark}</td>
|
||||
<td>{$vo.create_time}</td>
|
||||
{if condition="$vo.status == 1"}
|
||||
<td>正常</span>
|
||||
</td>
|
||||
{else}
|
||||
<td>锁定中</span>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,267 @@
|
||||
{include file="public/header"}
|
||||
<style>
|
||||
.x-body .layui-row{ margin-top:-10px; line-height:25px; background:#f5f5f5; border-radius:10px; }
|
||||
.x-body .layui-row .xblock button{ margin-top:-20px; }
|
||||
.x-body .layui-form{ margin-top:15px; margin-bottom:10px; }
|
||||
.x-body .layui-form .layui-input-block{ display:inline-block; width:150px; margin-left:0; }
|
||||
.x-body .layui-form .layui-form-item{ display:inline-block; margin-left:0; }
|
||||
.x-body .layui-form .layui-form-item .layui-form-label{ width:48px; }
|
||||
.x-body .layui-form .layui-form-item .layui-input-block{ margin-left:-10px; width:100px; }
|
||||
.x-body .layui-form .layui-form-item .layui-input-block .layui-form-radio i{ margin-right:4px; }
|
||||
.x-body .layui-form .layui-form-item .layui-form-radio{ margin-top:6px; margin-right:-8px; }
|
||||
.layui-input-block dl{ text-align:left; }
|
||||
.x-so{ margin:0; }
|
||||
.x-so input.layui-input{ width:150px; }
|
||||
.x-nav{overflow: inherit; } .x-nav .refresh{margin-right: 20px; }
|
||||
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
|
||||
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
|
||||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="x-nav" style="padding: 0px;">
|
||||
<span class="change_box">
|
||||
<a href="javascript:;" class="list-one actived" data-id="1">公告列表</a>
|
||||
<a href="javascript:;" class="list-two" data-id="2">公告添加</a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
|
||||
href="javascript:location.replace(location.href);" title="刷新">
|
||||
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="x-body">
|
||||
<!--
|
||||
<div class="layui-row">
|
||||
<form class="layui-form layui-col-md12 x-so float-left" action="/memo/memo" method="get">
|
||||
<input type="text" name="title" id="title" placeholder="标题" autocomplete="off" class="layui-input" value="<?php if(isset($get['title'])) {echo $get['title'];} ?>">
|
||||
<div class="layui-input-block" >
|
||||
<select name="status" id="status">
|
||||
<option value="-1" selected>请选择状态</option>
|
||||
<option value="1" <?php if(isset($get['status']) && $get['status'] == 1) {echo 'selected';} ?>>正常</option>
|
||||
<option value="2" <?php if(isset($get['status']) && $get['status'] == 2) {echo 'selected';} ?>>锁定</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon"></i></button>
|
||||
<span class="layui-btn" id="export">导出excel</span>
|
||||
<span class="layui-btn" id="print">打印</span>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th>桌子名称</th>-->
|
||||
<th>标题</th>
|
||||
<!--
|
||||
<th>url链接</th>
|
||||
<th>内容</th>
|
||||
<th>备注</th>
|
||||
<th>显示位置</th>
|
||||
-->
|
||||
<th>创建时间</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach name="memo_list" item="vo"}
|
||||
<tr>
|
||||
<!--
|
||||
<td>{$vo.table_name}</td>
|
||||
-->
|
||||
<td>{$vo.title}</td>
|
||||
<!--
|
||||
<td>{$vo.url}</td>
|
||||
<td>{$vo.content}</td>
|
||||
<td>{$vo.remark}</td>
|
||||
<td>{$vo.position}</td>
|
||||
-->
|
||||
<td>{$vo.create_time}</td>
|
||||
{if condition="$vo.status == 1"}
|
||||
<td class="td-status">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini">正常</span>
|
||||
</td>
|
||||
{else}
|
||||
<td class="td-status">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#ff5050;">锁定中</span>
|
||||
</td>
|
||||
{/if}
|
||||
<td class="td-manage">
|
||||
<!--
|
||||
{if condition="$vo.status == 1"}
|
||||
<a onclick="member_stop(this,'{$vo.id}')" href="javascript:;" title="锁定">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini">锁定</span>
|
||||
</a>
|
||||
{else}
|
||||
<a onclick="member_stop(this,'{$vo.id}')" href="javascript:;" title="解锁">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini">解锁</span>
|
||||
</a>
|
||||
{/if}
|
||||
-->
|
||||
<a href="/memo/memo_edit?id={$vo.id}">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#009688;">修改</span>
|
||||
</a>
|
||||
<a onclick="member_del(this,'{$vo.id}')" href="javascript:;">
|
||||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#ff5050;">删除</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{$memo_list->render()}
|
||||
</div>
|
||||
<script>
|
||||
// 代理列表和添加代理切换
|
||||
$('.x-nav .change_box a').click(function(){
|
||||
// 样式切换
|
||||
$('.x-nav .change_box a').removeClass('actived');
|
||||
$(this).addClass('actived');
|
||||
// 页面切换
|
||||
var id = $(this).attr('data-id');
|
||||
if(id == "1") location.href = '/memo/memo';
|
||||
if(id == "2") location.href = '/memo/memo_add';
|
||||
});
|
||||
// 时间选择器
|
||||
layui.use('laydate', function () {
|
||||
var laydate = layui.laydate;
|
||||
|
||||
// 开始时间
|
||||
laydate.render({
|
||||
elem: '#start',
|
||||
type: 'datetime'
|
||||
});
|
||||
|
||||
// 结束时间
|
||||
laydate.render({
|
||||
elem: '#end',
|
||||
type: 'datetime'
|
||||
});
|
||||
});
|
||||
|
||||
/*锁定/解锁*/
|
||||
function member_stop(obj, id) {
|
||||
layer.confirm('确认要' + $(obj).attr('title') + '吗?', function (index) {
|
||||
if ($(obj).attr('title') == '锁定') {
|
||||
// 拼装数据发送后台 锁定 会员
|
||||
var query = new Object;
|
||||
query.id = id;
|
||||
query.type = 1;
|
||||
query.status = 0;
|
||||
var result = ajax('/memo/change_status', query);
|
||||
} else {
|
||||
// 拼装数据发送后台 解锁 会员
|
||||
var query = new Object;
|
||||
query.id = id;
|
||||
query.type = 1;
|
||||
query.status = 1;
|
||||
var result = ajax('/memo/change_status', query);
|
||||
}
|
||||
|
||||
// 判断结果 弹出提示
|
||||
if (result.code == 1) {
|
||||
layer.msg(result.msg, {icon: 1, time: 1500});
|
||||
setInterval(function () {
|
||||
location.reload();
|
||||
}, 1500);
|
||||
} else {
|
||||
layer.msg(result.msg, {icon: 2, time: 1500});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/*用户-删除*/
|
||||
function member_del(obj, id) {
|
||||
layer.confirm('确认要删除吗?',function () {
|
||||
// 数据验证
|
||||
if(id <= 0){
|
||||
layer.msg('删除用户出错!');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 拼装数据
|
||||
var query = new Object;
|
||||
query.id = id;
|
||||
query.type = 1;
|
||||
|
||||
// 发送数据到后台删除会员
|
||||
var result = ajax('/memo/delete',query);
|
||||
if(result.code == 1){
|
||||
layer.msg(result.msg, {icon: 1, time: 1000},function(){
|
||||
location.reload();
|
||||
});
|
||||
}else if(result.code == 0){
|
||||
layer.msg(result.msg, {icon: 2, time: 1000});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装 AJAX 函数
|
||||
* @param url 目标地址
|
||||
* @param query 参数
|
||||
* @returns {string}
|
||||
*/
|
||||
function ajax(url, query) {
|
||||
var returnData = "";
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: query,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
returnData = data;
|
||||
}
|
||||
});
|
||||
return returnData;
|
||||
}
|
||||
$('#print').click(function(){
|
||||
var qs = getQueryString();
|
||||
var title = qs["title"];
|
||||
var status = qs["status"];
|
||||
if(title == undefined){
|
||||
title = '';
|
||||
}
|
||||
if(status == undefined){
|
||||
status = '';
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
title:'公告列表打印',
|
||||
content: '/memo/memo_print?title='+title+'&status='+status,
|
||||
area: ['95%', '95%']
|
||||
});
|
||||
});
|
||||
function getQueryString() {
|
||||
var qs = location.search.substr(1), // 获取url中"?"符后的字串
|
||||
args = {}, // 保存参数数据的对象
|
||||
items = qs.length ? qs.split("&") : [], // 取得每一个参数项,
|
||||
item = null,
|
||||
len = items.length;
|
||||
|
||||
for(var i = 0; i < len; i++) {
|
||||
item = items[i].split("=");
|
||||
var name = decodeURIComponent(item[0]),
|
||||
value = decodeURIComponent(item[1]);
|
||||
if(name) {
|
||||
args[name] = value;
|
||||
}
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
$('#export').click(function(){
|
||||
var title = $('#title').val();
|
||||
var status = $('#status').val();
|
||||
layer.confirm('确定导出 excel 吗?',function(index){
|
||||
location.href = "/memo/memo?export=1&&title="+title+"&&status="+status;
|
||||
layer.close(index);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,188 @@
|
||||
{include file="public/header"}
|
||||
<style type="text/css">
|
||||
textarea, input[type="text"], input[type="password"],
|
||||
.uneditable-input{border: 1px solid #ccc;background-color: #fff;}
|
||||
textarea{padding:6px}
|
||||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||||
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
|
||||
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
|
||||
.x-nav{overflow: inherit; }
|
||||
.x-nav .refresh{margin-right: 20px; }
|
||||
.control-group{overflow: hidden; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dotted #dddddd; }
|
||||
.control-label{float: left; padding-top: 3px; width: 160px; text-align: right; font-size: 14px; }
|
||||
.controls{text-align: left; overflow-x: auto; overflow-y: hidden; margin-left: 180px; }
|
||||
.controls input{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls select{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls textarea{width: 400px; height: 90px; border-radius: 4px; } .form-horizontal{margin: 0 10px; }
|
||||
.bottom-buttom{border-top: 1px solid #e5e5e5; margin-top: 20px; background-color: #f5f5f5; padding: 30px 0; }
|
||||
.submit{width: 50px; text-align: center; background-color:#3daae9; color: #fff; padding: 5px 10px; font-size: 16px; border-radius: 4px; cursor:pointer; }
|
||||
</style>
|
||||
<body>
|
||||
<div class="x-nav" style="padding: 0px;">
|
||||
<span class="change_box">
|
||||
<a href="javascript:;" class="list-one" data-id="1">公告列表</a>
|
||||
<a href="javascript:;" class="list-two actived" data-id="2">公告添加</a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
|
||||
href="javascript:location.replace(location.href);" title="刷新">
|
||||
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="info_from form-horizontal">
|
||||
<!--
|
||||
<div class="control-group">
|
||||
<label class="control-label">请选择桌子:</label>
|
||||
<div class="controls">
|
||||
<select id="L_tablename" name="L_tablename" type="text" class="required">
|
||||
<option value="0" selected>请选择桌子</option>
|
||||
<option value="all" >所有桌子</option>
|
||||
<option value="all_baccarat" >百家乐桌台</option>
|
||||
<option value="all_dt" >龙虎桌台</option>
|
||||
<option value="all" >所有桌子</option>
|
||||
{foreach name="$table_list" item="vo"}
|
||||
<option value="{$vo.id}" <?php if(isset($get['table_id']) && $get['table_id'] == $vo['id']) {echo 'selected';} ?>>{$vo.table_name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="control-group">
|
||||
<label class="control-label">公告标题:</label>
|
||||
<div class="controls">
|
||||
<input id="L_title" name="L_title" type="text" value maxlength="255" class="required" style="width:500px;">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="control-group">
|
||||
<label class="control-label">链接地址:</label>
|
||||
<div class="controls">
|
||||
<input id="L_url" name="L_url" type="text" value maxlength="250" class="required">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">公告内容:</label>
|
||||
<div class="controls">
|
||||
<textarea id="L_content" name="L_content" type="text" value maxlength="250" class="required"></textarea>
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">备注信息:</label>
|
||||
<div class="controls">
|
||||
<textarea id="L_remark" name="L_remark" type="text" value maxlength="250" class="required"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">请选择公告位置:</label>
|
||||
<div class="controls">
|
||||
<select id="L_position" name="L_position" type="text" class="required">
|
||||
<option value="-1" selected>请选择公告位置</option>
|
||||
<option value="1">投注页面</option>
|
||||
<option value="2">现场页面</option>
|
||||
<option value="3">所有页面</option>
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="bottom-buttom">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<div class='submit'>保存</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// 代理列表和添加代理切换
|
||||
$('.x-nav .change_box a').click(function(){
|
||||
// 样式切换
|
||||
$('.x-nav .change_box a').removeClass('actived');
|
||||
$(this).addClass('actived');
|
||||
// 页面切换
|
||||
var id = $(this).attr('data-id');
|
||||
if(id == "1") location.href = '/memo/memo';
|
||||
if(id == "2") location.href = '/memo/memo_add';
|
||||
});
|
||||
|
||||
//监听提交
|
||||
$('.submit').click(function (data) {
|
||||
// 获取和拼装添加代理的数据
|
||||
var query = new Object();
|
||||
query.title = $('#L_title').val();
|
||||
/*
|
||||
query.table_id = $('#L_tablename').val();
|
||||
query.url = $('#L_url').val();
|
||||
query.content = $('#L_content').val();
|
||||
query.remark = $('#L_remark').val();
|
||||
query.position = $('#L_position').val();
|
||||
*/
|
||||
query.type = 1;
|
||||
if(query.title.length == 0){
|
||||
layer.alert("请填写标题!");
|
||||
return false;
|
||||
}
|
||||
// 验证数据
|
||||
/*
|
||||
if(query.table_id == -1){
|
||||
layer.alert("请选择桌子!");
|
||||
return false;
|
||||
}
|
||||
if(query.url.length == 0){
|
||||
layer.alert("请填写公告链接!");
|
||||
return false;
|
||||
}
|
||||
if(query.content.length == 0){
|
||||
layer.alert("请填写内容!");
|
||||
return false;
|
||||
}
|
||||
if(query.position == -1){
|
||||
layer.alert("请选择公告位置!");
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
// 发送数据到后台添加会员
|
||||
var result = ajax('/memo/do_memo_add',query);
|
||||
if(result.code == 1){
|
||||
layer.alert(result.msg, {icon: 6}, function () {
|
||||
location.href = "/memo/memo";
|
||||
});
|
||||
}else{
|
||||
layer.alert(result.msg,{icon:2});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// AJAX函数封装
|
||||
function ajax(url,query){
|
||||
var returnData = 0;
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:query,
|
||||
type:'POST',
|
||||
dataType:'JSON',
|
||||
async:false,
|
||||
success:function(data){
|
||||
returnData = data;
|
||||
}
|
||||
});
|
||||
return returnData;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,177 @@
|
||||
{include file="public/header"}
|
||||
<style type="text/css">
|
||||
textarea, input[type="text"], input[type="password"],
|
||||
.uneditable-input{border: 1px solid #ccc;background-color: #fff;}
|
||||
textarea{padding:6px}
|
||||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||||
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
|
||||
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
|
||||
.x-nav{overflow: inherit; }
|
||||
.x-nav .refresh{margin-right: 20px; }
|
||||
.control-group{overflow: hidden; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dotted #dddddd; }
|
||||
.control-label{float: left; padding-top: 3px; width: 160px; text-align: right; font-size: 14px; }
|
||||
.controls{text-align: left; overflow-x: auto; overflow-y: hidden; margin-left: 180px; }
|
||||
.controls input{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls select{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
|
||||
.controls textarea{width: 400px; height: 90px; border-radius: 4px; } .form-horizontal{margin: 0 10px; }
|
||||
.bottom-buttom{border-top: 1px solid #e5e5e5; margin-top: 20px; background-color: #f5f5f5; padding: 30px 0; }
|
||||
.submit{width: 50px; text-align: center; background-color:#3daae9; color: #fff; padding: 5px 10px; font-size: 16px; border-radius: 4px; cursor:pointer; }
|
||||
</style>
|
||||
<body>
|
||||
<div class="x-nav" style="padding: 0px;">
|
||||
<span class="change_box">
|
||||
<a href="javascript:;" class="list-one" data-id="1">公告列表</a>
|
||||
<a href="javascript:;" class="list-two actived" data-id="2">公告修改</a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
|
||||
href="javascript:location.replace(location.href);" title="刷新">
|
||||
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="info_from form-horizontal">
|
||||
<!--
|
||||
<div class="control-group">
|
||||
<label class="control-label">请选择桌子:</label>
|
||||
<div class="controls">
|
||||
<select id="L_tablename" name="L_tablename" type="text" class="required" disabled>
|
||||
<option value="{$table.id}" selected>{$table.table_name}</option>
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="control-group">
|
||||
<label class="control-label">公告标题:</label>
|
||||
<div class="controls">
|
||||
<input id="L_title" name="L_title" type="text" value="{$memo.title}" maxlength="250" class="required" style="width:500px;">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="control-group">
|
||||
<label class="control-label">链接地址:</label>
|
||||
<div class="controls">
|
||||
<input id="L_url" name="L_url" type="text" value="{$memo.url}" maxlength="250" class="required">
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">公告内容:</label>
|
||||
<div class="controls">
|
||||
<textarea id="L_content" name="L_content" type="text" value maxlength="250" class="required">{$memo.content}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">备注信息:</label>
|
||||
<div class="controls">
|
||||
<textarea id="L_remark" name="L_remark" type="text" value maxlength="250" class="required">{$memo.remark}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">请选择公告位置:</label>
|
||||
<div class="controls">
|
||||
<select id="L_position" name="L_position" type="text" class="required">
|
||||
<option value="-1" selected>请选择公告位置</option>
|
||||
<option value="1" <?php if($memo['position'] == 1) echo 'selected="selected"'; ?>>投注页面</option>
|
||||
<option value="2" <?php if($memo['position'] == 2) echo 'selected="selected"'; ?>>现场页面</option>
|
||||
<option value="3" <?php if($memo['position'] == 3) echo 'selected="selected"'; ?>>所有页面</option>
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<font color="red"> * </font>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="bottom-buttom">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<div class='submit'>保存</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 隐藏参数 -->
|
||||
<input type="hidden" id="memo_id" value="{$memo.id}">
|
||||
<script>
|
||||
// 代理列表和添加代理切换
|
||||
$('.x-nav .change_box a').click(function(){
|
||||
// 样式切换
|
||||
$('.x-nav .change_box a').removeClass('actived');
|
||||
$(this).addClass('actived');
|
||||
// 页面切换
|
||||
var id = $(this).attr('data-id');
|
||||
if(id == "1") location.href = '/memo/memo';
|
||||
if(id == "2") location.href = '/memo/memo_edit';
|
||||
});
|
||||
|
||||
//监听提交
|
||||
$('.submit').click(function (data) {
|
||||
// 获取和拼装添加代理的数据
|
||||
var query = new Object();
|
||||
query.id = $('#memo_id').val();
|
||||
query.title = $('#L_title').val();
|
||||
/*
|
||||
query.url = $('#L_url').val();
|
||||
query.content = $('#L_content').val();
|
||||
query.remark = $('#L_remark').val();
|
||||
query.position = $('#L_position').val();
|
||||
*/
|
||||
query.type = 1;
|
||||
|
||||
// 验证数据
|
||||
if(query.title.length == 0){
|
||||
layer.alert("请填写标题!");
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
if(query.url.length <= 0){
|
||||
layer.alert("请填写链接地址!");
|
||||
return false;
|
||||
}
|
||||
if(query.content.length <= 0){
|
||||
layer.alert("请填写内容!");
|
||||
return false;
|
||||
}
|
||||
if(query.position == -1){
|
||||
layer.alert("请选择公告位置!");
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// 发送数据到后台添加会员
|
||||
var result = ajax('/memo/do_memo_edit',query);
|
||||
if(result.code == 1){
|
||||
layer.alert(result.msg, {icon: 6}, function () {
|
||||
location.href = "/memo/memo";
|
||||
});
|
||||
}else{
|
||||
layer.alert(result.msg,{icon:2});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// AJAX函数封装
|
||||
function ajax(url,query){
|
||||
var returnData = 0;
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:query,
|
||||
type:'POST',
|
||||
dataType:'JSON',
|
||||
async:false,
|
||||
success:function(data){
|
||||
returnData = data;
|
||||
}
|
||||
});
|
||||
return returnData;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
{include file="public/header"}
|
||||
<body>
|
||||
<div class="x-body">
|
||||
<div class="layui-btn no-print" onclick="jQuery('html').print()">打印</div>
|
||||
<table class="layui-table">
|
||||
<div style="text-align: center;font-size: 18px;font-weight:bold;">公告列表</div>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center;">桌子名称</th>
|
||||
<th style="text-align: center;">标题</th>
|
||||
<th style="text-align: center;">url链接</th>
|
||||
<th style="text-align: center;">内容</th>
|
||||
<th style="text-align: center;">备注</th>
|
||||
<th style="text-align: center;">显示位置</th>
|
||||
<th style="text-align: center;">创建时间</th>
|
||||
<th style="text-align: center;">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach name="memo_list" item="vo"}
|
||||
<tr>
|
||||
<td>{$vo.table_name}</td>
|
||||
<td>{$vo.title}</td>
|
||||
<td>{$vo.url}</td>
|
||||
<td>{$vo.content}</td>
|
||||
<td>{$vo.position}</td>
|
||||
<td>{$vo.remark}</td>
|
||||
<td>{$vo.create_time}</td>
|
||||
{if condition="$vo.status == 1"}
|
||||
<td>正常</span>
|
||||
</td>
|
||||
{else}
|
||||
<td>锁定中</span>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user