-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathout.php
382 lines (344 loc) · 11.3 KB
/
out.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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<?php
@session_start();
if(!isset($_SESSION['username'])){
if(!isset($_COOKIE['username']))
{
header("Location:login.html");
exit();
}
} //this is a test
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title></title>
<link rel="stylesheet" href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://a.alipayobjects.com/arale/calendar/1.0.0/calendar.css">
<link charset="utf-8" rel="stylesheet" href="https://a.alipayobjects.com/arale/dialog/1.2.6/dialog.css" />
<script type="text/javascript" src="https://a.alipayobjects.com/seajs/seajs/2.2.0/sea.js"></script>
<script type="text/javascript" src="https://a.alipayobjects.com/seajs/seajs-style/1.0.2/seajs-style.js"></script>
<!--
<script type="text/javascript" src="http://www.jiese360.com/js/hammer.js"></script>
-->
<style type="text/css">
.input-group{margin:5px 0;}
#search-box{ background:url(http://code.jquery.com/mobile/1.0a3/images/icon-search-black.png) 12px 8px no-repeat; padding-left: 38px; margin-bottom: 10px; }
.evilCode span{ display:block; word-break: break-word;}
.name span{ display:block; word-break: break-word;}
.hasTime span{ display:block; }
.hasTime input{ width:50px; }
.isShowOrNot{ display:block; }
.pojieTime{ position: relative; }
.pojieBt{ position: absolute; bottom:10px; left:5px; }
.evilName,.name{ position: relative;}
.evilName .isShowOrNot,.name .sex{ position: absolute; right:2px; top:2px; }
.evilCode .modwx{ width:100px; }
.name .modwx{ width:100px; }
.hasDec{ color:red; }
.rel{ position: relative;}
.pos{ position: absolute; bottom:10px; }
</style>
</head>
<body>
<h1><a href="add.php">添加</a></h1>
<input type="text" class="form-control" placeholder="Text input" id="search-box">
<table class="table table-bordered">
<thead>
<tr>
<td style="width:220px">操作</td>
<td style="width:120px">录入时间</td>
<td style="width:120px">股票代码</td>
<td style="width:180px">股票名称</td>
<td style="">劣迹事件详细</td>
<td style="">事件后续影响</td>
<td style="width:200px">公关处理</td>
</tr>
</thead>
<tbody id="view-list">
<?php
require_once("easyCRUD/easyCRUD.class.php");
require_once("Db.class.php");
$db = new Db();
$result = $db->query("SELECT * FROM evil ORDER BY luruTime desc");
foreach ($result as $key => $rs) {
if($rs['evilType']=='1'){
$evilType="公司经营问题";
}else if($rs['evilType']=='2'){
$evilType="高管劣迹问题";
}else if($rs['evilType']=='3'){
$evilType="公司产品问题";
}else if($rs['evilType']=='4'){
$evilType="行业市场不景气";
}else if($rs['evilType']=='x'){
$evilType="以上都有";
}else{
$evilType=$rs['evilType'];
}
?>
<tr>
<td>
<a data-id='<?=$rs['id']?>' href="edit.php?id=<?=$rs['id']?>" target="_blank">修改</a>
<span style="cursor:pointer" data-id='<?=$rs['id']?>' class="deleteId">删除</span>
<a href="userDetailAdd.php?id=<?=$rs['id']?>" class="<?=$hasDec ?>" target="_blank">详细资料添加</a>
</td>
<td class="luruTime">
<?=$rs['luruTime']?><br />
<?=$evilType ?>
</td>
<td class="evilCode">
<span><?=$rs['evilCode']?></span>
<input type="text" class="modwx" modid="<?=$rs['id']?>" />
<button class="cgId">提交</button>
</td><!--股票代码-->
<td class="evilName">
<span><?=$rs['evilName']?></span>
<input type="text" class="modwx" modid="<?=$rs['id']?>" />
<button class="cgId3">提交</button>
</td><!--股票名称-->
<td class="evilDetail rel">
<span><?=$rs['evilTime']?> <span class="cont"><?=$rs['evilDetail']?></span></span>
<div><a href="http://www.szse.cn/UpFiles/cfwj/<?=$rs['evilDisposeBook']?>" target="_blank"><?=$rs['evilDisposeBook']?></a></div>
<div class="pos">
<input type="text" class="modwx" modid="<?=$rs['id']?>" />
<button class="cgId2">提交</button>
</div>
</td><!--事件影响-->
<td class="evilEffect rel">
<span><?=$rs['evilEffect']?></span>
<div class="pos">
<input type="text" class="modwx" modid="<?=$rs['id']?>" />
<button class="cgId4">提交</button>
</div>
</td><!--危机处理-->
<td class="evilHandle rel">
<span><?=$rs['evilHandle']?></span>
<div class="pos">
<input type="text" class="modwx" modid="<?=$rs['id']?>" />
<button class="cgId5">提交</button>
</div>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<span style="position: absolute; top:0px; right:0px; ">
<?php
echo "共".count($result)."条处罚记录";
?>
</span>
<span style="position: absolute; top:0px; right:0px; ">
</span>
<div class="input-append">
<input type="text" class="span2 search-query">
<button type="submit" class="btn">Search</button>
</div>
<script type="text/javascript">
var browser={
versions:function(){
var u = navigator.userAgent, app = navigator.appVersion;
return { //移动终端浏览器版本信息
trident: u.indexOf('Trident') > -1, //IE内核
presto: u.indexOf('Presto') > -1, //opera内核
webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
iPad: u.indexOf('iPad') > -1, //是否iPad
webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
};
}(),
language:(navigator.browserLanguage || navigator.language).toLowerCase()
};
seajs.config({
alias: {
$: 'https://a.alipayobjects.com/jquery/jquery/1.9.1/jquery.js'
}
});
seajs.use(['$','https://a.alipayobjects.com/arale/dialog/1.2.6/confirmbox.js'], function($,ConfirmBox) {
var parentEle=$('#view-list');
var elems=parentEle.find(".expires");
parentEle.append(elems);
/*更改投资品种代码*/
$('.cgId').click(function(){
var elem=$(this).prev();
if(!elem.val()){
alert("不能为空");
return;
}
$.post("evilCodeChange.php",{
id:elem.attr('modid'),
evilCode:elem.val()
},function(data){
var data=eval('('+data+')');
if(data.state=='sucess'){
elem.prev().html(data.evilCode);
}
})
})
/*更改evil事件详细*/
$('.cgId2').click(function(){
var elem=$(this).prev();
if(!elem.val()){
alert("不能为空");
return;
}
$.post("evilDetailChange.php",{
id:elem.attr('modid'),
evilDetail:elem.val()
},function(data){
var data=eval('('+data+')');
if(data.state=='sucess'){
elem.parent().prev().find('.cont').html(data.evilDetail);
}
})
})
/*更改投资品种名称*/
$('.cgId3').click(function(){
var elem=$(this).prev();
if(!elem.val()){
alert("不能为空");
return;
}
$.post("evilNameChange.php",{
id:elem.attr('modid'),
evilName:elem.val()
},function(data){
var data=eval('('+data+')');
if(data.state=='sucess'){
elem.prev().html(data.evilName);
}
})
})
/*事件后续影响*/
$('.cgId4').click(function(){
var elem=$(this).prev();
if(!elem.val()){
alert("不能为空");
return;
}
$.post("evilEffectChange.php",{
id:elem.attr('modid'),
evilEffect:elem.val()
},function(data){
var data=eval('('+data+')');
if(data.state=='sucess'){
elem.parent().prev().html(data.evilEffect);
}
})
})
/*公关处理*/
$('.cgId5').click(function(){
var elem=$(this).prev();
if(!elem.val()){
alert("不能为空");
return;
}
$.post("evilHandleChange.php",{
id:elem.attr('modid'),
evilHandle:elem.val()
},function(data){
var data=eval('('+data+')');
if(data.state=='sucess'){
elem.parent().prev().html(data.evilHandle);
}
})
})
/*id会会员设置*/
$(document).keypress(function(event){
if($('.arale-dialog-1_2_6').is(':visible')){
var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == '13'||keycode=='32'){
$('.arale-dialog-1_2_6').remove();
}
}
});
$('.deleteId').click(function(){
//console.log($(this).attr('data-id'));
var elem=$(this);
var cb = new ConfirmBox({
trigger: '#dialog',
title: '成功提示',
message: "<div>确认删除?</div>",
confirmTpl: '<button class="ui-dialog-button-orange">确定</button>',
cancelTpl: '<button>取消</button>',
onConfirm:function(){
var self=this;
$.post("deleteId.php",{
id:elem.attr('data-id')
},function(data){
if(data=='sucess'){
elem.closest('tr').slideUp();
}
self.hide();
})
}
}).show();
});
if(browser.versions.android){
$('#search-box').hammer({}).bind('tap',function(ev){
var val=$(this).val()
var reg= new RegExp(val,'g');
$('#view-list').find('.evilName').each(function(i,obj){
//$(obj).html($(obj).html().replace(/(\s*)/g, ""));
var elem=$(obj).html();
var elemId=$(obj).prev().prev().html();
var parenLi=$(obj).closest('tr');
if(!reg.test(elem)){
if(!reg.test(elemId)){
parenLi.hide();
}
}else{
parenLi.show();
}
})
//$(this).val(val);
});
$('#search-box').keyup(function(){
var val=$(this).val()
var reg= new RegExp(val,'g');
$('#view-list').find('.evilName').each(function(i,obj){
//$(obj).html($(obj).html().replace(/(\s*)/g, ""));
var elem=$(obj).html();
var elemId=$(obj).prev().prev().html();
var parenLi=$(obj).closest('tr');
if(!reg.test(elem)){
if(!reg.test(elemId)){
parenLi.hide();
}
}else{
parenLi.show();
}
})
//$(this).val(val);
});
}else{
$('#search-box').keyup(function(){
var val=$(this).val()
var reg= new RegExp(val,'g');
setTimeout(function(){
$('#view-list').find('.evilName').each(function(i,obj){
//$(obj).html($(obj).html().replace(/(\s*)/g, ""));
var elem=$(obj).html();
var elemId=$(obj).prev().html();
var parenLi=$(obj).closest('tr');
if(!reg.test(elem)){
if(!reg.test(elemId)){
parenLi.hide();
}
}else{
parenLi.show();
}
})
//$(this).val(val);
},1000);
});
}
});
</script>
</body>
</html>