//------------------------------------------------------------------------------ // 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. //------------------------------------------------------------------------------ // Lock/Unlock I/O Doors // // Filename: mc_io_door.htm // // The file provides the mechanism to lock/unlock the library doors through the GUI application. // // // Input: POST data // changestate specify that tha page was submited // // Ouput: POST ('form_out') // displayMessage flag that spechifies that a message was sent to be displayed // errorCode result of operation // returnMessage text information about the operation results // // // Change History: // // Date Defect Changed By Description of Change // ---- ------ ---------- --------------------- // 11/04/2005 roomor01 File Created // //------------------------------------------------------------------------------ include("user_inc.htm"); include('main_inc.htm'); $displayMessage = 0; //$isLocked = true; if($_SERVER[REQUEST_METHOD]=='POST'){ if(isset($_POST['changestate'])){ $newState = $_POST['changestate']; if(strcmp($newState,"Unlock")==0){ unlock_door($user); //$isLocked = false; $displayMessage = 1; $returnMessage = "The I/O station door is now unlocked."; }else{ lock_door($user); //$isLocked = true; $displayMessage = 1; $returnMessage = "The I/O station door is now locked."; } } //$returnMessage = $_REQUEST['returnMessage']; //$errorCode = $_REQUEST['errorCode']; //$displayMessage = $_REQUEST['Message']; } $isLocked = is_door_locked($user); if($isLocked == true){ $buttonName = "Unlock"; $state = "Locked"; }else{ $buttonName = "Lock"; $state = "Unlocked"; } ?>