Changeset 2661608


Ignore:
Timestamp:
09/16/14 10:06:57 (2 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.1
Children:
539a6be
Parents:
ced0f40
Message:

Move location of session timeout message

Location:
src-webui/appweb/share/html
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-webui/appweb/share/html/include/login.php

    r03637e4 r2661608  
    2424  if(isset($_POST['username'])) { 
    2525      if($_POST['username'] == $username && password_verify($_POST['password'], $password) ) { 
    26     $_SESSION['username'] = $_POST['username']; 
     26        $_SESSION['timeout'] = time(); 
     27        $_SESSION['username'] = $_POST['username']; 
    2728        header('Location:  ' . $_SERVER['PHP_SELF']); 
    28         $_SESSION['timeout'] = time(); 
    2929      }else { 
    3030          //invalid login 
     
    4444</head> 
    4545<body> 
    46 <? if ($deviceType == "computer" or $deviceType == "tablet") {  
     46<? 
     47  if ( $timeout ) 
     48    echo "Session timed out, please log in again...<br>"; 
     49 
     50  if ($deviceType == "computer" or $deviceType == "tablet") { 
    4751    echo "<div id=\"body\" style=\"height:100%;width:400px;margin-top:0.50em;margin-left:auto;margin-right: auto;\"> 
    4852"; 
    49   } else {  
     53  } else { 
    5054    echo "<div id=\"body\" style=\"height:100%;width:100%;position:absolute;margin-top:0.00em;margin-left:0.00em;\">"; 
    51   }  
     55  } 
    5256?> 
    5357<p><? echo "$perror"; ?></p> 
  • src-webui/appweb/share/html/index.php

    rfe25cb0 r2661608  
    4545    // Bypass if called from localhost 
    4646    if ( $CLIENTIP != "127.0.0.1" and $CLIENTIP != "::1" ) { 
     47      $timeout = false; 
    4748      include('include/login.php'); 
    4849      exit(0); 
     
    5354  if ( $CLIENTIP != "127.0.0.1" and $CLIENTIP != "::1" ) { 
    5455    if ( $_SESSION['timeout'] + 60 * 60 < time() ) { 
    55       echo "Session timed out, please login again..."; 
     56      $timeout = true; 
    5657      include('include/login.php'); 
    5758      exit(0); 
Note: See TracChangeset for help on using the changeset viewer.