'#996666', // For unused slots 1 => '#00CCCC', // For Partition 1 2 => '#339933', // " " 2 3 => '#CC9966', // " " 3 4 => '#CC3399', // " " 4 5 => '#999900', // " " 5 6 => '#00CC99', // " " 6 7 => '#996600', // " " 7 8 => '#CC3300', // " " 8 9 => '#6699FF', // " " 9 10 => '#FFFF99', // " " 10 11 => '#99CCCC', // " " 11 12 => '#9999CC', // " " 12 13 => '#CC0033', // " " 13 14 => '#33CC33', // " " 14 15 => '#CCFFCC', // " " 15 16 => '#9933FF', // " " 16 17 => '#FF00CC', // " " 17 18 => '#999966', // " " 18 19 => '#CC6600', // For Mailboxes 20 => '#6666CC', // For Cleaning Slots 21 => '#663366', // For Unavailable Slots 22 => '#FFFFFF' // For Selected Slot or Drive ); $SlotColorsHover = array( 0 => '#CC9999', // For unused slots 1 => '#00FFFF', // For Partition 1 2 => '#99CC99', // " " 2 3 => '#FFCC99', // " " 3 4 => '#FF99CC', // " " 4 5 => '#CCCC00', // " " 5 6 => '#66FFCC', // " " 6 7 => '#cc9900', // " " 7 8 => '#FF6600', // " " 8 9 => '#99CCFF', // " " 9 10 => '#FFFF00', // " " 10 11 => '#CCFFFF', // " " 11 12 => '#CCCCFF', // " " 12 13 => '#FF0033', // " " 13 14 => '#66FF33', // " " 14 15 => '#CCFF99', // " " 15 16 => '#9966CC', // " " 16 17 => '#FF66FF', // " " 17 18 => '#CCCC99', // " " 18 19 => '#FF9900', // For Mailboxes 20 => '#6666FF', // For Cleaning Slots 21 => '#996699', // For Unavailable Slots 22 => '#FFFFFF' // For Selected Slot or Drive ); session_cache_limiter('nocache'); // // secret word for creating hash for user cookie validation // $secret_word = "aD(C's #redat0r w^l! se1l bil1ions &~d bi{1ions"; // Get the string and timestamp of the library's date so we use the library's clock even in JavaScript when needed. $sLibDate = date('m/d/Y',time()); $iLibDate = time(); error_log("Today is ".$sLibDate." (".$iLibDate.")" ); // Brand the GUI according to the env var /*########################################################################## # NOTE: This code is duplicated in common_inc.htm. I was unable to include # this file through the php include fuction. I got errors stating # we were trying to send headers twice and could not start the php # session. # So for now there are two places this code will need edited ###########################################################################*/ // Try the GUI override first $Brand = getenv(ADICLIBRARY_BRAND_GUI); if( $Brand == "" ) $Brand = getenv(ADICLIBRARY_BRAND); error_log("\n************* Loading Page \"". $_SERVER[REQUEST_URI] . "\" which was called from \"" . $_SERVER[HTTP_REFERER] . "\" with a ". $_SERVER[REQUEST_METHOD] ."\n************* Branded as " .$Brand. "" ); switch( $Brand ) { case 'ibm': define( 'LIBTYPE_BRAND', 'IBM' ); define( 'LIBTYPE_NAME', 'Scalar i500 (IBM)' ); define( 'LIBRARY_LOGO', 'images/adiclogo.gif' ); define( 'LIB_CM_IMAGE', 'images/5U-CM.gif' ); define( 'HELP_PATH', '/RoboHelp/Predator_OnlineHelp.htm>adicwindow' ); define( 'EKM_TEXT', 'EKM' ); break; case 'dell': define( 'LIBTYPE_BRAND', 'DELL' ); define( 'LIBTYPE_NAME', 'ML6000' ); define( 'LIBRARY_LOGO', 'images/delllogo.gif' ); define( 'LIB_CM_IMAGE', 'images/5U-CM_DELL.gif' ); define( 'HELP_PATH', '/RoboHelpDell/Predator_OnlineHelp.htm>dellwindow' ); define( 'EKM_TEXT', 'EKM' ); break; case 'tandberg': define( 'LIBTYPE_BRAND', 'Tandberg' ); define( 'LIBTYPE_NAME', 'StorageLibrary T128' ); define( 'LIBRARY_LOGO', 'images/tandberglogot128.gif' ); define( 'LIB_CM_IMAGE', 'images/5U-CM.gif' ); define( 'HELP_PATH', '/RoboHelpTandberg/Predator_OnlineHelp.htm>tandbergwindow' ); define( 'EKM_TEXT', 'EKM' ); break; case 'adic': define( 'LIBTYPE_BRAND', 'ADIC' ); define( 'LIBTYPE_NAME', 'Scalar i500' ); define( 'LIBRARY_LOGO', 'images/adiclogo.gif' ); define( 'LIB_CM_IMAGE', 'images/5U-CM.gif' ); define( 'HELP_PATH', '/RoboHelp/Predator_OnlineHelp.htm>adicwindow' ); define( 'EKM_TEXT', 'EKM' ); break; default: error_log("* * * No Branding - defaulting to Quantum"); case 'quantum': define( 'LIBTYPE_BRAND', 'QUANTUM' ); define( 'LIBTYPE_NAME', 'Scalar i500' ); define( 'LIBRARY_LOGO', 'images/L_QM_MdRGB_pb.gif' ); define( 'LIB_CM_IMAGE', 'images/5U-CM.gif' ); define( 'HELP_PATH', '/RoboHelp/Predator_OnlineHelp.htm>adicwindow' ); define( 'EKM_TEXT', 'EKM' ); break; } error_log("------------------------------- LIBTYPE_NAME = ". LIBTYPE_NAME ); define( 'LOGIN_PAGE', 'index.htm' ); define( 'LOGOFF_PAGE', 'logoff.htm' ); define( 'LOGIN_REDIRECT_PAGE', 'loginRedirect.htm' ); define( 'HOME_VIEW_PAGE', 'homeview.htm' ); define( 'PROGESS_WINDOW', 'progressWindow.htm' ); define( 'SERVICE_USER', 'service' ); define( 'ILINK_USER', 'ilinkacc' ); define( 'ADMIN_USER', 'admin' ); define( 'ADMIN_ROLE', 'Admin' ); define( 'SERVICE_ROLE', 'Service' ); define( 'USER_ROLE', 'User' ); define( 'TIMEOUT_SECS', 1800 ); // 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 define( 'REBOOT_FLAG_FILE', '/tmp/FLAG_FILE_R' ); define( 'REBOOT_TIMEOUT', 10000 ); define( 'MIN_FREE_DISK', (27000000*2) ); // Twice the size of the largest known FDM file of 27MB // NOTE: Becasue this is the title/tool tip of all DNS fields - it needs to be short enough it does not get cut off. // Titles/ToolTips can not be multiline. define( 'HOST_IP_ALL_MSG', 'Host names may be entered if DNS is configured; otherwise enter IPv4 or IPv6 addresses only.'); define( 'HOST_IP_V4_MSG', 'Host names may be entered if DNS is configured; otherwise enter IPv4 addresses only.'); define( 'HOST_IP_V6_MSG', 'Host names may be entered if DNS is configured; otherwise enter IPv6 addresses only.'); define( 'IP_ALL_MSG', 'Enter IPv4 or IPv6 addresses only.'); define( 'IP_V4_MSG', 'Enter IPv4 addresses only.'); define( 'IP_V6_MSG', 'Enter IPv6 addresses only.'); define( 'ROBOHELP_ID', 'helpTag' ); // // RoboHelp Map file for PHP // define( "Using_the_Home_Page", 1 ); define( "Using_the_Setup_Wizard", 2 ); define( "Setting_Up_Partitions", 3 ); define( "Configuring_Cleaning_Slots", 4 ); define( "Configuring_Mailboxes", 5 ); define( "Selecting_Drive_IDs_and_Drive_Types", 6 ); define( "Licensing", 7 ); define( "Setting_Up_Email_Notificaitons", 8 ); define( "Setting_Up_Email_Accounts", 9 ); define( "Modifying_Contact_Information", 10 ); define( "Setting_Up_User_Accounts", 11 ); define( "Setting_the_Date_and_Time", 12 ); define( "Moving_Media", 13 ); define( "Importing_Media", 14 ); define( "Exporting_Media", 15 ); define( "Importing_Cleaning_Media", 16 ); define( "Exporting_Cleaning_Media", 17 ); define( "Changing_the_Partition_Mode", 18 ); define( "Loading_Drives", 19 ); define( "Unloading_Drives", 20 ); define( "Changing_the_Drive_Mode", 21 ); define( "Reset_Defaults", 22 ); define( "Locking_Unlocking_Mailboxes", 23 ); define( "Viewing_Action_Request_Details", 24 ); define( "Capturing_the_Library_Snapshot", 25 ); define( "Identifying_Ports", 26 ); define( "Updating_Library_Firmware", 27 ); define( "Updating_Drive_Firmware", 28 ); define( "Viewing_the_System_Configuration", 29 ); define( "Viewing_Library_Configuration", 30 ); define( "Selecting_the_Control_Path", 31 ); define( "Viewing_Network_Settings", 32 ); define( "Viewing_Logged_in_Users", 33 ); define( "Viewing_Storage_Slots", 34 ); define( "About_the_Scalar_i500", 35 ); define( "Shutting_Down_Library", 36 ); define( "About_Saving_Restoring_the_Configuration", 37 ); define( "About_the_Service_Menu", 38 ); define( "About_LDAP", 39 ); define( "Network_Configuration", 40 ); define( "Open_Source_License_Agreement", 41 ); define( "IOB_Information", 42 ); define( "IOB_Port_Information", 43 ); define( "IOB_Port_Configuration", 44 ); define( "IOB_Data_Path_Conditioning", 45 ); define( "IOB_Host_Port_Failover", 46 ); define( "IOB_Channel_Zoning", 47 ); define( "IOB_Host_Mapping", 48 ); define( "IOB_Host_Management", 49 ); define( "IOB_Blade_Control", 50 ); define( "Email_Configuration_Record", 51); define( "SNMP_Configuration", 52); define( "Creating_FUP_Tapes", 53); define( "Erasing_FUP_Tapes", 54); define( "Drive_FW_Using_FUP_Tape", 55); define( "Drive_FW_Using_Image_File", 56); define( "Retrieving_Tape_Drive_Logs", 57); define( "Retrieving_Tape_Drive_Sled_Logs", 58); define( "About_Cleaning_Tape_Drives", 59); define( "About_Drive_Firmware_Autoleveling", 60 ); define( "SNMP_Traps", 61); define( "SetupEKMSys", 62); define( "SetupEKMPar", 63); define( "SetupIPv6", 64); define( "SetupIPv4", 65); define( "SetupHostDNS", 66); define( "Reset_Drives", 67); define( "Drive_Utilization", 68); define( "Media_Integrity", 69); define( "EKM_Path_Diag", 70); define( "SetupSystemSettings", 71); define( 'Upload_Drive_FW_Autolevel', 72); define( 'Viewing_Library_Logs', 73); define( 'About_Library_Diagnostics', 74); define( 'Media_Tests', 75); define( 'Robotics_Test', 76); define( 'QKM_Cert_Import', 77); define( 'QKM_Cert_Export', 78); define( 'QKM_Key_Import', 79); define( 'QKM_Key_Export', 80); define( 'QKM_Key_Report', 81); define( 'MediaSecuritySetup', 82); define( 'SetupEKMParDell', 83); define( 'Retrieving_QKM_Logs', 84); define( 'SetupEKMSysDell', 85); define( 'HostAccess', 86); define( 'TLS_Cert_Import', 87); define( 'AR_Receiver_addr', 88 ); // // 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; var $extraText = ""; function ReturnStatus() { $this->numErrors = 0; $this->errorCode = 0; $this->operationGuid = 0; $this->operation = 'NoOp'; } function setErrorCode( $code ) { $this->errorCode = $code; $this->numErrors++; } function setExtraText( $text ) { $this->extraText = $text; } function out() { error_log("------------------------------------------------ In out()"); print "
"; return; } function out_complete( $bContinueOnError=false ) { error_log("------------------------------------------------ In out_complete(". ($bContinueOnError?"TRUE":"FALSE") .")"); print " "; return; } function closeOut( $bCloseWindow ) { error_log("------------------------------------------------ In closeOut($bCloseWindow)"); if( $bCloseWindow == 1 ) print " "; return; } function closeMsg( $bCloseWindow, $text ) { error_log("------------------------------------------------ In closeOut($bCloseWindow, $text)"); if( $bCloseWindow == 1 ) print " "; return; } function checkStatus( $theOp, $theFileName, $theOpID ) { error_log("------------------------------------------------ In checkStatus()"); $this->operation = $theOp; error_log("Setting operation to ". $theOp ); print "" . "" . ""; return; } function checkQKMProgress( $theOp, $theFileName ) { error_log("------------------------------------------------ In checkProgress()\n\n\n\n"); $this->operation = $theOp; error_log("Setting operation to ". $theOp ); print "" . "" . ""; return; } }; function errorHandler($error, $message, $filename, $line, $symbols) { global $in_xAjax; global $xAjax_objResponse; $errorType = $error & error_reporting(); $code=0; // Note: this var is used inside systemError.htm below List($errMsg,$code) = split(":",$message,2); // 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) { if( $code == '35' ) { error_log( "******************************************************" ); error_log( "* Split-Sic – Library has not been fully initialized *" ); error_log( "******************************************************\n\n" ); } 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 ) ."\""); } /********************************************************************** * If in an xajax function we can not exit or xajax will display an * internal error. So just fill out a alert and return. **********************************************************************/ if( $in_xAjax ) { error_log( "In the xAjax part of the error handler with an error '". $code ."'" ); $xAjax_objResponse->script('alert("The library returned an Error \"'. $code .'\", with the message of\n\"'. $errMsg .'\"\nPlease check the RAS Tickets and try the operation again.");'); // $xAjax_objResponse->script('alert(xajax.viewSource());'); return $code; } // This assumes that all our extension errors will be E_WARNING if ($errorType == E_WARNING) { ob_end_clean(); // A user action that uses an operation in progress dialog // should have this variable in scope before the extension // call is made if ($symbols['operationInProgress']) { $status = new ReturnStatus(); $status->setErrorCode($code); $status->out(); exit; } else { include 'systemError.htm'; exit; } } else if ($errorType != 0) { //echo "$error $message $filename $line"; include 'systemError.htm'; exit; } } /**************************************************************** * Return the objects data after converting the Data from * /n to