<?php
session_start();

error_reporting(E_ERROR | E_WARNING | E_PARSE);

require_once('./common.var.php');
require_once('./common.fun.php');
require_once('./Install.class.php');
require_once('./Output.class.php');
require_once('./Process.class.php');


if (file_exists(INSTALL_LOCK) && $_GET['step'] != 4) {
	echo '<html>';
	echo '<head>';
	echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>';
	echo '</head>';
	echo ' <body>';
	echo '<p style="color:red;text-align:center;">你已经安装过该系统!如果想重新安装，请先删除站点目录下的install.lock文件。</p>';
	echo '</body>';
	echo '</html>';
	exit();
}

$Install = new Install(intval($_REQUEST['step']));
$Install->execInstall();
?>
