<?php
session_start();
set_time_limit(0);
//$con = mysql_connect("localhost","ayeshana_medics","Med2tec@medics") OR DIE ("Unable to connect to database! Please try again later.");
$con = mysql_connect("med2tecdemo.db.12382748.hostedresource.com","med2tecdemo","demo!Med2tec") OR DIE ("Unable to connect to database! Please try again later.");

if($con)
{
	//mysql_select_db("ayeshana_med2tec",$con) or die(mysql_error());
	mysql_select_db("med2tec",$con) or die(mysql_error());
	define('med2tec',$con);
}

$array = explode('/',$_SERVER['REQUEST_URI']); 



/*echo '<pre>';
print_r($array);
echo '</pre>';
exit;*/

if(isset($_SESSION['security']['user_name'])&&$_SESSION['security']['user_name']!="")
{
	$username=$_SESSION['security']['user_name'];
	
	if(isset($array[2])&&$array[2]=='signin')
	{
		
		include("../classes/classUser.php");
		include("../classes/classQueryGlobal.php");
		include("../classes/classFilter.php");
		include("../classes/classMyException.php");
		
	}
	else
	{
		header("Location:signin/db.php");
	}
	
}
elseif(!isset($_SESSION['security']['user_name'])&&isset($array[2])&&$array[2]=='signin')
{
	header("Location:../login.php");
}


date_default_timezone_set('Asia/Karachi'); 

?>