Exemplo n.º 1
0
    }
    /* 加载视图 */
    include $_CFG['DIR_ADMIN_TPL'] . 'login.html';
} elseif ($_REQUEST['act'] == 'loginsubmit') {
    /* 非法提交 */
    if (!isset($_POST['submit'])) {
        sys_msg($_LANG['lawless_submit']);
    }
    /* 用户名或密码空检查 */
    if (!trim($_POST['username']) || !trim($_POST['password'])) {
        make_json_fail(trim($_POST['username']) ? $_LANG['fill_login_pwd'] : $_LANG['fill_login_usr']);
    }
    /* 登陆 */
    if (admin_login(trim($_POST['username']), md5(trim($_POST['password'])))) {
        admin_log($_LANG['str_login']);
        make_json_ok();
    }
    /* 登陆失败 */
    make_json_fail($_LANG['fail_login']);
} elseif ($_REQUEST['act'] == 'logout') {
    admin_log($_LANG['str_logout']);
    admin_logout();
} elseif ($_REQUEST['act'] == 'flush') {
    /* 刷新权限系统 */
    flush_privilege_sys();
    /* 跳转到后台首页 */
    redirect($_CFG['URL_ADMIN'] . 'index.php');
} elseif ($_REQUEST['act'] == 'home') {
    /* 初始化页面信息 */
    $tpl['_title'] = false;
    /* 加载视图 */
Exemplo n.º 2
0
 }
 /* 格式化数据量大小 */
 $tpl['stat']['size'] = bitunit($tpl['stat']['size']);
 /* 初始化页面信息 */
 $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');
     //格式化模块的操作(非内嵌)
Exemplo n.º 3
0
 /* 初始化页面信息 */
 $tpl['_body'] = 'list';
 /* ------------------------------------------------------ */
 // - 异步 - 列表页,列表查询
 /* ------------------------------------------------------ */
 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';
     /* 构建管理员的导出操作 */
Exemplo n.º 4
0
 $tpl['all'] = all_sqlfile();
 /* 初始化页面信息 */
 $tpl['_body'] = 'index';
 /* ------------------------------------------------------ */
 // - 异步 - 列表页,列表查询
 /* ------------------------------------------------------ */
 if ($_REQUEST['act'] == 'list') {
     /* 初始化页面信息 */
     $tpl['_body'] = 'list';
     /* 列表查询 */
     if ($_REQUEST['actsub'] == 'query') {
         /* 初始化页面信息 */
         $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()';
Exemplo n.º 5
0
 /* HTML控件 */
 $append = array('value' => '', 'text' => $_LANG['ddl_all_module']);
 $tpl['formc_module'] = ddl_module('module_id', $_GET['module_id'], $append);
 /* 初始化页面信息 */
 $tpl['_body'] = 'list';
 /* ------------------------------------------------------ */
 // - 异步 - 列表页,列表查询
 /* ------------------------------------------------------ */
 if ($_REQUEST['act'] == 'list') {
     /* 列表查询 */
     if ($_REQUEST['actsub'] == 'query') {
         /* 初始化页面信息 */
         $tpl['_bodysub'] = 'query';
     }
     /* 返回JSON */
     make_json_ok('', tpl_fetch('privilege.html', $tpl));
 } else {
     /* 初始化页面信息 */
     $tpl['_header'] = 'title';
     /* 初始化参数 */
     $_GET['module_id'] = trim($_GET['module_id']);
     /* 取得管理员的增加操作 */
     $m_ab = filter_module_acts($m_aa, array('add'), true);
     /* 操作属性 */
     $attribs = array();
     $attribs['add']['onclick'] = "wnd_privilege_fill(this,'add')";
     /* 初始化页面信息 */
     $tpl['title'] = admin_privilege_name_fk('privilege.php', 'list');
     //权限名称
     $tpl['titleacts'] = format_module_acts($m_ab, $attribs, 'btn');
     //格式化模块的操作(非内嵌)
Exemplo n.º 6
0
        /* 绑定操作 */
        $tpl['all'][$i]['acts'] = format_module_acts($m_ac, $attribs, 'a');
    }
    /* 初始化页面信息 */
    $tpl['_body'] = 'list';
    /* ------------------------------------------------------ */
    // - 异步 - 列表页,列表查询
    /* ------------------------------------------------------ */
    if ($_REQUEST['act'] == 'list') {
        /* 列表查询 */
        if ($_REQUEST['actsub'] == 'query') {
            /* 初始化页面信息 */
            $tpl['_bodysub'] = 'query';
        }
        /* 返回JSON */
        make_json_ok('', tpl_fetch('role.html', $tpl));
    } else {
        /* 初始化页面信息 */
        $tpl['_header'] = 'title';
        /* 取得管理员的增加操作 */
        $m_ab = filter_module_acts($m_aa, array('add'), true);
        /* 操作属性 */
        $attribs = array();
        $attribs['add']['onclick'] = "wnd_role_fill(this,'add')";
        /* 初始化页面信息 */
        $tpl['title'] = admin_privilege_name_fk('role.php', 'list');
        //权限名称
        $tpl['titleacts'] = format_module_acts($m_ab, $attribs, 'btn');
        //格式化模块的操作(非内嵌)
    }
}
Exemplo n.º 7
0
        /* 绑定操作 */
        $tpl['all'][$i]['acts'] .= format_module_acts($m_ac, $attribs, 'a');
    }
    /* 初始化页面信息 */
    $tpl['_body'] = 'list';
    /* ------------------------------------------------------ */
    // - 异步 - 列表页,列表查询
    /* ------------------------------------------------------ */
    if ($_REQUEST['act'] == 'list') {
        /* 列表查询 */
        if ($_REQUEST['actsub'] == 'query') {
            /* 初始化页面信息 */
            $tpl['_bodysub'] = 'query';
        }
        /* 返回JSON */
        make_json_ok('', tpl_fetch('module.html', $tpl));
    } else {
        /* 初始化页面信息 */
        $tpl['_header'] = 'title';
        /* 操作属性 */
        $attribs = array();
        $attribs['add']['onclick'] = "wnd_module_fill(this,'add')";
        /* 初始化页面信息 */
        $tpl['title'] = admin_privilege_name_fk('module.php', 'list');
        //权限名称
        $tpl['titleacts'] = format_module_acts($m_ab, $attribs, 'btn');
        //格式化模块的操作(非内嵌)
    }
}
/* 加载视图 */
include $_CFG['DIR_ADMIN_TPL'] . 'module.html';