-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebsite_info.php
214 lines (140 loc) · 5.93 KB
/
website_info.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?php
include 'php/identify.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>website_info</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/xadmin.css">
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="x-nav">
<span class="layui-breadcrumb">
<a target="_parent" href="index.php">首页</a>
<a href="website_info.php">内容管理</a>
<a>
<cite>网站信息</cite></a>
</span>
<a class="layui-btn layui-btn-small" 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>
<div class="x-body">
<div class="layui-inline" >
<table class="layui-hide" id="LAY_table_user" lay-filter="useruv"></table>
</div>
<script type="text/html" id="switchTpl">
<?php include_once "php/website/website_checkbox.php";?>
</script>
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-xs " onclick="" lay-event="edit"><i class="layui-icon"></i>编辑</a>
</script>
<script src="./lib/layui/layui.js"></script>
<script>
layui.use('table', function(){
var table = layui.table,form = layui.form;
//方法级渲染
table.render({
elem: '#LAY_table_user'
,url: 'php/website/website_query.php'
,cols: [[
{field:'id', title: '网站ID', sort: true, fixed: false,width:100}
,{field:'website', title: '网站名称', sort: false, fixed: false,width:130}
,{field:'tel', title: '联系电话', sort: false, fixed: false,width:130}
,{field:'email', title: '电子邮箱', sort: false, fixed: false,width:130}
,{field:'address', title: '地址', sort: false, fixed: false}
,{field:'copyright', title: '版权声明', sort: false, fixed: false}
,{field:'mitbeian', title: '备案号', sort: false, fixed: false,width:200}
,{field:'joinSum', title: '加盟人数', sort: false, fixed: false,width:130}
,{field:'switchStatus', title:'53客服状态', width:85, templet: '#switchTpl', unresize: true,width:120}
,{field:'right', title: '操作', width:178,align:'center',toolbar:"#barDemo", fixed: 'right',width:100}
]]
,id: 'testReload'
,page: false
//,height: 600
});
//监听显示状态
form.on('switch(showCheckbox)', function(obj){
$.ajax({
url: "php/website/website_checkbox_finish.php",
type: "get",
data:{"id":this.value,"switchStatus":obj.elem.checked},
dataType: "text",
});
});
//监听工具条
table.on('tool(useruv)', function(obj){
var data = obj.data;
if(obj.event === 'edit'){
var c='php/product/product_edit.php?product_id='+data.product_id;
x_admin_show('文本编辑',c,850,450);
} else if(obj.event === 'del'){
layer.confirm('确定删除这条产品信息?', function(index){
console.log(data);
obj.del();
layer.close(index);
$.ajax({
url: "php/product/product_delete.php",
type: "post",
data:{"product_id":data.product_id},
dataType: "text",
});
});
} else if(obj.event === 'img'){
var c='php/product/product_img_edit.php?product_id='+data.product_id;
x_admin_show('产品图片编辑',c,850,500);
}
});
$('.demoTable .layui-btn').on('click', function(){
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
function EidtUv(data,value,index,obj) {
$.ajax({
url: "UVServlet",
type: "POST",
data:{"uvid":data.id,"memthodname":"edituv","aid":data.aid,"uv":value},
dataType: "json",
success: function(data){
if(data.state==1){
layer.close(index);
//同步更新表格和缓存对应的值
obj.update({
uv: value
});
layer.msg("修改成功", {icon: 6});
}else{
layer.msg("修改失败", {icon: 5});
}
}
});
}
});
layui.use('laydate', function(){
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#search_startdate' //指定元素
});
//执行一个laydate实例
laydate.render({
elem: '#search_enddate' //指定元素
});
});
</script>
</form>
</body>
</html>