session_cache_limiter('nocache'); //file needed to set TIMEOUT_SECS include ("session_inc.htm"); // // secret word for creating hash for user cookie validation // $secret_word = "aNyT3xt H3rE 2 aCtt a5 ^{}0rD t0 ch3Kk 0^s wuRd"; define( 'LOGIN_PAGE', 'main_login.htm' ); define( 'LIBTYPE_NAME', 'IBM 3576' ); define( 'LOGIN_REDIRECT_PAGE', 'loginRedirect.htm' ); define( 'HOME_VIEW_PAGE', 'main_IBM3576.htm' ); define( 'SERVICE_USER', 'service' ); define( 'ADMIN_USER', 'admin' ); define( 'ADMIN_ROLE', 'Admin' ); define( 'SERVICE_ROLE', 'Service' ); define( 'SUPERUSER_ROLE', 'SuperUser' ); define( 'USER_ROLE', 'User' ); define( 'TIMEOUT_SECS', 1); //getSessionTimeout() ); // 1800 seconds = 30 minutes*60 define( 'ITEMS_PER_PAGE', 20 ); // # items / page define( 'DRIVES_PER_PAGE', 6 ); // # drives / page define( 'MEDIA_TYPE_ANY', 255 ); // # CMI media type any value // // Sort and Filter Criteria // class SortCriteria { var $sortColumn; var $ascending; var $filterPattern; function SortCriteria($sortColumn = 0, $ascending = true, $filterPattern = "") { $this->sortColumn = $sortColumn; $this->ascending = $ascending; $this->filterPattern = $filterPattern; } }; class NetworkConfiguration { var $hostname; var $ip; var $gateway; var $netmask; function NetworkConfiguration($hostname, $ip, $gateway, $netmask) { $this->hostname = $hostname; $this->ip = $ip; $this->gateway = $gateway; $this->netmask = $netmask; } }; class ReturnStatus { var $cmdErrors = array(); var $errorCode; function ReturnStatus() { $this->numErrors = 0; $this->errorCode = 0; } function setErrorCode( $code ) { $this->errorCode = $code; $this->numErrors++; } function out() { print "
"; return; } }; function errorHandler($error, $message, $filename, $line, $symbols) { $errorType = $error & error_reporting(); $code = 0; List($errMsg,$code) = split(":",$message,2); $errorCode = $code; $returnMessage = $errMsg; // Error types of 0 are internal phgp errors that are handled by php /*######################################################################### # Note: May want to go throught the system and fix all the type 0 errors # It may make php faster. This error handler gets called on errors like # Unidentified symbol PHP_INI assuming 'PHP_INI' #########################################################################*/ if ($errorType != 0) { error_log("******* PHP ERROR HANDLER CAUGHT AN UNEXPECTED ERROR OR WARNING ****"); error_log(" errorType = \"$errorType\""); error_log(" error = \"$error\""); error_log(" message = \"$message\""); error_log(" filename = \"$filename\""); error_log(" line = \"$line\""); // This prints a whole bunch of stuff //error_log(" symbols = \"". print_r($symbols, TRUE ) ."\""); } // This assumes that all our extension errors will be E_WARNING if ($errorType == E_WARNING) { ob_end_clean(); include 'main_error.htm'; exit; } else if ($errorType != 0) { include 'main_error.htm'; exit; } } /**************************************************************** * Return the objects data after converting the Data from * /n to