<?php
namespace PHPMaker2019\project_germanos;
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;

// Global user functions
// Page Loading event
function Page_Loading() {

	//echo "Page Loading";
Global $BODY_CLASS;
$BODY_CLASS .= " sidebar-collapse";

// begin - eba - nothing enabled in this event in travelinsurance project
//This event will be called by all PHP pages at the beginning of the page.
//If the pages involves database connection, it will be called after connecting to the database and before the Page_Load event.
//Note: This is a global function, NOT page class member.

}

// Page Rendering event
function Page_Rendering() {

	//echo "Page Rendering";
// begin - eba - nothing enabled in this event in travelinsurance project
//This event will be called by all PHP pages before outputting HTML for the page.
//Note: This is a global function, NOT page class member.

}

// Page Unloaded event
function Page_Unloaded() {

	//echo "Page Unloaded";
// begin - eba - nothing enabled in this event in travelinsurance project
//This event will be called by all PHP pages at the end of the page.
//If the pages involves database connection, it will be called before closing database connection and after the Page_Unload event.
//Note: This is a global function, NOT page class member.

}

// Personal Data Downloading event
function PersonalData_Downloading(&$row) {

	//echo "PersonalData Downloading";
}

// Personal Data Deleted event
function PersonalData_Deleted($row) {

	//echo "PersonalData Deleted";
}

// begin - eba - nothing enabled in this event in travelinsurance project
//Code to be included in all PHP pages. This may contain your constants, variables and functions.
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

	/* Begin - added by Elie BA on 05/11/2017 - to generate a temporary request_id for master table since detail table is filled before master. */

	/*
	$request_id_temp		= $_SESSION['request_id_temp'];
	if (($request_id_temp === null) || ($request_id_temp == ""))
	{
		$_SESSION['request_id_temp'] = date("mdHis"); // = date("YmdHis") // = date("ymdHis")
		$request_id_temp = $_SESSION['request_id_temp'];
	}
	*/

	/* End - added by Elie BA on 05/11/2017 - to generate a temporary request_id for master table since detail table is filled before master. */
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

	/*
	// example
	if($un == "rmhage" || $un == "maher.berro" || $un == "elie.ghanem" || $un == "jothman" ) 
	{
		//$v_requester_user = $_SESSION["displayname"]; //$_SESSION['displayname'];
	}
	else
	{
	}	
	*/

	/*
	if ($rsnew["added_on"] === null) 
		$rsnew["added_on"] = date("Y/m/d");	//= date("d/m/Y");
	if ($rsnew["created_date"] === null) 
		$rsnew["created_date"] = date("Y/m/d H:i:s");
	*/
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//CurrentUserName() = "elias.bouantoun";
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

	/* Begin - added by Elie BA on 05/11/2017 - to generate a temporary request_id for master table since detail table is filled before master. */

/* ****************** BEGIN - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
	$request_id_temp		= $_SESSION['request_id_temp'];
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */
	//$request_id			= $_SESSION['request_id'];

/* ****************** BEGIN - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
	if (($request_id_temp === null) || ($request_id_temp == ""))
	{
		$_SESSION['request_id_temp_is_empty'] = "Yes";
		//$_SESSION['request_id_temp'] = date("mdHis"); // = date("YmdHis") // = date("ymdHis")
		//$request_id_temp = $_SESSION['request_id_temp'];
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

/*
include_once('../common/page/userinfo.php');
//require_once('include/securitycheck.php');
$thankspage = '../../travelrequest/thanks.php';
//require_once('include/checkaccess.php');
require_once('../common/functions/functions.php');
require_once('../common/functions/formvalidator.php');
include_once('../common/functions/ldap_queries.php');
require_once('../common/functions/mailcheck.php');
require_once('../common/email/mail_functions.php');
//require_once('../common/timepicker/time.php');	
//require_once('../common/email/mail_functions.php');
//require_once('../common/timepicker/time.php');	
//require_once('../common/functions/mailcheck.php');
//require_once('../common/timepicker/time.php');	
//require_once('mail_functions.php');
require_once('include/mysqli.travelinsurance.php');
//require_once('include/oracle.banner.php');
//require_once('oracle.banner.elie.php');
//$thankspage = '../../travelinsurance/thanks.php';
//require_once('include/timepicker/time.php');	
require_once("include/upload_class.php");
$thepage					= "travelrequest";
//echo $un."<br/>";
//echo $UN."<br/>";
//echo "un: "."$un"."<br>";
//echo "UN: "."$UN"."<br>";
*/
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//include_once('../common/functions/ldap_queries.php');
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
// *********** VERY IMPORTANT - TO CHECK THE SERVER NAME ***********

/* Begin - EBA - NEW - disabled in phpmaker since insert header has been done on travelrequest.php level */
//require_once('include/mysqli.travelinsurance.php');
////$travelinsurancecxn2 = mysqli_connect("localhost", "travinsuuser", "Cuba_2017");
////$travelinsurancecxn = mysqli_connect("192.168.6.37", "travinsuuser", "Cuba_2017");
//$travelinsurancecxn = mysqli_connect("mysqlsrv", "travinsuuser", "Cuba_2017");
//mysqli_select_db($travelinsurancecxn2,'travelinsurance');

/* End - EBA - NEW - disabled in phpmaker since insert header has been done on travelrequest.php level */
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

/* ****************** BEGIN - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
$thepage					= "travelrequest";
//echo $un."<br/>";
//echo $UN."<br/>";
//echo "un: "."$un"."<br>";
//echo "UN: "."$UN"."<br>";
//////////////////////////////////////////////////
$UN 						= $_SESSION['displayname'];
$CAMPUS						= $_SESSION['campus'];
//////////////////////////////////////////////////
$msg        				= $_GET['msg'];
//$actionMode 				= $_GET['actionMode'];
$actionMode 				= "Send Request";
//////////////////////////////////////////////////
$company_name				= $_SESSION['company_name'];
$username					= $_SESSION['un'];
$username2 					= $_SESSION['username'];
//////////////////////////////////////////////////
$office 					= $_SESSION["office"];
//////////////////////////////////////////////////
$id							= $_SESSION['id'];
$un							= $_SESSION['un'];
$hrstatus 					= $_SESSION["lauhruserstatus"];
//////////////////////////////////////////////////
$displayname				= $_SESSION['displayname'];
$mail						= $_SESSION['mail'];
$cn							= $_SESSION['cn'];
//////////////////////////////////////////////////
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
$telephoneextension			= $_SESSION['telephoneextension'];
$lauhruserstatus			= $_SESSION['lauhruserstatus'];
$laubanenrolled				= $_SESSION['laubanenrolled'];
$lauhrcampus				= $_SESSION['lauhrcampus'];
$laubancampus				= $_SESSION['laubancampus'];
$lauhralumni				= $_SESSION['lauhralumni'];
$laubanprogram				= $_SESSION['laubanprogram'];
$lauhrnewstudent			= $_SESSION['lauhrnewstudent'];
$laubanmajor				= $_SESSION['laubanmajor'];
*/

/* ****************** BEGIN - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
//////////////////////////////////////////////////
$lname 						= $_SESSION['sn']; 			//phpmaker //get_LDAP_attribute("lauhrid", $id, "sn");
$fname 						= $_SESSION['givenname']; 	//phpmaker //get_LDAP_attribute("lauhrid", $id, "givenname");
//////////////////////////////////////////////////
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */
//2 request_type_id= Maps/Plans - campus= Beirut - request_category= Building Floor Plans - costnumber=  - description= zxvc - remark=  - building= Atiyah Building - roomnumber= zxcv - event_name=  - txtFromDate=  - txtToDate=  - txtfromtime=  - txttotime= 			9/27/2016 2:26:00 PM
//3 un= elias.bouantoun - UN= Elie Bou Antoun - displayname= Elie Bou Antoun - from= elias.bouantoun@lau.edu.lb - to= elias.bouantoun@lau.edu.lb - cc= elias.bouantoun@lau.edu.lb - subject= Auxiliary Services - Travel Request / Maps/Plans							9/27/2016 2:26:00 PM

/*
echo "uid: "."$uid"."<br>"; //uid:
echo "id: "."$id"."<br>";	//id: 
echo "un: "."$un"."<br>";	//un:
echo "UN: "."$UN"."<br>";	//UN: elias.bouantoun
*/
//////////////////////////////////////////////////
//echo"UN			: "."$UN"."<br>";
//echo"un			: "."$un"."<br>";
//echo"displayname	: "."$displayname"."<br>";
//echo"cn			: "."$cn"."<br>";

/*
echo"UN				: "."$UN"."<br>";
//echo"CAMPUS		: "."$CAMPUS"."<br>";
echo"CAMPUS			: "."$lauhrcampus"."<br>";
echo"username		: "."$username"."<br>";
echo"username2		: "."$username2"."<br>";
echo"id				: "."$id"."<br>";
echo"un				: "."$un"."<br>";
echo"displayname	: "."$displayname"."<br>";
echo"mail			: "."$mail"."<br>";
echo"cn				: "."$cn"."<br>";
echo"familyname		: "."$familyname"."<br>";
echo"office			: "."$office"."<br>";
$subject 			= "Auxiliary Services - Travel Request";
//$from 			= $_SESSION['mail'];
//$from				= get_LDAP_attribute("uid", $id, "mail");
//$from 			= "elias.bouantoun@lau.edu.lb";
$from 				= $mail;
$cc					= "elias.bouantoun@lau.edu.lb";
$to					= "elias.bouantoun@lau.edu.lb";
echo"subject		: "."$subject"."<br>";
echo"from			: "."$from"."<br>";
echo"to				: "."$to"."<br>";
echo"cc				: "."$cc"."<br>";
*/
//////////////////////////////////////////////////
//////////////////////////////////////////////////

/* ****************** BEGIN - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
$request_date 			= date('d/m/Y');	
$request_datetime 		= date('d/m/Y H:i:s');
$request_datetime1 		= date('Y-m-d H:i:s');
$request_datetime2 		= date('d/m/Y h:i:s a');	
$requester_user			= $_SESSION['displayname']; 	//phpmaker //get_LDAP_attribute("lauhrid", $id, "displayname");
$requester_title		= $_SESSION['title']; 			//phpmaker //get_LDAP_attribute("lauhrid", $id, "title");
$memo_to 				= "Travel and Accommodation"; //$_POST['memo_to'];
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */
//echo"requester_user	: "."$requester_user"."<br>";
//echo"requester_title	: "."$requester_title"."<br>";
//////////////////////////////////////////////////
//////////////////////////////////////////////////

/*
UN	: Elie Bou Antoun
un	: elias.bouantoun
displayname	: Elie Bou Antoun
cn	: Elie BouAntoun
requester_user	: Elie Bou Antoun
requester_title	: Mr.
*/
//////////////////////////////////////////////////
//////////////////////////////////////////////////
//if(isset($_POST['submit']))
//{
//--------------------------------------------------------

	/*
	$request_date 			= date('d/m/Y');	
	$request_datetime 		= date('d/m/Y H:i:s');
	$request_datetime1 		= date('Y-m-d H:i:s');
	$request_datetime2 		= date('d/m/Y h:i:s a');	
	*/
	//echo "The request_date is: $request_date"."<br>";			//	The request_date is: 10/10/2016
	//echo "The request_datetime is: $request_datetime"."<br>";
	//echo "The request_datetime1 is: $request_datetime1"."<br>";
	//echo "The request_datetime2 is: $request_datetime2"."<br>";
	//$requester_user	= get_LDAP_attribute("lauhrid", $id, "displayname");
	//$requester_title	= get_LDAP_attribute("lauhrid", $id, "title");

/* ****************** BEGIN - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
//--------------------------------------------------------
	$request_type_id 	= "Travel Request"; //$_POST['request_type_id'];
	//$_POST['request_type_id'] = $request_type_id;
	$campus 			= "Beirut"; //phpmaker //$_POST['campus'];
//--------------------------------------------------------
	//$memo_to 			= "Travel and Accommodation"; //$_POST['memo_to'];
	$estimated_price 	= ""; //phpmaker //$_POST['estimated_price'];
	$account_number 	= "test"; //phpmaker //$_POST['account_number'];
	$office 			= $_SESSION["office"]; //phpmaker //$_POST['office'];
	$project_name 		= "test"; //phpmaker //$_POST['project_name'];
	$no_of_travelers 	= "1"; //phpmaker //$_POST['no_of_travelers'];
	$travelclass 		= "Economy"; //phpmaker //$_POST['travelclass'];
	//$no_of_travelers 	= ""; //phpmaker //$_POST['no_of_travelers'];
	$lau_assets 		= "test"; //phpmaker //$_POST['lau_assets'];
	//$request_category = $_POST['maintenance'];
	//$costnumber 		= $_POST['costnumber1'];
	//$tagnumber 		= $_POST['tagnumber1'];
	$description 		= "test"; //phpmaker //$_POST['description'];	//= $_POST['description1'];
	//$remark 			= $_POST['remark1'];
	//========================================
	$event_name 		= "test"; //phpmaker //$_POST['event_name'];
	//$start_hour 		= $_POST['start_hour'];
	//$start_minute 	= $_POST['start_minute'];
	//$start_ampm 		= $_POST['start_ampm'];
	//$end_hour 		= $_POST['end_hour'];
	//$end_minute 		= $_POST['end_minute'];
	//$end_ampm 		= $_POST['end_ampm'];
	$txtFromDate 		= ""; //phpmaker //$_POST['txtFromDate'];
	//$txtToDate 		= $_POST['txtToDate'];
	////$txtfromtime 	= $_POST['txtfromtime'];
	////$txttotime 		= $_POST['txttotime'];
	//$txtfromtime		= $start_hour	.":".$start_minute	." ".$start_ampm; 		//$_POST['txtfromtime'];
	//$txttotime		= $end_hour		.":".$end_minute	." ".$end_ampm; 		//$_POST['txttotime'];
	//$txtfromdatetime	= $txtFromDate 	." ".$txtfromtime;
	//$txttodatetime	= $txtToDate 	." ".$txttotime;
	////$fromdatetime	= date("d/m/Y h:i a", $txtfromdatetime); //mktime(11, 14, 54, 8, 12, 2014);
	////$todatetime		= date("d/m/Y h:i a", $txttodatetime);
	$fromdatetime		= ""; //phpmaker //$_POST['fromdatetime'];
	//$todatetime		= $_POST['todatetime'];
	//========================================
	$travel_insurance	= "0"; //phpmaker //$_POST['travel_insurance'];
	//$safety_assistance= $_POST['safety_assistance'];
	if ($travel_insurance == "0")
	{
		$travel_insurance = "No";
	}
	else
	{
		$travel_insurance = "Yes";
	}
	//========================================
	$email_supervisor	= "elias.bouantoun@lau.edu.lb"; //phpmaker //$_POST['txtSuperemail1'];
	$email_other1		= ""; //phpmaker //$_POST['txtOtheremail1_1'];
	$email_other2		= ""; //phpmaker //$_POST['txtOtheremail1_2'];
	$email_other3		= ""; //phpmaker //$_POST['txtOtheremail1_3'];
	//========================================
	//--------------------------------------------------------
	//--------------------------------------------------------
	//--------------------------------------------------------
	//--------------------------------------------------------
			//prepare the email.
			//$order   = array("\r\n", "\n", "\r");		//disabled here in phpmaker - not needed
			//--------------------------------------------------------
			$subject = "Travel Office | Auxiliary Services"." - ".$request_type_id; //Travel Request
			//$subject = "Auxiliary Services - Travel Request"." / ".$request_type_id; //Travel Request
			//$subject= $application_title." - ".$module_name." ".$request_type_description ." requested";			
			//--------------------------------------------------------			
			//$from = $_SESSION['mail'];
			//$from	= get_LDAP_attribute("uid", $id, "mail");
			//$from = "elias.bouantoun@lau.edu.lb";
			$from 	= $mail;
			$cc = "elias.bouantoun@lau.edu.lb";
			//$to="elias.bouantoun@lau.edu.lb";
			$to=$from;
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

			/*
			$email_supervisor	= ""; //$_POST['txtSuperemail1'];
			$email_other1		= ""; //$_POST['txtOtheremail1_1'];
			$email_other2		= ""; //$_POST['txtOtheremail1_2'];
			$email_other3		= ""; //$_POST['txtOtheremail1_3'];
			*/
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP']))
	$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
	$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if(isset($_SERVER['HTTP_X_FORWARDED']))
	$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
	$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
else if(isset($_SERVER['HTTP_FORWARDED']))
	$ipaddress = $_SERVER['HTTP_FORWARDED'];
else if(isset($_SERVER['REMOTE_ADDR']))
	$ipaddress = $_SERVER['REMOTE_ADDR'];
else
	$ipaddress = 'UNKNOWN';
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */
//--------------------------------------------------------
//--------------------------------------------------------

/*
The simplest way to get the visitor’s/client’s IP address is using the $_SERVER['REMOTE_ADDR'] or $_SERVER['REMOTE_HOST'] variables.
However, sometimes this does not return the correct IP address of the visitor, so we can use some other server variables to get the IP address.
The below both functions are equivalent with the difference only in how and from where the values are retrieved.
getenv() is used to get the value of an environment variable in PHP.
// Function to get the client IP address
function get_client_ip() {
	$ipaddress = '';
	if (getenv('HTTP_CLIENT_IP'))
		$ipaddress = getenv('HTTP_CLIENT_IP');
	else if(getenv('HTTP_X_FORWARDED_FOR'))
		$ipaddress = getenv('HTTP_X_FORWARDED_FOR');
	else if(getenv('HTTP_X_FORWARDED'))
		$ipaddress = getenv('HTTP_X_FORWARDED');
	else if(getenv('HTTP_FORWARDED_FOR'))
		$ipaddress = getenv('HTTP_FORWARDED_FOR');
	else if(getenv('HTTP_FORWARDED'))
	   $ipaddress = getenv('HTTP_FORWARDED');
	else if(getenv('REMOTE_ADDR'))
		$ipaddress = getenv('REMOTE_ADDR');
	else
		$ipaddress = 'UNKNOWN';
	return $ipaddress;
}
$_SERVER is an array that contains server variables created by the web server.
// Function to get the client IP address
function get_client_ip() {
	$ipaddress = '';
	if (isset($_SERVER['HTTP_CLIENT_IP']))
		$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
	else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
		$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
	else if(isset($_SERVER['HTTP_X_FORWARDED']))
		$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
	else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
		$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
	else if(isset($_SERVER['HTTP_FORWARDED']))
		$ipaddress = $_SERVER['HTTP_FORWARDED'];
	else if(isset($_SERVER['REMOTE_ADDR']))
		$ipaddress = $_SERVER['REMOTE_ADDR'];
	else
		$ipaddress = 'UNKNOWN';
	return $ipaddress;
}
In PHP 5.3 or greater, you can get it like this:
$ip = getenv('HTTP_CLIENT_IP')?:
getenv('HTTP_X_FORWARDED_FOR')?:
getenv('HTTP_X_FORWARDED')?:
getenv('HTTP_FORWARDED_FOR')?:
getenv('HTTP_FORWARDED')?:
getenv('REMOTE_ADDR');
*/
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

 		/*
		$request_insert=
		"insert into `travelrequest`
			(`campus`,`request_date`,
			`request_datetime`,`request_ref`,
			`requester_user`,`requester_title`,`request_type_id`, 
			`memo_to`,`no_of_travelers`,`travelclass`,`estimated_price`,`account_number`,`project_name`,`traveltype_id`,`lau_assets`,`office`,
			`email_subject`,`email_body`,`email_body2`,`email_from`,`email_to`,`email_cc`,`email_bcc`,
			`email_supervisor`,`email_other1`,`email_other2`,`email_other3`,
			`description`,`remark`,`travel_insurance`,`event_name`,
			`event_date`,`event_date_to`,
			`txtfromdate`,`txttodate`,`txtfromtime`,`txttotime`,
			`start_hour`,`start_minute`,`start_ampm`,
			`end_hour`,`end_minute`,`end_ampm`,
			`description2`,`remark2`,
			`fromdatedate`,
			`todatedate`,
			`fromdatetime`,
			`todatetime`,
			`added_by`,`added_on`,`created_by`,`created_date`,`updated_by`,`updated_date`,
			`attach_id`,`attach_filename_initial`,`attach_extension`,`attach_description`,`attach_notes`,`attach_filename`,`attach_filepath`,`attach_path`,`attach_added_by`,`attach_added_on`,
			`attach_id2`,`attach_filename_initial2`,`attach_extension2`,`attach_description2`,`attach_notes2`,`attach_filename2`,`attach_filepath2`,`attach_path2`,`attach_added_by2`,`attach_added_on2`,
			`attach_id3`,`attach_filename_initial3`,`attach_extension3`,`attach_description3`,`attach_notes3`,`attach_filename3`,`attach_filepath3`,`attach_path3`,`attach_added_by3`,`attach_added_on3`,
			`attach_id4`,`attach_filename_initial4`,`attach_extension4`,`attach_description4`,`attach_notes4`,`attach_filename4`,`attach_filepath4`,`attach_path4`,`attach_added_by4`,`attach_added_on4`,
			`attach_id5`,`attach_filename_initial5`,`attach_extension5`,`attach_description5`,`attach_notes5`,`attach_filename5`,`attach_filepath5`,`attach_path5`,`attach_added_by5`,`attach_added_on5`,
			`uid`,`un`,`fname`,`lname`,`displayname`,`cn`,`mail`,
			`semester`,`ip`,`session_id`) 
		values 
			('$campus',STR_TO_DATE('$request_date', '%d/%m/%Y'),
			STR_TO_DATE(REPLACE('$request_datetime1',\"'\",''), '%Y-%m-%d %H:%i:%s'),'$request_datetime2',
			'$requester_user','$requester_title','$request_type_id',
			'$memo_to','$no_of_travelers','$travelclass','$estimated_price','$account_number','$project_name','$traveltype_id','$lau_assets','$office',
			'$subject','$html','$html2','$from','$to','$cc','$bcc',
			'$email_supervisor','$email_other1','$email_other2','$email_other3',
			'$description','$remark','$travel_insurance','$event_name',
			STR_TO_DATE('$event_date', '%d/%m/%Y'),STR_TO_DATE('$event_date_to', '%d/%m/%Y'),
			'$txtFromDate','$txtToDate','$txtfromtime','$txttotime',
			'$start_hour','$start_minute','$start_ampm',
			'$end_hour','$end_minute','$end_ampm',
			'$description','$remark',
			STR_TO_DATE('$txtFromDate', '%d/%m/%Y'),
			STR_TO_DATE('$txtToDate', '%d/%m/%Y'),
			STR_TO_DATE(REPLACE('$fromdatetime',\"'\",''), '%Y-%m-%d %H:%i:%s'),
			STR_TO_DATE(REPLACE('$todatetime',\"'\",''), '%Y-%m-%d %H:%i:%s'),
			'$un',curdate(),'$displayname',SYSDATE(),null,null,
			null,null,null,null,null,null,null,null,null,null,
			null,null,null,null,null,null,null,null,null,null,
			null,null,null,null,null,null,null,null,null,null,
			null,null,null,null,null,null,null,null,null,null,
			null,null,null,null,null,null,null,null,null,null,
			'$id','$un','$fname','$lname','$displayname','$cn','$from',
			null,'$ipaddress','$session_id')";
			*/
		//values 
		//	('$campus','06/11/2017',
		//	'06/11/2017','06/11/2017',
		//	'06/11/2017',
		//	'06/11/2017',

/* Begin - EBA - NEW - disabled in phpmaker since insert header has been done on travelrequest.php level */

/*
		$request_insert=
		"insert into `travelrequest`
			(`campus`,`request_date`,
			`request_datetime`,`request_ref`,
			`requester_user`,`requester_title`,`request_type_id`, 
			`memo_to`,`no_of_travelers`,`travelclass`,`estimated_price`,`account_number`,`project_name`,`traveltype_id`,`lau_assets`,`office`,
			`email_subject`,`email_body`,`email_body2`,`email_from`,`email_to`,`email_cc`,`email_bcc`,
			`email_supervisor`,`email_other1`,`email_other2`,`email_other3`,
			`description`,`remark`,`travel_insurance`,`event_name`,
			`event_date`,`event_date_to`,
			`txtfromdate`,`txttodate`,`txtfromtime`,`txttotime`,
			`start_hour`,`start_minute`,`start_ampm`,
			`end_hour`,`end_minute`,`end_ampm`,
			`description2`,`remark2`,
			`fromdatedate`,
			`todatedate`,
			`fromdatetime`,
			`todatetime`,
			`added_by`,`added_on`,`created_by`,`created_date`,`updated_by`,`updated_date`,
			`attach_id`,`attach_filename_initial`,`attach_extension`,`attach_description`,`attach_notes`,`attach_filename`,`attach_filepath`,`attach_path`,`attach_added_by`,`attach_added_on`,
			`attach_id2`,`attach_filename_initial2`,`attach_extension2`,`attach_description2`,`attach_notes2`,`attach_filename2`,`attach_filepath2`,`attach_path2`,`attach_added_by2`,`attach_added_on2`,
			`attach_id3`,`attach_filename_initial3`,`attach_extension3`,`attach_description3`,`attach_notes3`,`attach_filename3`,`attach_filepath3`,`attach_path3`,`attach_added_by3`,`attach_added_on3`,
			`attach_id4`,`attach_filename_initial4`,`attach_extension4`,`attach_description4`,`attach_notes4`,`attach_filename4`,`attach_filepath4`,`attach_path4`,`attach_added_by4`,`attach_added_on4`,
			`attach_id5`,`attach_filename_initial5`,`attach_extension5`,`attach_description5`,`attach_notes5`,`attach_filename5`,`attach_filepath5`,`attach_path5`,`attach_added_by5`,`attach_added_on5`,
			`uid`,`un`,`fname`,`lname`,`displayname`,`cn`,`mail`,
			`semester`,`ip`,`session_id`) 
		values 
			('$campus','2017-11-06',
			'2017-11-06 16:50:17','$request_datetime2',
			'$requester_user','$requester_title','$request_type_id',
			'$memo_to','$no_of_travelers','$travelclass','$estimated_price','$account_number','$project_name','$traveltype_id','$lau_assets','$office',
			'$subject','$html','$html2','$from','$to','$cc','$bcc',
			'$email_supervisor','$email_other1','$email_other2','$email_other3',
			'$description','$remark','$travel_insurance','$event_name',
			'2017-11-06','2017-11-06',
			'$txtFromDate','$txtToDate','$txtfromtime','$txttotime',
			'$start_hour','$start_minute','$start_ampm',
			'$end_hour','$end_minute','$end_ampm',
			'$description','$remark',
			'2017-11-06',
			'2017-11-06',
			'2017-11-06 16:50:17',
			'2017-11-06 16:50:17',
			'$un',curdate(),'$displayname',SYSDATE(),null,null,
			null,null,null,null,null,null,null,null,null,null,
			null,null,null,null,null,null,null,null,null,null,
			null,null,null,null,null,null,null,null,null,null,
			null,null,null,null,null,null,null,null,null,null,
			null,null,null,null,null,null,null,null,null,null,
			'$id','$un','$fname','$lname','$displayname','$cn','$from',
			null,'$ipaddress','$session_id')";
//--------------------------------------------------------
//--------------------------------------------------------
			$_SESSION["v_request_result_err"] = "";
			$_SESSION["v_request_insert_err"] = "";
			$_SESSION["v_mysqli_error_msg_err"] = "";
			$_SESSION["v_request_result0"] = "";
			$_SESSION["v_request_insert0"] = "";
			$_SESSION["v_mysqli_error_msg0"] = "";
			$_SESSION["v_rowcount_insert0"] = "";
			$_SESSION["v_rowcount_insert0"] = "";
			$_SESSION["v_request_result"] = "";
			$_SESSION["v_request_insert"] = "";
			$_SESSION["v_mysqli_error_msg"] = "";
			$_SESSION["v_rowcount_insert"] = "";
			$_SESSION["v_rowcount_insert"] = "";
//--------------------------------------------------------
//--------------------------------------------------------
		//echo"request_insert: "."$request_insert"."<br>";
//--------------------------------------------------------
//--------------------------------------------------------
		//Dump to error output any MySQL errors
		if(!$request_result = mysqli_query($travelinsurancecxn2,$request_insert))
		{
			$msg=mysqli_error($travelinsurancecxn2);
			//echo"error : request_insert: "."$request_result"."<br>";
			$msg_error = "1";
			$_SESSION["v_request_result_err"] = $request_result;
			$_SESSION["v_request_insert_err"] = $request_insert;
			$_SESSION["v_mysqli_error_msg_err"] = $msg;
		}
		else
		{
			$_SESSION["v_request_result0"] = $request_result;
			$_SESSION["v_request_insert0"] = $request_insert;
			$_SESSION["v_mysqli_error_msg0"] = $msg;
			$_SESSION["v_rowcount_insert0"] = $rowcount_insert;
			$_SESSION["v_rowcount_insert0"] = $rowcount_insert;
			$request_id = mysqli_insert_id($travelinsurancecxn2);
			//echo"request_id: "."$request_id"."<br>";
			//printf("Last inserted record has id %d\n", mysqli_insert_id());
			$rowcount_insert=mysqli_num_rows($request_result);
			//echo"rowcount_insert: "."$rowcount_insert"."<br>";
			//$date		="2010-04-30";
			//$y 		= date('Y',strtotime($date));
			//echo $y; 
			//$date 	= "2012-01-05";
			//$year 	= date('Y', strtotime($date));
			//$month 	= date('F', strtotime($date));
			//echo $month
			//$time=strtotime($dateValue);
			//$month=date("F",$time);
			//$year=date("Y",$time);
			$_SESSION['request_id_temp'] 	= $request_id;
			//$_SESSION['request_id'] 		= $request_id;
			$request_id_temp 		= $_SESSION['request_id_temp'];
			$request_id		 		= $_SESSION['request_id_temp'];
			$request_no 			= $request_id.'-'. date("Y"); //
			$_SESSION["v_request_result"] = $request_result;
			$_SESSION["v_request_insert"] = $request_insert;
			$_SESSION["v_mysqli_error_msg"] = $msg;
			$_SESSION["v_rowcount_insert"] = $rowcount_insert;
			$_SESSION["v_rowcount_insert"] = $rowcount_insert;
		}	//added in phpmaker to be checked again where to be closed	//////////////////////////////////// to do
*/

/* End - EBA - NEW - disabled in phpmaker since insert header has been done on travelrequest.php level */

/*
//begin - disabled here in phpmaker - not needed
			$request_update_request_no=
			"update travelrequest
			set 	request_no			= CONCAT('$request_id', '-', YEAR(CURDATE()) )
			where 	request_id 			= '$request_id' ";
					//updated_by 	= '".$_SESSION['un']."',
					//updated_date = SYSDATE(),
			//echo"request_update_request_no: "."$request_update_request_no"."<br>";
			//--------------------------------------------------------
			//Dump to error output any MySQL errors
			if(!$request_result_request_no = mysqli_query($travelinsurancecxn2,$request_update_request_no))
			{
				//echo"1request_update error: "."$request_result_request_no"."$msg"."<br>";
				$msg=mysqli_error($travelinsurancecxn2);
				//echo"request_update_request_no error: "."$request_result_request_no"."$msg"."<br>";
				//$log_message ="5 attachments travelrequest.php - filename= "."$filename"." - filename= "."$filename"." - filename= "."$filename"; 	$log_query ="CALL LOG_ERRORS('$log_message')"; 		$log_result= mysqli_query($travelinsurancecxn2,$log_query); 		$log_data  = mysqli_fetch_array($log_result);
				$msg_error = "1";
			}
			else
			{
				// do something
				///$ans_id = mysqli_update_id($travelinsurancecxn2);
				///echo"ans_id: "."$ans_id"."<br>";
				///printf("Last updated record has id %d\n", mysqli_update_id());
				//$ans_id1 = mysqli_update_id($travelinsurancecxn2);
				///echo"ans_id1: "."$ans_id1"."<br>";
				///printf("Last updated record has id %d\n", mysqli_update_id());
				//$request_result_request_no=mysqli_num_rows($request_result_request_no);
				///echo"request_result_request_no: "."$request_result_request_no"."<br>";
				//$log_message ="6 attachments travelrequest.php - filename= "."$filename"." - filename= "."$filename"." - filename= "."$filename"; 	$log_query ="CALL LOG_ERRORS('$log_message')"; 		$log_result= mysqli_query($travelinsurancecxn2,$log_query); 		$log_data  = mysqli_fetch_array($log_result);
				//echo"request_update_request_no successfully done: "."$request_result_request_no"."<br>";
			}
//end - disabled here in phpmaker - not needed
*/
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

/* Begin - EBA - NEW - disabled in phpmaker since insert header has been done on travelrequest.php level */			

/*
			// Close the mySQL Connection
			mysqli_close($travelinsurancecxn2);
*/

/* End - EBA - NEW - disabled in phpmaker since insert header has been done on travelrequest.php level */
//--------------------------------------------------------
//--------------------------------------------------------

/*
echo "var_dump -------------1:";									echo "<br><br>";
echo "print_r(_FILES)		: ";	print_r($_FILES);				echo "<br><br>";
echo "var_dump(_FILES)		: ";	var_dump($_FILES);				echo "<br><br>";
echo "print_r(_POST) 		: ";	print_r($_POST);				echo "<br><br>";
echo "var_dump(_POST)		: ";	var_dump($_POST);				echo "<br><br>";
echo "print_r(_SESSION)		: ";	print_r($_SESSION);				echo "<br><br>";
echo "var_dump(_SESSION) 	: ";	var_dump($_SESSION);			echo "<br><br>";
echo "print_r(_GET)			: ";	print_r($_GET);					echo "<br><br>";
echo "var_dump(_GET) 		: ";	var_dump($_GET);				echo "<br><br>";
*/
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------
//--------------------------------------------------------

/* ****************** BEGIN - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
	}
	else
	{
		$_SESSION['request_id_temp_is_empty'] = "No";
	}
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

	/* End - added by Elie BA on 05/11/2017 - to generate a temporary request_id for master table since detail table is filled before master. */
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////

/* ****************** BEGIN - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */

/*
////// IMPORTANT NOTE - READ IT //////
// this code on this trigger is to be used only when testing on localhost pc
// this code is to be disabled when moved to server
//Begin - new - create new session variable UN - added on 21-05-2017
if(isset($info[$i]["lauhrid"][0]))				{ $_SESSION['UN']					= $info[$i]["lauhrid"][0];				} else {$_SESSION['UN'] 				= "201509043";}
if(isset($info[$i]["lauhrcampus"][0]))			{ $_SESSION['campus']				= $info[$i]["lauhrcampus"][0];			} else {$_SESSION['campus'] 			= "Beirut";}
//End   - new - create new session variable UN - added on 21-05-2017
//$_SESSION['un']						= $UN;	//$_SESSION['uid']=$UN;
if(isset($info[$i]["cn"][0]))					{ $_SESSION['un']					= $info[$i]["uid"][0];					} else {$_SESSION['un'] 				= "elias.bouantoun";}
if(isset($info[$i]["displayname"][0]))			{ $_SESSION['displayname']			= $info[$i]["displayname"][0];			} else {$_SESSION['displayname'] 		= "Elie Bou Antoun1";}
if(isset($info[$i]["cn"][0]))					{ $_SESSION['cn']					= $info[$i]["cn"][0];					} else {$_SESSION['cn'] 				= "Elie BouAntoun1";}
if(isset($info[$i]["mail"][0])) 				{ $_SESSION['mail']					= $info[$i]["mail"][0];					} else {$_SESSION['mail'] 				= "elias.bouantoun@lau.edu.lb";}
if(isset($info[$i]["lauhrdepartment"][0]))		{ $_SESSION['office']				= $info[$i]["lauhrdepartment"][0];		} else {$_SESSION['office'] 			= "IT Applications & Solutions Office";}
if(isset($info[$i]["telephonenumber"][0]))		{ $_SESSION['telephoneextension']	= $info[$i]["telephonenumber"][0];		} else {$_SESSION['telephoneextension'] = "1381";}
if(isset($info[$i]["lauhrid"][0]))				{ $_SESSION['id']					= $info[$i]["lauhrid"][0];				} else {$_SESSION['id'] 				= "201509043";}
if(isset($info[$i]["lauhruserstatus"][0]))		{ $_SESSION['lauhruserstatus']		= $info[$i]["lauhruserstatus"][0];		} else {$_SESSION['lauhruserstatus'] 	= "Full-time Staff";}
if(isset($info[$i]["laubanenrolled"][0]))		{ $_SESSION['laubanenrolled']		= $info[$i]["laubanenrolled"][0];		} else {$_SESSION['laubanenrolled'] 	= "";}
if(isset($info[$i]["lauhrcampus"][0]))			{ $_SESSION['lauhrcampus']			= $info[$i]["lauhrcampus"][0];			} else {$_SESSION['lauhrcampus'] 		= "Beirut";}
if(isset($info[$i]["lauhralumni"][0]))			{ $_SESSION['lauhralumni']			= $info[$i]["lauhralumni"][0];			} else {$_SESSION['lauhralumni'] 		= "";}
if(isset($info[$i]["laubancampus"][0]))			{ $_SESSION['laubancampus']			= $info[$i]["laubancampus"][0];			} else {$_SESSION['laubancampus'] 		= "";}
if(isset($info[$i]["laubanprogram"][0]))		{ $_SESSION['laubanprogram']		= $info[$i]["laubanprogram"][0];		} else {$_SESSION['laubanprogram'] 		= "";}
if(isset($info[$i]["laubanmajor"][0]))			{ $_SESSION['laubanmajor']			= $info[$i]["laubanmajor"][0];			} else {$_SESSION['laubanmajor'] 		= "";}
//if(isset($info[$i]["lauhrid"][0]))				{ $_SESSION['lauhrid']			= $info[$i]["lauhrid"][0];				} else {$_SESSION['lauhrid'] 			= "";}
if(isset($info[$i]["title"][0]))				{ $_SESSION['title']				= $info[$i]["title"][0];				} else {$_SESSION['title'] 				= "Mr.";}
if(isset($info[$i]["lauhrjobtitle"][0]))		{ $_SESSION['lauhrjobtitle']		= $info[$i]["lauhrjobtitle"][0];		} else {$_SESSION['lauhrjobtitle'] 		= "Application Developer1";}
if(isset($info[$i]["lauhrschool"][0]))			{ $_SESSION['lauhrschool']			= $info[$i]["lauhrschool"][0];			} else {$_SESSION['lauhrschool'] 		= "";}
if(isset($info[$i]["laubancollege"][0]))		{ $_SESSION['laubancollege']		= $info[$i]["laubancollege"][0];		} else {$_SESSION['laubancollege'] 		= "";}
if(isset($info[$i]["lauhrworkbasis"][0]))		{ $_SESSION['lauhrworkbasis']		= $info[$i]["lauhrworkbasis"][0];		} else {$_SESSION['lauhrworkbasis'] 	= "";}
if(isset($info[$i]["givenname"][0]))			{ $_SESSION['givenname']			= $info[$i]["givenname"][0];			} else {$_SESSION['givenname'] 			= "Elie1";} //$fname
if(isset($info[$i]["sn"][0]))					{ $_SESSION['sn']					= $info[$i]["sn"][0];					} else {$_SESSION['sn'] 				= "BouAntoun1";} //$lname		
//=================================================
$id					= $_SESSION['id'];
$un					= $_SESSION['un'];
*/

/* ****************** END - 08-11-2017 - DISABLED AND REPLACED WITH UPDATE STATMENT OF THE TEMPORARY INSERT DONE ON LOADING PAGE FIRST TIME ****************** */
//=================================================
//=================================================
//=================================================
//=================================================
// this code below has been copied from C:\!E\php-projects\webapps\web\gradassistships\userinfo2.php
// and the echo result is not from phpmaker

/*
echo"<br>";
echo"lauhrcampusini-----: "."$lauhrcampusini"			."<br>";
echo"lauhrcampus--------: "."$lauhrcampus"				."<br>";
echo"officeini----------: "."$officeini"				."<br>";
echo"office-------------: "."$office"					."<br>";
echo"school-------------: "."$school"					."<br>";
echo"department---------: "."$department"				."<br>";
echo"campus-------------: "."$campus"					."<br>";
echo"campus2------------: "."$campus2"					."<br>";
echo"lauhrschool--------: "."$lauhrschool"				."<br>";
echo"laubancollege2-----: "."$laubancollege2"			."<br>";
//=================================================
echo"--------------SESSION Values----------------------"."<br>";
echo"UN-----------------: "."$UN"."<br>";
echo"un-----------------: ".$_SESSION['un']				."<br>";				//."$un"."<br>";
echo"id-----------------: ".$_SESSION['id']				."<br>";				//."$id"."<br>";
echo"title--------------: ".$_SESSION['title']			."<br>";
echo"sn or familyname---: ".$_SESSION['sn']				."<br>";				//."$familyname"."<br>";
echo"givenname----------: ".$_SESSION['givenname']		."<br>";				//."$empname"."<br>";
echo"displayname--------: ".$_SESSION['displayname']	."<br>";				//."$displayname"."<br>";
echo"mail---------------: ".$_SESSION['mail']			."<br>";				//."$mail"."<br>";
echo"cn-----------------: ".$_SESSION['cn']				."<br>";				//."$cn"."<br>";
echo"office-------------: ".$_SESSION['office']			."<br>";
echo"telephoneextension-: ".$_SESSION['telephoneextension']."<br>";				//."$telephoneextension"."<br>";
echo"lauhruserstatus----: ".$_SESSION['lauhruserstatus']."<br>";				//."$lauhruserstatus"."<br>";
echo"laubanenrolled-----: ".$_SESSION['laubanenrolled']	."<br>";				//."$laubanenrolled"."<br>";
echo"lauhrcampus--------: ".$_SESSION['lauhrcampus']	."<br>";				//."$lauhrcampus"."<br>";
echo"laubancampus-------: ".$_SESSION['laubancampus']	."<br>";				//."$laubancampus"."<br>";
echo"lauhralumni--------: ".$_SESSION['lauhralumni']	."<br>";				//."$lauhralumni"."<br>";
echo"laubanprogram------: ".$_SESSION['laubanprogram']	."<br>";				//."$laubanprogram"."<br>";
echo"laubanmajor--------: ".$_SESSION['laubanmajor']	."<br>";				//."$laubanmajor"."<br>";
echo"lauhrjobtitle------: ".$_SESSION['lauhrjobtitle']	."<br>";
echo"lauhrworkbasis-----: ".$_SESSION['lauhrworkbasis']	."<br>";
echo"lauhrschool--------: ".$_SESSION['lauhrschool']	."<br>";
echo"laubancollege------: ".$_SESSION['laubancollege']	."<br>";
//echo"laubancollege2-----: "."$laubancollege2"			."<br>";
*/
//=================================================
//=================================================
//=================================================
//=================================================

/*
lauhrcampusini-----: Beirut
lauhrcampus--------: Beirut
officeini----------: IT Applications & Solutions Office
office-------------: IT Applications & Solutions Office
school-------------: 
department---------: 
campus-------------: Beirut
campus2------------: 
lauhrschool--------: 
laubancollege2-----: 
--------------SESSION Values----------------------
UN-----------------: 201509043
un-----------------: elias.bouantoun
id-----------------: 201509043
title--------------: Mr.
sn or familyname---: BouAntoun
givenname----------: Elie
displayname--------: Elie Bou Antoun
mail---------------: elias.bouantoun@lau.edu.lb
cn-----------------: Elie BouAntoun
office-------------: IT Applications & Solutions Office
telephoneextension-: 1381
lauhruserstatus----: Full-time Staff
laubanenrolled-----: 
lauhrcampus--------: Beirut
laubancampus-------: 
lauhralumni--------: 
laubanprogram------: 
laubanmajor--------: 
lauhrjobtitle------: Application Developer
lauhrworkbasis-----: 
lauhrschool--------: 
laubancollege------:
*/
?>
