"1" && $_GET["step"]<="5"){
$step = $_GET["step"];
}else{
die("Oups. Looks like you did not follow the instructions! Please follow the instructions otherwise you will not be able to install this script.");
}
switch ($step) {
case '2':
if(file_exists("includes/config.php")) $error='Configuration file already exists. Please delete or rename "config.php" and recopy "config_sample.php" from the original zip file. You cannot continue until you do this.';
if(isset($_POST["step2"])){
if (empty($_POST["host"])) $error.="
- You forgot to enter your host.
";
if (empty($_POST["name"])) $error.="
- You forgot to enter your database name.
";
if (empty($_POST["user"])) $error.="
- You forgot to enter your username.
";
if(empty($error)){
try{
$db = new PDO("mysql:host=".$_POST["host"].";dbname=".$_POST["name"]."", $_POST["user"], $_POST["pass"]);
generate_config($_POST);
$query=get_query();
foreach ($query as $q) {
$db->query($q);
}
$_SESSION["msg"]="Database has been successfully imported and configuration file has been created.";
header("Location: install.php?step=3");
}catch (PDOException $e){
$error = $e->getMessage();
}
}
}
break;
case '3':
if(!file_exists("includes/config.php")) die("
The file includes/config.php cannot be found. If the file includes/config_sample.php exists rename that to includes/config.php and refresh this page.
");
@include("includes/config.php");
$_SESSION["msg"]="";
if(isset($_POST["step3"])){
if (empty($_POST["email"])) $error.="
These are some of the important requirements for this software. "Red" means it is vital to this script, "Orange" means it is required but not vital and "Green" means it is good. If one of the checks is "Red", you will not be able to install this script because without that requirement, the script will not work.
PHP Version (need at least version 5.5)
It is very important to have at least PHP Version 5.5. It is highly recommended that you use 7.0 or later for better performance.
PDO Driver must be enabled
PDO driver is very important so it must enabled. Without this, the script will not connect to the database hence it will not work at all. If this check fails, you will need to contact your web host and ask them to either enable it or configure it properly.
config_sample.php must be accessible.
This installation will open that file to put values in so it must be accessible. Make sure that file is there in the includes folder and is writable.
content/ folder must writable.
Many things will be uploaded to that folder so please make sure it has the proper permission.
allow_url_fopen Enabled
The function file_get_contents is used to interact with external servers or APIs.
cURL Enabled
cURL is used to interact with external servers or APIs.
Requirements are met. You can now Proceed.'?>
2.0 Database Configuration
Now you have to set up your database by filling the following fields. Make sure you fill them correctly.
Now you have to create an admin account by filling the fields below. Make sure to add a valid email and a strong password. For the site URL, make sure to remove the last slash.
The script has been successfully installed and your admin account has been created. Please click "Delete Install" button below to attempt to delete this file. Please make sure that it has been successfully deleted.
Once clicked, you may see a blank page otherwise you will be redirected to your main page. If you see a blank, don't worry it is normal. All you have to do is to go to your main site, login using the info below and configure your site by clicking the "Admin" menu and then "Settings". Thanks for your purchase and enjoy :)