$tpl['_body'] = 'list'; /* ------------------------------------------------------ */ // - 异步 - 列表页,列表查询 /* ------------------------------------------------------ */ if ($_REQUEST['act'] == 'list') { /* 列表查询 */ if ($_REQUEST['actsub'] == 'query') { /* 初始化页面信息 */ $tpl['_bodysub'] = 'query'; } /* 返回JSON */ make_json_ok('', tpl_fetch('db_optimize.html', $tpl)); } else { /* 初始化页面信息 */ $tpl['_header'] = 'title'; /* 取得管理员的优化操作 */ $m_aa = admin_module_acts('db_optimize.php'); $m_ab = filter_module_acts($m_aa, array('optimize'), true); /* 操作属性 */ $attribs = array(); $attribs['optimize']['icon'] = 'optimize'; $attribs['optimize']['onclick'] = 'deal_dboptimize()'; /* 初始化页面信息 */ $tpl['title'] = admin_privilege_name_fk('db_optimize.php', 'optimize'); //权限名称 $tpl['titleacts'] = format_module_acts($m_ab, $attribs, 'btn'); //格式化模块的操作(非内嵌) } } /* 加载视图 */ include $_CFG['DIR_ADMIN_TPL'] . 'db_optimize.html';
$tpl['_bodysub'] = 'query'; } /* 返回JSON */ make_json_ok('', tpl_fetch('db_backup.html', $tpl)); } else { /* HTML控件 */ $attribs = array(); $attribs['upload'] = array('onclick' => "filecbox_upload(this,{'confirm':'确定上传SQL文件?'});"); $attribs['overlay'] = array('style' => "border-right-width:0px;"); $attribs['filebox'] = array('onchange' => "filecbox_change(this,filecbox_change_ext('sql','请上传SQL文件!'));"); $tpl['cbox_file'] = filecbox('file', $attribs); /* 初始化页面信息 */ $tpl['_header'] = 'title'; /* 取得管理员的备份操作 */ $m_aa = admin_module_acts('db_backup.php'); $m_ab = filter_module_acts($m_aa, array('backup'), true); /* 操作属性 */ $attribs = array(); $attribs['backup']['onclick'] = 'wnd_dbbackup_fill()'; /* 初始化页面信息 */ $tpl['title'] = admin_privilege_name_fk('db_backup.php', 'backup'); //权限名称 $tpl['titleacts'] = format_module_acts($m_ab, $attribs, 'btn'); //格式化模块的操作(非内嵌) } } /* 加载视图 */ include $_CFG['DIR_ADMIN_TPL'] . 'db_backup.html'; ?> <?php
if ($_REQUEST['act'] == 'list') { /* 列表查询 */ if ($_REQUEST['actsub'] == 'query') { /* 排序图片 */ $flag = order_img($tpl['list']['filter']); $tpl[$flag['var']] = $flag['img']; /* 初始化页面信息 */ $tpl['_bodysub'] = 'query'; } /* 返回JSON */ make_json_ok('', tpl_fetch('admin.html', $tpl)); } else { /* 初始化页面信息 */ $tpl['_header'] = 'title'; /* 取得管理员的增加操作 */ $m_ab = filter_module_acts($m_aa, array('add'), true); $m_ab[] = array('module_act_name' => $_LANG['act_export'], 'module_act_code' => 'export'); /* 操作属性 */ $attribs = array(); $attribs['add'] = array('onclick' => "wnd_admin_fill(this,'add')"); $attribs['export']['icon'] = 'xls'; $attribs['export']['type'] = 'cddl'; $attribs['export']['title'] = $_LANG['act_export_choice']; $attribs['export']['onclick'] = "deal_list_export('listtable-admin','modules/admin/admin.php?act=exportdo','choice')"; $attribs['export']['ddlwidth'] = '120'; /* 构建管理员的导出操作 */ $items = array(); $items['export'][] = array('icon' => 'all', 'text' => $_LANG['act_export_all'], 'onclick' => "deal_list_export('listtable-admin','modules/admin/admin.php?act=exportdo','all')"); $items['export'][] = array('icon' => 'page', 'text' => $_LANG['act_export_page'], 'onclick' => "deal_list_export('listtable-admin','modules/admin/admin.php?act=exportdo','page')"); $items['export'][] = array('icon' => 'choice', 'text' => $_LANG['act_export_choice'], 'onclick' => "deal_list_export('listtable-admin','modules/admin/admin.php?act=exportdo','choice')"); /* 初始化页面信息 */
} } else { if (!lrtree_dmove($filter)) { make_json_fail(); } } /* 初始化权限系统的权限文件和系统提示 */ init_privilege_sys_pfile(); make_json_ok(); } else { /* 权限检查 */ admin_privilege_valid('module.php', 'list'); /* 取得管理员的增加操作和非增加、列表操作 */ $m_aa = admin_module_acts('module.php'); $m_ab = filter_module_acts($m_aa, array('add'), true); $m_ac = filter_module_acts($m_aa, array('add', 'list'), false); array_unshift($m_ac, array('module_act_name' => $_LANG['act_dmove'], 'module_act_code' => 'dmove')); array_unshift($m_ac, array('module_act_name' => $_LANG['act_umove'], 'module_act_code' => 'umove')); /* 模块列表 */ $tpl['all'] = all_module(); /* 模块列表 - 数据重构 */ foreach ($tpl['all'] as $i => $r) { $tpl['all'][$i]['pre'] = '<span class="'; $tpl['all'][$i]['pre'] .= ($r['lvl'] > 1 ? 'minus' : 'plus') . '" style="'; $tpl['all'][$i]['pre'] .= $r['rht'] - $r['lft'] > 1 ? 'cursor:pointer;' : ''; $tpl['all'][$i]['pre'] .= 'margin-left:' . intval($r['lvl'] - $tpl['all'][0]['lvl']) * 2 . 'em;" '; $tpl['all'][$i]['pre'] .= 'onclick="tabletree_click(this)"></span>'; /* 编辑操作 */ $attribs = array(); $attribs['edit']['onclick'] = "wnd_module_fill(this,'edit',{$r[module_id]})"; /* 上/下移操作 */