<?php 
ob_start(); 
@session_start();
$varAdminFolder="";
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === "off") {
	$location = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
	header('HTTP/1.1 301 Moved Permanently');
	header('Location: ' . $location);
	exit;
}
define("DS",DIRECTORY_SEPARATOR); 
define("PATH_ROOT",dirname(__FILE__)); 
$table_prefix=""; 
define("TABLE_PREFIX",$table_prefix); 
define("PATH_LIB",PATH_ROOT.DS."function".DS);
date_default_timezone_set('Asia/Kolkata');
	$mysql_user = 'timepulse_timepulse';//'ms2fun';
	$password = "techno@123";
	$database_host = "localhost";
	$database = "timepulse_timepulse";    

require_once("autoload.php");
$db=new MySqlDb($database_host,$mysql_user,$password,$database); 
require_once(PATH_LIB."table.php"); require_once(PATH_LIB."functions.php"); 
/*************mss connect*************/ 
/* * ************************-----setup my framework start-------********************** */
$theme = "version1";
$set_error=false;//show error on page
$save_error=true;//save error into tem/logs directory
$set_session=false;
$set_visitor=false;
$mss = new mss($theme,$set_error,$save_error,$set_session,$set_visitor);
/* * ************************-----setup my framework start-------********************** */
define("API_KEY","mss123456789demo"); define("GMAIL_USER","demotextmail@gmail.com"); define("GMAIL_PASS","9893997349"); define("SENDER_NAME","demo"); define("SENDER_EMAIL","demotextmail@gmail.com"); 
// if(!isset($_SESSION["admin"]) && isset($_COOKIE["user_session"])){
// 	$userSession = json_decode($_COOKIE["user_session"],true);
// 	$_SESSION = $userSession;
// 	//print_r($userSession);exit;
// }
/*************mss config for email and connect*************/ 
$LinksDetails=fetchSetting(); 
//print_r($LinksDetails);echo $db->getLastQuery(); 
define("URL_ROOT",$LinksDetails["url_root"]); 
//echo URL_ROOT."dsa";
define("CONTENT_HEAD","CONTENT_HEAD");  
define("PATH_ADMIN",URL_ROOT.$varAdminFolder."/"); define("ADMIN_JS",PATH_ADMIN."js/"); define("ADMIN_CSS",PATH_ADMIN."css/"); define("URL_ADMIN_IMGAGES",URL_ROOT."assets/"); define("URL_ADMIN",URL_ROOT.$varAdminFolder."/"); define("URL_ADMIN_HOME",URL_ADMIN."index.php"); define("URL_ADMIN_CSS",URL_ADMIN."css/"); define("URL_ADMIN_JS",URL_ADMIN."js/"); define("URL_ADMIN_IMG",URL_ADMIN."images/"); define("SELF",basename($_SERVER["PHP_SELF"])); define("PATH_UPLOAD",PATH_ROOT.DS."uploads".DS); define("PATH_MEDIA",PATH_ROOT.DS."media".DS); define("PATH_UPLOAD_VIDEO",PATH_UPLOAD."video".DS); define("PATH_UPLOAD_PHOTO",PATH_UPLOAD."images".DS); define("PATH_UPLOAD_AD",PATH_UPLOAD."ad".DS); define("URL_IMAGES",URL_ROOT."images/"); define("DATE_FORMAT","d/m/Y"); 
//global variables 
define("REGX_MAIL","/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3} )$/");
define("REGX_URL","/^(http(s)?\:\/\/(?:www\.)?[a-zA-Z0-9]+(?:(?:\-|_)[a-zA-Z0-9]+)*(?:\.[a-zA-Z0-9]+(?:(?:\-|_)[a-zA-Z0-9]+)*)*\.[a-zA-Z]{2,4} (?:\/)?)$/i"); $alert_err=array(); $alert_msg=array(); /*************sms*************/ define("SMSID",$LinksDetails["sms_id"]); define("SMSPWD",$LinksDetails["sms_pwd"]); /*************sms*************/ 
 //addvisit(); //date_default_timezone_set($LinksDetails["timezone"]); 
 include_once(PATH_LIB . "Pagination.php"); $objPagination = new Pagination(); $db->updateAry("alert",array("status"=>2),"where status=1 and alert_date = CURDATE()"); 
 //echo $db->getLastQuery(); $db->updateAry("alert",array("status"=>0),"where status=2 and DATE(alert_date) != CURDATE()"); echo $db->getErMsg(); /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// 
 $system="MRAGANK-PC"; $ip="192.168.1.4"; $key = "MRAGANK-PC-192.168.1.3";//f1b5cc7ecd223bba27073a5a8119c37e //echo md5($key); /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// ////////////////////Installation step/////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// 
 $heading=array(); $heading["step-1"]="Welcome to setup wizard (Step 1 out of 8)"; $heading["step-2"]="License verification (Step 2 out of 8)"; $heading["step-3"]="Server requirements (Step 3 out of 8)"; $heading["step-4"]="Folder paths (Step 4 out of 8)"; $heading["step-5"]="Database settings (Step 5 out of 8)"; $heading["step-6"]="Ready to install (Step 6 out of 8)"; $heading["step-7"]="Administrator Aggriment(Step 7 out of 8)"; $heading["step-8"]="Completed (Step 8 out of 8)"; /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////// 
 $smsHead=array(); $smsHead["student_enrollment"]="Student enrollment"; $smsHead["fee_submit"]="Student fee submit"; $smsHead["faculty_enrollment"]="Faculty enrollment"; $smsHead["faculty_salery"]="Faculty salery"; $smsHead["library_issue"]="Library issue/return"; $smsHead["exam_timetable"]="Exam timetable pubish"; $smsHead["student_attandance"]="Student Attandance absent"; $smsHead["faculty_attandance"]="Faculty Attandance absent"; $smsHead["hostel_add_fee"]="Hostel add fee"; $smsHead["hostel_room_allortment"]="Hostel room allortment/deallortment"; $smsHead["add_bus_driver"]="Add bus driver"; $smsHead["send_markshhet_accourding"]="Send markshhet accourding to class and exam type combination"; $smsHead["slert_TC"]="Alert to get TC"; $smsHead["birth_day_sms"]="Birth day sms"; $smsHead["student_sms"]="Send Student sms"; $smsHead["class_sms"]="Send Class sms"; $smsHead["faculty_sms"]="Send Faculty sms";  $smsHead["enquiry_class_sms"]="Send enquiryclass sms"; $smsHead["enquiry_sms"]="Send enquiry sms";  $smsHead["department_sms"]="Send Department sms"; $smsHead["all_sms"]="Send All sms"; $smsHead["Income_Expense"]="Income and Expense sms to director "; $smsHead["route_sms"]="Route SMS"; define("VSMSID",$LinksDetails["voice_id"]); define("VSMSPWD",$LinksDetails["voice_password"]); define("VSMSSND",$LinksDetails["voice_sendderid"]); $licance=md5(php_uname("n")."-".$_SERVER["REMOTE_ADDR"]); $final_licance=md5(base64_encode($LinksDetails["site_name"]."-".$_SERVER["REMOTE_ADDR"])); //echo $licance; 
 $days=$LinksDetails["expiredate"]; $rempDate=diff($days);
/****************************************Classes Config*******************************/////////
include_once(PATH_LIB . "simplexlsx.class.php");
include_once(PATH_LIB . "html2fpdf.php");
$pdf = new HTML2FPDF('P', 'mm', 'Letter');
include_once(PATH_ROOT . "/models/class.page.php");
$objpage = new page();
include_once(PATH_ROOT . "/models/class.index.php");
$objindex = new index();
include_once(PATH_ROOT . "/models/class.extra.php");
$objextra = new extra();
include_once(PATH_ROOT . "/models/class.subject.php");
$objsubject = new subject();
/****************************************Classes Comman Config*******************************/////////
if(isset($_SESSION["msg"]))unset($_SESSION["msg"]);
if(isset($_SESSION["error"]))unset($_SESSION["error"]);
$pagename=strtolower(basename($_SERVER['REQUEST_URI']));
/****************************************Classes Comman Config*******************************/////////
$myDetail=$objindex->myDetail($_SESSION['user']['uid']);
?> 