<?php error_reporting(E_ALL ^ E_NOTICE); // show all errors but notices require '../inc/functions.php'; require '../classes/session-class.php'; require '../classes/members-class.php'; ## fire up the Sessions ## $ses = new Session(); // create Session instance $ses->sesStart('install_echelon'); // start session (name 'echelon', 0 => session cookie, path is echelon path so no access allowed oustide echelon path is allowed) if ($_GET['t'] == 'install') { ## find the Echelon directory ## $install_dir = $_SERVER['SCRIPT_NAME']; $echelon_dir = preg_replace('#install/index.php#', '', $install_dir); ## Create an Echelon salt $ech_salt = genSalt(16); $ses_salt = randPass(6); ## Get the form information ## $email = cleanvar($_POST['email']); $db_host = cleanvar($_POST['db-host']); $db_user = cleanvar($_POST['db-user']); $db_pass = cleanvar($_POST['db-pass']); $db_name = cleanvar($_POST['db-name']); emptyInput($email, 'your email address'); emptyInput($db_host, 'your email address'); emptyInput($db_host, 'database hostname'); emptyInput($db_user, 'database username'); emptyInput($db_name, 'database name'); // check the new email address is a valid email address
## If SSL required die if not an ssl connection ## if ($https_enabled == 1) { if (!detectSSL() && !isError()) { // if this is not an SSL secured page and this is not the error page sendError('ssl'); exit; } } require 'classes/session-class.php'; // class to deal with the management of sesssions require 'classes/members-class.php'; // class to preform all B3 DB related actions ## fire up the Sessions ## $ses = new Session(); // create Session instance $ses->sesStart('echelon', 0, PATH); // start session (name 'echelon', 0 => session cookie, path is echelon path so no access allowed oustide echelon path is allowed) ## create istance of the members class ## $mem = new member($_SESSION['user_id'], $_SESSION['name'], $_SESSION['email']); ## Is B3 needed on this page ## if ($b3_conn) { // This is to stop connecting to the B3 Db for non B3 Db connection pages eg. Home, Site Admin, My Account require 'classes/mysql-class.php'; // class to preform all B3 DB related actions $db = DB_B3::getInstance($game_db_host, $game_db_user, $game_db_pw, $game_db_name, DB_B3_ERROR_ON); // create connection to the B3 DB // unset all the db info vars unset($game_db_host); unset($game_db_user); unset($game_db_pw); unset($game_db_name);