<?php
##################################################################
#  This is the basic configuration for all functions that runs
#  Include this at the top of every page
#  File name: configuration.php
#  Author: Abdul S. Lapai asuleimanlapai@yahoo.com Date: 15/05/2015
##################################################################
$dbc = @mysqli_connect('localhost', 'coeminna_jdX', '^%%mtHI.0A~u', 'coeminna_Dbx4');


if (!$dbc)
{
	trigger_error("Unable to connect to database:". mysqli_connect_error());
}


	define('MAX_FILE_SIZE', 504000);


	//constant for role
	define('SYSTEM_USER' , 1);

	//for candidate
	define('CANDIDATE', 2);



// ini_set('date.timezone', 'Africa/Lagos');*/

//This class is for establishing database connection
	class Config{

		//declaring connection  variable

		private $dbc ;

		//activating  connection
		function __construct()
		{



			try {
				//initializing  connection
				$this->dbc = @mysqli_connect('localhost', 'coeminna_jdX',  '^%%mtHI.0A~u',  'coeminna_Dbx4');

			} catch (Exception $e) {
				trigger_error("Unable to connect to database:". $e());
			}
		}

		//this captures the current db connection
		function connect()
		{
			return $this->dbc;
		}
	}




?>
