importSQL('setup.sql'); $db->importSQL('setup-pro.sql'); require_once('options-default.php'); putDefaultOptions($db, $options); if (file_exists("options-advanced.php")) { include_once('options-advanced.php'); putDefaultOptions($db, $options); } } $no_visible_elements = true; $dbHost = $dbName = $dbUsr = $dbPwd = $dbEmail = $dbPrefix = ""; $cfgIsValid = false; $cfgDir = dirname(dirname(__FILE__)); $helpBtn = ""; $error_message = "
$helpBtn Please enter your database details.
"; $counter = ""; if (!empty($_GET['error'])) { if (!empty($_SESSION['posted'])) { $posted = $_SESSION['posted']; extract($posted); } if ($_GET['error'] == "1") { $error_message = "
$helpBtn Error connecting to the database. Check your DB details below.
"; } if ($_GET['error'] == "2") { if (!empty($_GET['cfg'])) { $cfg = "

Or create the config file on your server and insert the following content in it.

Config file is $cfgDir/dbCfg.php
" . htmlspecialchars(urldecode($_GET['cfg'])) . "
"; } else { $cfg = ''; } $error_message = "
$helpBtn Error: Permission denied! Unable to open config file (dbCfg.php in $cfgDir) for writing.
Try creating the file on your server and making it writable. On Unix, the commands are
 cd $cfgDir
 touch dbCfg.php
 chmod 777 dbCfg.php$cfg
"; } if ($_GET['error'] == "3") { $error_message = "
$helpBtn Config file ($cfgDir/dbCfg.php) successfully written.
For your security, please write-protect it using commands equivalent to
 cd $cfgDir
 chmod 644 dbCfg.php
Please proceed to the Admin Interface to set up your products.
"; } $cfgIsValid = $_GET['error'] == "4"; } else { $cfgIsValid = DbHelper::cfgIsValid(); } if ($cfgIsValid) { // valid config. don't display for security reasons $dbHost = $dbName = $dbUsr = $dbPwd = $dbEmail = $dbPrefix = ""; $dbSetupHidden = "hidden"; $adminSetupHidden = ""; // Wait for the DB to accept config (Needed on Arvixe, CentOS) while (!DbHelper::cfgIsValid()) { sleep(5); } doInstall(); $error_message = "
$helpBtn Congratulations! You have configured your DB details.
Please setup an admin account now.
" . ""; } else { $dbSetupHidden = ""; $adminSetupHidden = "hidden"; } require_once('header.php'); ?>

Ads EZ Logo

Welcome to Ads EZ Setup









Admin Setup