//------------------------------------------------------------------------------ // Licensed Materials - Property of IBM // (c) Copyright IBM Corporation 2001,2002 All Rights Reserved. // US Government Users Restricted Rights - Use, duplication or disclosure // restricted by GSA ADP Schedule Contract with IBM Corp. //------------------------------------------------------------------------------ // Set Session Timeout // // Filename: ma_set_session_timeout.htm // // This file sets the desired session timeout for inactivity // // // When POST data is recieved, operation result information is retrieved // from the POST data and displayed in the Message Box. // // // Input: POST data // newValue the new value for the session timeout // // // Change History: // // Date Defect Changed By Description of Change // ---- ------ ---------- --------------------- // 01/24/2006 romeog File Created // //------------------------------------------------------------------------------ include('user_inc.htm'); include('main_inc.htm'); include('utils_inc.htm'); // need method for 5, 10 min and never // set_session_timeout($user, 480); // If a post, then this is a return from an operation // retrieve the results of the operation if ($_SERVER['REQUEST_METHOD'] == "POST") { $newValue = $_REQUEST["newValue"]; if ($newValue!="") { if ($newValue<0) { setSessionTimeout($newValue); set_session_timeout($user, 480); $returnMessage="The new session timeout duration is Never."; } else { setSessionTimeout($newValue*60); set_session_timeout($user, $newValue); $returnMessage="The new session timeout duration is ".$newValue." minutes."; } $displayMessage=1; } } //get current value of session timeout $currentValue = getSessionTimeout()/60; if ($currentValue < 0) { $currentValue = -1; } else { $currentValue = get_session_timeout($user); } ?>