Ejemplo n.º 1
0
$ectemplates->libdir = 'lib_public.php';
$ectemplates->templatesDIR = '';
$step = intval(accept('step', 'R')) ? intval(accept('step', 'R')) : 0;
$ectemplates->assign('step', $step);
$ectemplates->assign('LAN', $LAN);
if ($step == 3) {
    header("Location:../admin/");
}
if (file_exists($installlock)) {
    message($LAN['install_errno_1000'], $LAN['install_errno_1045'], 0, 1);
}
if ($step == 0) {
    $ectemplates->display('step');
} elseif ($step == 1) {
    $ectemplates->assign('cp_items', syscheck($cp_items));
    $ectemplates->assign('dir_items', dircheck($dir_items));
    $ectemplates->assign('func_items', function_check($func_items));
    $ectemplates->display('step');
} elseif ($step == 2) {
    @(include CONFIG);
    $dbclass = intval(accept('dbclass', 'R')) ? intval(accept('dbclass', 'R')) : 0;
    if ($dbclass == 0) {
        $ectemplates->assign('domain', admin_URL);
        $ectemplates->assign('app_items', $func_app);
        $ectemplates->display('step');
    } elseif ($dbclass == 1) {
        $dbhost = accept('dbhost', 'R');
        $dbname = accept('dbname', 'R');
        $dbuser = accept('dbuser', 'R');
        $dbpw = accept('dbpw', 'R');
        $tablepre = accept('tablepre', 'R');
Ejemplo n.º 2
0
}
if (file_exists($copyFile)) {
    $cmsinfo = (include_once $copyFile);
    $CMSName = $cmsinfo['CMSNameNo'];
    $CompanyFullName = $cmsinfo['CompanyFullName'];
    $CompanyUrl = $cmsinfo['CompanyUrl'];
}
switch ($Step) {
    case '1':
        //第一步:检查系统配置
        //name项目, r系统所需配置, b最佳配置, current当前配置
        $cp_items = array(0 => array('name' => '操作系统', 'list' => 'os', 'c' => 'PHP_OS', 'r' => '不限', 'b' => 'Linux'), 1 => array('name' => 'PHP', 'list' => 'php', 'c' => 'PHP_VERSION', 'r' => '5.2', 'b' => '5.2'), 2 => array('name' => '上传配置', 'list' => 'upload', 'r' => '不限', 'b' => '5M'), 3 => array('name' => 'GD库', 'list' => 'gdversion', 'r' => '2.0', 'b' => '2.0'), 4 => array('name' => '磁盘空间', 'list' => 'disk', 'r' => '20M', 'b' => '不限'));
        $dir_items = array(0 => array('type' => 'file', 'path' => '../Upload/'), 1 => array('type' => 'file', 'path' => '../App/Conf'), 2 => array('type' => 'file', 'path' => '../App/Runtime'));
        $func_items = array(0 => array('name' => 'mysql_connect'), 1 => array('name' => 'mb_strlen'), 2 => array('name' => 'fsockopen'), 3 => array('name' => 'xml_parser_create'), 4 => array('name' => 'simplexml_load_file'));
        $SystemInfo = syscheck($cp_items);
        $DirInfo = dircheck($dir_items);
        $FunctionInfo = function_check($func_items);
        include_once "./Tpl/step1.html";
        ob_flush();
        flush();
        foreach ($DirInfo as $d) {
            if ($d['status'] != 1) {
                echo '<script type="text/javascript">DisableNext();</script>';
                ob_flush();
                flush();
                break;
            }
        }
        //函数有效性检查
        foreach ($FunctionInfo as $s) {
            if ($s['status'] != true) {