diff --git a/code/web/private_php/setup/config/config.php b/code/web/private_php/setup/config/config.php index 5c8167ba1..a481cdf9d 100644 --- a/code/web/private_php/setup/config/config.php +++ b/code/web/private_php/setup/config/config.php @@ -4,40 +4,40 @@ * @author Daan Janssens, mentored by Matthew Lagoe */ -// Variables for database access to the www/CMS database -$cfg['db']['web']['host'] = '%sqlHostname%'; +// Variables for database access to the www/CMS database (only if support role) +$cfg['db']['web']['host'] = '%amsSqlHostname%'; $cfg['db']['web']['port'] = '3306'; $cfg['db']['web']['name'] = '%amsDatabase%'; -$cfg['db']['web']['user'] = '%sqlUsername%'; -$cfg['db']['web']['pass'] = '%sqlPassword%'; +$cfg['db']['web']['user'] = '%amsSqlUsername%'; +$cfg['db']['web']['pass'] = '%amsSqlPassword%'; -// Variables for database access to the lib database -$cfg['db']['lib']['host'] = '%sqlHostname%'; +// Variables for database access to the lib database (only if support role) +$cfg['db']['lib']['host'] = '%amsSqlHostname%'; $cfg['db']['lib']['port'] = '3306'; $cfg['db']['lib']['name'] = '%amsLibDatabase%'; -$cfg['db']['lib']['user'] = '%sqlUsername%'; -$cfg['db']['lib']['pass'] = '%sqlPassword%'; +$cfg['db']['lib']['user'] = '%amsSqlUsername%'; +$cfg['db']['lib']['pass'] = '%amsSqlPassword%'; // Variables for database access to the shard database -$cfg['db']['shard']['host'] = '%sqlHostname%'; +$cfg['db']['shard']['host'] = '%nelSqlHostname%'; $cfg['db']['shard']['port'] = '3306'; $cfg['db']['shard']['name'] = '%nelDatabase%'; -$cfg['db']['shard']['user'] = '%sqlUsername%'; -$cfg['db']['shard']['pass'] = '%sqlPassword%'; +$cfg['db']['shard']['user'] = '%nelSqlUsername%'; +$cfg['db']['shard']['pass'] = '%nelSqlPassword%'; -// Variables for database access to the ring_open database -// $cfg['db']['ring']['host'] = '%sqlHostname%'; +// Variables for database access to the ring_open database (only if domain role) +// $cfg['db']['ring']['host'] = '%nelSqlHostname%'; // $cfg['db']['ring']['port'] = '3306'; // $cfg['db']['ring']['name'] = '%domainDatabase%'; -// $cfg['db']['ring']['user'] = '%sqlUsername%'; -// $cfg['db']['ring']['pass'] = '%sqlPassword%'; +// $cfg['db']['ring']['user'] = '%nelSqlUsername%'; +// $cfg['db']['ring']['pass'] = '%nelSqlPassword%'; -// Variables for database access to the nel_tool database -$cfg['db']['tool']['host'] = '%sqlHostname%'; +// Variables for database access to the nel_tool database (only if service role) +$cfg['db']['tool']['host'] = '%nelSqlHostname%'; $cfg['db']['tool']['port'] = '3306'; $cfg['db']['tool']['name'] = '%toolDatabase%'; -$cfg['db']['tool']['user'] = '%sqlUsername%'; -$cfg['db']['tool']['pass'] = '%sqlPassword%'; +$cfg['db']['tool']['user'] = '%nelSqlUsername%'; +$cfg['db']['tool']['pass'] = '%nelSqlPassword%'; // To connect to an IMAP server running on port 143 on the local machine, // do the following: $mbox = imap_open("{localhost:143}INBOX", "user_id", "password"); @@ -122,5 +122,11 @@ $INGAME_LAYOUT = "basic"; $FORCE_INGAME = false; //file storage path (must be a publicly accessible url for -$FILE_STORAGE_PATH = $PUBLIC_PHP_PATH."\\ams\\files\\"; -$FILE_WEB_PATH = $BASE_WEBPATH."files/"; \ No newline at end of file +$FILE_STORAGE_PATH = $PUBLIC_PHP_PATH . '/ams/files/'; +$FILE_WEB_PATH = $BASE_WEBPATH . 'files/'; + +// Setup password +$NEL_SETUP_PASSWORD = '%nelSetupPassword%'; + +// Name of current domain (only if domain role) +$NEL_DOMAIN_NAME = '%nelDomainName%'; diff --git a/code/web/public_php/.htaccess b/code/web/public_php/.htaccess new file mode 100644 index 000000000..c0b74b60d --- /dev/null +++ b/code/web/public_php/.htaccess @@ -0,0 +1,2 @@ +RewriteEngine On +RewriteRule ^$ /ams [R=301,L] diff --git a/code/web/public_php/ams/index.php b/code/web/public_php/ams/index.php index 9e844006a..1ab707e79 100644 --- a/code/web/public_php/ams/index.php +++ b/code/web/public_php/ams/index.php @@ -18,7 +18,7 @@ ini_set( 'display_errors', 'on' ); class SystemExit extends Exception {} try { -if (!file_exists( '../is_installed')) { +if (!file_exists( '../config.php')) { header("Cache-Control: max-age=1"); header('Location: ../setup', true, 303); throw new SystemExit(); @@ -53,7 +53,7 @@ if ( ! isset( $_GET["page"] ) ) { $page = 'login'; } } else { - // if the session exists load page with $_GET requests + // if the session exists load page with $_GET requests if ( isset( $_SESSION['user'] ) ) { $page = $_GET["page"]; } else { diff --git a/code/web/public_php/index.php b/code/web/public_php/index.php new file mode 100644 index 000000000..17956aec4 --- /dev/null +++ b/code/web/public_php/index.php @@ -0,0 +1,6 @@ + diff --git a/code/web/public_php/setup/auth.php b/code/web/public_php/setup/auth.php new file mode 100644 index 000000000..8289289f9 --- /dev/null +++ b/code/web/public_php/setup/auth.php @@ -0,0 +1,52 @@ + +
+ Continue +
+ + + + + + + +