File: /home/thehunarfound/www/sms/lib/config.php
<?php
error_reporting(1);
session_start();
// $_SESSION['USER']='Atif';
// $role=$_SESSION["Role"];
// echo $role;
// if($role == 'DMSTI' || $role == 'CVI' || $role == 'FAASTI' || $role == 'PATTI' || $role == 'HAKTI' || $role == 'SDAMKTI'){
// echo $role;
// die;
// }
date_default_timezone_set("Asia/Karachi");
header("Content-Type: text/html; charset=utf-8");
//ob_start();
$dir = "lib/";
if(file_exists($dir."DB.php"))
{
include_once($dir."DB.php");
$db = new DB();
include_once($dir."functions.php");
include_once($dir."constants.php");
include_once($dir."common_function.php");
// include_once($dir."Jfunctions.php");
$db_old = new connect();
}
else
{
include_once("../../".$dir."DB.php");
$db = new DB();
include_once("../../".$dir."functions.php");
include_once("../../".$dir."constants.php");
include_once("../../".$dir."common_function.php");
// include_once("../../".$dir."Jfunctions.php");
$db_old = new connect();
}
if(isset($_SESSION["SMS"]))
{
if($_SESSION["SMS"] != "TRUE" && $_SESSION["SMS"] !="/login.php" && $_SERVER['REQUEST_URI'] != "/login.php") {
reDirectUsingJavascript('login.php');
}
}else{
if($_SERVER['REQUEST_URI'] != "/login.php")
reDirectUsingJavascript('login.php');
}
?>