Skip to content

Commit 5892386

Browse files
committed
备份
1 parent c6f7eb8 commit 5892386

8 files changed

Lines changed: 547 additions & 501 deletions

File tree

‎static/css/sys.css‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,11 @@ form{padding:0 15px;}
193193
.bottom-bar{border-top:1px solid #ddd;background:#F2F2F2;width:100%;padding:10px;position:fixed;z-index:999;left:0;bottom:0;}
194194

195195
.creatbox{position:absolute;top:54px;bottom:55px;left:0;right:0;overflow:auto;}
196-
.creatbox .panel{border:0;box-shadow:none;}
196+
.creatbox > .panel{border:0;box-shadow:none;}
197197

198198
.shortcutview img{width:48px;height:48px;margin-bottom:10px;}
199199

200-
.shortcut-selicon{margin-top:10px;background:#fff;border:1px solid #ccc;width:340px;float:left;clear:both;}
201-
.shortcut-selicon a{display:block;float:left;width:24px;height:24px;padding:5px;}
200+
.shortcut-selicon a{display:block;float:left;width:34px;height:34px;padding:5px;}
202201
.shortcut-selicon a:hover{background:#CCC;}
203202
.shortcut-selicon img{float:left;width:24px;height:24px;}
204203

‎sysapp/appmanage/detail.php‎

Lines changed: 359 additions & 326 deletions
Large diffs are not rendered by default.

‎sysapp/appmanage/index.ajax.php‎

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,58 @@
11
<?php
22
require('../../global.php');
3-
3+
44
switch($_REQUEST['ac']){
55
case 'getList':
66
$appcategory = $db->select('tb_app_category', '*');
77
foreach($appcategory as $ac){
88
$category[$ac['tbid']] = $ac['name'];
99
}
1010
$where = array();
11-
if($_POST['search_1'] != ''){
12-
$where['AND']['name[~]'] = $_POST['search_1'];
11+
if($_GET['search'] != ''){
12+
$where['AND']['name[~]'] = $_GET['search'];
1313
}
14-
if($_POST['search_2'] != ''){
15-
$where['AND']['app_category_id'] = $_POST['search_2'];
14+
if($_GET['app_category_id'] != ''){
15+
$where['AND']['app_category_id'] = $_GET['app_category_id'];
1616
}
17-
if($_POST['search_3'] != ''){
18-
$where['AND']['type'] = $_POST['search_3'];
17+
if($_GET['type'] != ''){
18+
$where['AND']['type'] = $_GET['type'];
1919
}
20-
$where['AND']['verifytype'] = $_POST['search_4'] == 1 ? 1 : 2;
21-
echo $db->count('tb_app', $where).'<{|*|}>';
22-
$where['LIMIT'] = array((int)$_POST['from'], (int)$_POST['to']);
23-
$rs = $db->select('tb_app', '*', $where);
24-
if($rs != NULL){
25-
foreach($rs as $v){
26-
echo '<tr class="list-bd">';
27-
echo '<td>'.$v['tbid'].'</td>';
28-
echo '<td style="text-align:left;padding-left:15px"><img src="../../'.$v['icon'].'" alt="'.$v['name'].'" class="appicon"><span class="appname">'.$v['name'].'</span></td>';
29-
echo '<td>'.($v['type'] == 'window' ? '窗口' : '挂件').'</td>';
30-
echo '<td>'.($v['app_category_id'] == 0 ? '未分类' : $category[$v['app_category_id']]).'</td>';
31-
echo '<td>'.$v['usecount'].'</td>';
32-
echo '<td>';
33-
if($v['verifytype'] == 1){
34-
if($v['isrecommend'] == 1){
35-
echo '<a href="javascript:;" class="btn btn-link">今日推荐</a>';
36-
}else{
37-
echo '<a href="javascript:;" class="btn btn-link do-recommend" appid="'.$v['tbid'].'">设为今日推荐</a>';
38-
}
39-
echo '<a href="javascript:openDetailIframe(\'detail.php?appid='.$v['tbid'].'\');" class="btn btn-link">编辑</a>';
40-
}else{
41-
echo '<a href="javascript:openDetailIframe(\'detail.php?appid='.$v['tbid'].'\');" class="btn btn-link">查看详情</a>';
42-
}
43-
echo '<a href="javascript:;" class="btn btn-link do-del" appid="'.$v['tbid'].'">删除</a>';
44-
echo '</td>';
45-
echo '</tr>';
20+
$where['AND']['verifytype'] = $_GET['verifytype'] == 1 ? 1 : 2;
21+
if($_GET['sort'] != '' && $_GET['order'] != ''){
22+
$where['ORDER'] = $_GET['sort'].' '.strtoupper($_GET['order']);
23+
}
24+
$echo['total'] = $db->count('tb_app', '*', $where);
25+
$where['LIMIT'] = array($_GET['offset'], $_GET['limit']);
26+
$echo['rows'] = array();
27+
$row = $db->select('tb_app', '*', $where);
28+
if($row != NULL){
29+
foreach($row as $v){
30+
$tmp['icon'] = '<img src="../../'.$v['icon'].'" alt="'.$v['name'].'" class="appicon">';
31+
$tmp['name'] = $v['name'];
32+
$tmp['type'] = $v['type'] == 'window' ? '窗口' : '挂件';
33+
$tmp['app_category_id'] = $v['app_category_id'] == 0 ? '未分类' : $category[$v['app_category_id']];
34+
$tmp['usecount'] = $v['usecount'];
35+
$tmp['do'] = '';
36+
if($v['verifytype'] == 1){
37+
if($v['isrecommend'] == 1){
38+
$tmp['do'] .= ' <a href="javascript:;" class="btn btn-link btn-xs disabled">今日推荐</a> ';
39+
}else{
40+
$tmp['do'] .= ' <a href="javascript:;" class="btn btn-default btn-xs do-recommend" data-id="'.$v['tbid'].'">设为今日推荐</a> ';
41+
}
42+
$tmp['do'] .= ' <a href="javascript:openDetailIframe(\'detail.php?appid='.$v['tbid'].'\');" class="btn btn-primary btn-xs">编辑</a> ';
43+
}else{
44+
$tmp['do'] .= ' <a href="javascript:openDetailIframe(\'detail.php?appid='.$v['tbid'].'\');" class="btn btn-primary btn-xs">查看详情</a> ';
45+
}
46+
$tmp['do'] .= ' <a href="javascript:;" class="btn btn-danger btn-xs do-del" data-id="'.$v['tbid'].'" data-name="'.$v['name'].'">删除</a> ';
47+
$echo['rows'][] = $tmp;
48+
unset($tmp);
4649
}
4750
}
51+
echo json_encode($echo);
4852
break;
4953
case 'del':
5054
$db->delete('tb_app', array(
51-
'tbid' => $_POST['appid']
55+
'tbid' => $_POST['id']
5256
));
5357
break;
5458
case 'recommend':
@@ -60,8 +64,8 @@
6064
$db->update('tb_app', array(
6165
'isrecommend' => 1
6266
), array(
63-
'tbid' => $_POST['appid']
67+
'tbid' => $_POST['id']
6468
));
6569
break;
6670
}
67-
?>
71+
?>

0 commit comments

Comments
 (0)