<?php
	if( false )
	{
		include('../admintool/constants.php');
		
		$filepath = explode('/appointments', $_SERVER['PHP_SELF']);
		$slices_url = explode('/', $filepath[0]);

		$centrepath = $slices_url[count($slices_url)-1];
		$centername = str_replace("-","",trim($centrepath));
		//// Database creation details ///
		$section   = substr($centername,0,15);

		$GLOBALS['actual_link'] = 'https://'.$_SERVER['HTTP_HOST'].$filepath[0].'/appointments';

		$GLOBALS['database_name']   = $section; //without prefix
		$GLOBALS['database_user']   = $section; //database name and database username are both similar, change the value if you want
		$GLOBALS['database_pass']   = "fiveminutes";
		$GLOBALS['cpanel_username'] = $cpanel_username;
		$GLOBALS['len'] = strlen($cpanel_username);
		$GLOBALS['cpanel_pass']  = $cpanel_pass;
		$GLOBALS['cpanel_theme'] = $cpanel_theme; // change this to "x3" if you don't have paper_lantern yet
		$GLOBALS['db_prefix']    = "_";

		define('SITE_DB', $GLOBALS['cpanel_username'].$GLOBALS['db_prefix'].$GLOBALS['database_name']);
		define('SITE_USER', $GLOBALS['cpanel_username'].$GLOBALS['db_prefix'].$GLOBALS['database_user']);
		define('SITE_PASSWORD', $GLOBALS['database_pass']);
		define('HOST_URL', $GLOBALS['actual_link']);
	}
	else
	{
		$filepath = explode('/appointments', $_SERVER['PHP_SELF']);
		$slices_url = explode('/', $filepath[0]);
		
		// database info
		$host   = "localhost";
		$user   = "dev71_bjp";
		$pwd    = "fiveminutes";
		$dbname = "dev71_bjp";
		
		$cpanel_username = "dev71";
		$cpanel_pass     = "iTgV5&Bwx!X8dNdd";
		$cpanel_theme    = "paper_lantern"; // change this to "x3" if you don't have paper_lantern yet
		$len             = strlen($cpanel_username);
		
		$GLOBALS['actual_link'] = 'https://'.$_SERVER['HTTP_HOST'].$filepath[0].'/appointments';
		
		$GLOBALS['database_name']   = $dbname; //without prefix
		$GLOBALS['database_user']   = $user; //database name and database username are both similar, change the value if you want
		$GLOBALS['database_pass']   = $pwd;
		$GLOBALS['cpanel_username'] = $cpanel_username;
		$GLOBALS['len'] = strlen($cpanel_username);
		$GLOBALS['cpanel_pass']  = $cpanel_pass;
		$GLOBALS['cpanel_theme'] = $cpanel_theme; // change this to "x3" if you don't have paper_lantern yet
		$GLOBALS['db_prefix']    = "ea_";

		define('SITE_DB', $GLOBALS['database_name']);
		define('SITE_USER', $GLOBALS['database_user']);
		define('SITE_PASSWORD', $GLOBALS['database_pass']);
		define('HOST_URL', $GLOBALS['actual_link']);
	}
?>