<?php
	include('../admintool/constants_2.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']);
?>