1200) { // session started more than 30 minutes ago session_unset(); session_destroy(); session_write_close(); unset($_SESSION['loginreturn']); unset($_SESSION['logreturn']); unset($_SESSION['profitaauser']); unset($_SESSION['profitaapwd']); unset($_SESSION['profitaaclientalias']); session_regenerate_id(true); // change session ID for the current session and invalidate old session ID $_SESSION['CREATED'] = time(); // update creation time } */ $enableFieldDefault='style="border-color:#D6E4CB; padding-left:10px; "'; $enableFieldDefaultRed='style="background:#F1DA91; border:none"'; $disableFieldDefault='style="background:#fff; border:none; border-bottom:1px solid #D6E4CB; padding-left:10px;" disabled'; $disableFieldRed='style="background:#fff; border:none; border-bottom:1px solid #F1DA91; padding-left:10px;" disabled'; if(isset($_GET['reset'])) { session_unset(); session_destroy(); session_write_close(); unset($_SESSION['loginreturn']); unset($_SESSION['logreturn']); session_regenerate_id(true); header('Location: InitializeSystem'); exit; } if(isset($_GET['recView'])) { include('modules/'.$_GET["mod"].'/'.$_GET['entity'].'.php'); exit; } if(isset($_GET['vi'])) { include(urldecode($_GET['vi']).'.php'); exit; } //$bunit=$_SESSION['profitaabunit']; $clientid=$_SESSION['appclient']; $currentuser=$_SESSION['appuser']; $clientbunit=$_SESSION['appbunit']; if(authLogin($API_BASE_URL_1,$_SESSION['appuser'],$_SESSION['apppwd'])!=="GREAT") { header('Location: InitializeSystem'); exit; } if(isset($_GET['imp'])) { $clientid=$_SESSION['profitaaclient']; $toSwitch=urldecode($_GET['switch']); $currentuser=$_SESSION['appuser']; // echo "T1:". $_SESSION['appuser']; if(verifyAccessSingle("BPM",$currentuser)=="OKAY") { $theUSERID=urldecode($_GET['imp']); // echo "TEST: ".getObj(getQuerySystem("getUserDirect","",$theUSERID),"userid"); $_SESSION['appuser']= getObj(getQuerySystem("getUserDirect","",$theUSERID),"userid"); $_SESSION['apppwd']= getObj(getQuerySystem("getUserDirect","",$theUSERID),"pwd"); $_SESSION['profitaabunit']= getObj(getQuerySystem("getUserDirect","",$theUSERID),"bunitid"); $_SESSION['appclient']= getObj(getQuerySystem("getUserDirect","",$theUSERID),"clientid"); } } include_once('template/Header.php'); include_once('template/Footer.php'); /*lets expire sessions if(auto_logout("profitaauser")) { session_unset(); session_destroy(); session_write_close(); unset($_SESSION['loginreturn']); unset($_SESSION['logreturn']); session_regenerate_id(true); header('Location: welcomeToProfitaa?exit'); exit; } */ ?>