<?php
// error_reporting(0);
$RELATIVE_PATH = '../';
$ABSOLUTE_PATH = dirname(__FILE__);
require_once("kode_settings.php");
require_once('kode_functions.php');
$step = isset($_GET["step"])? $_GET["step"] : 1;
if (file_exists($set_install_lockfile_path) && $step != 4) {
exit("The program has been installed. If want to re-install it again, please remove $set_config_file_path with FTP first!");
}
// ------------------------
// Use Agreement
// function _1_Agreement()
// ------------------------
if ($step == 1) {
include('kode_step_1.php');
exit();
}
// ------------------------
// Environmental Testing
// function _2_TestEnv()
// ------------------------
else if ($step == 2) {
$php_version = phpversion();
$pg_os = getenv('OS');
$pg_gd = gd_info();
$pg_server_software = $_SERVER['SERVER_SOFTWARE'];
$pg_host_address = (empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_HOST'] : $_SERVER['REMOTE_ADDR']);
$pg_server_name = $_SERVER['SERVER_NAME'];
include('kode_step_2.php');
exit();
}
// ------------------------
// function _3_WriteSeting()
// ------------------------
else if ($step == 3) {
if (!empty($_SERVER['REQUEST_URI'])) {
$scriptName = $_SERVER['REQUEST_URI'];
}
else {
$scriptName = $_SERVER['PHP_SELF'];
}
$basepath = preg_replace('/(install.+)/', '', $scriptName);
if (empty($_SERVER['HTTP_HOST'])) {
$baseurl = 'http://' . $_SERVER['HTTP_HOST'];
}
else {
$baseurl = "http://" . $_SERVER['SERVER_NAME'];
}
include('kode_step_3.php');
exit();
}
// ------------------------
// function _4_Setup()
// ------------------------
else if ($step == 4) {
include('kode_step_4.php');
exit();
}
?>