jeg kan ikke få min side til at logge af når den har været inaktiv
her er min header menu
- <?php
- include_once("../_CALL.php");
-
- $mangdisble= "";
- $staffdisble = "";
- $loginname = "";
-
- $isread = "";
-
- if(empty($_SESSION['login_id']))
- {
- //header("Location: index.php");
- echo '<script> window.location.href="../index.php"; </script>';
- exit(0);
- }
- if(empty($_SESSION['login_type']))
- {
- // header("Location: index.php");
- echo '<script> window.location.href="../index.php"; </script>';
- exit(0);
- }
- else if(($_SESSION['login_type'] != "club" ) && ($_SESSION['login_type'] != "Manager" ) && ($_SESSION['login_type'] != "Owner" ))
- {
- echo '<script> window.location.href="../index.php"; </script>';
- exit(0);
- }
-
- $adminlogin =0;
-
- if(array_key_exists("temp", $_SESSION))
- {
- $adminlogin = $_SESSION["temp"];
- }
-
- $resultChecking = call_service(WEB_SERVICES."service.php?op=view_profiles",'club_id='.$_SESSION['login_id']);
- $objChecking = "";
-
- if(array_key_exists("dictionary", $resultChecking))
- {
-
- $objChecking =$resultChecking->dictionary;
-
- if($objChecking->add_manager != "1" && $adminlogin == 0)
- {
- $mangdisble = "yes";
- }
-
- if($objChecking->feature_staff != "1" && $adminlogin == 0)
- {
- $staffdisble = "yes";
- }
- }
-
-
- $loginname = $_SESSION['login_username'];
-
-
- $resultChecking = call_service(WEB_SERVICES."service.php?op=get_count_unread",'club_id='.$_SESSION['login_id']);
- $objChecking = "";
-
- if(array_key_exists("dictionary", $resultChecking))
- {
-
- $objChecking =$resultChecking->dictionary[0];
-
- $count_nos = $objChecking->no_count_unread;
-
- if($count_nos != "0" && $count_nos != "")
- $isread = '<span class="badge" align="right" style="background-color:red; margin-left:95%; margin-top:-12%;">'.$count_nos.'</span>';
-
- }
-
-
- if($_SESSION['login_type'] == "Manager")
- {
- $mangdisble = "yes";
- }
-
- $startHanger = "001";
- $startLuggage = "001";
-
- $reservedHanger = "0";
- $reservedLuggage = "0";
-
- $totalHanger = "0";
- $totalLuggage = "0";
-
- //echo WEB_SERVICES."service.php?op=get_overview&club_id=".$_SESSION['login_id'];
- //die();
- $resultChecking = call_service(WEB_SERVICES."service.php?op=get_overview",'club_id='.$_SESSION['login_id']);
- $objChecking = "";
-
- if($resultChecking->success==1)
- {
- if(array_key_exists("dictionary", $resultChecking))
- {
-
- $objChecking =$resultChecking->dictionary[0];
-
- $totalHanger = $objChecking->no_of_hanger;
- $totalLuggage = $objChecking->no_of_luggage;
-
- $startHanger = $totalHanger;
- $startLuggage = $totalLuggage;
-
- }
- }
-
- $resultChecking = call_service(WEB_SERVICES."service.php?op=get_reserved",'club_id='.$_SESSION['login_id']);
- $objChecking = "";
-
- if($resultChecking->success==1)
- {
- if(array_key_exists("dictionary", $resultChecking))
- {
-
- $objChecking =$resultChecking->dictionary[0];
-
- $reservedHanger = $objChecking->reservedHanger;
- $reservedLuggage = $objChecking->reservedLuggage;
-
- }
- }
-
-
- /*
-
- $fromhnumber ='001';
- $fromlnumbers ='001';
- $tohnumber = '0';
- $tolnumber ='0';
-
- $resultData = call_service(WEB_SERVICES."service.php?op=add_warderobe_hnger_luggage","club_id=".$_SESSION['login_id']);
- $objData = "";
-
- if(array_key_exists("dictionary", $resultData))
- {
-
- $objData =$resultData->dictionary;
-
-
- $tohnumber = $objData->tohnumber;
- $tolnumber =$objData->tolnumber;
-
- $fromhnumber =$objData->fromhnumber;
- if($fromhnumber < $tohnumber)
- $fromhnumber = $fromhnumber +1;
- else
- {
- $fromhnumber =0;
- $tohnumber =0;
- }
-
- $fromlnumbers =$objData->fromlnumbers;
- if($fromlnumbers < $tolnumber)
- $fromlnumbers = $fromlnumbers +1;
- else
- {
- $fromlnumbers =0;
- $tolnumber =0;
- }
- }
-
- if($fromlnumbers != 0)
- $startHanger = $fromlnumbers;
- if($tolnumber != 0)
- $startLuggage = $tolnumber;
- */
-
- //echo $_SESSION['login_type'];
- // die();
-
- /*
- $result = call_service(WEB_SERVICES."service.php?op=get_headerData","club_id=".$login_id);
-
- $obj = "";
-
- if(array_key_exists("dictionary", $result))
- {
- $obj =$result->dictionary;
- }*/
-
- ?>