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 "
"; 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
and ' ' to   * Netscape - Works * Explorer - Works ****************************************************************/ function getObjData( $aObj ) { $l = print_r($aObj, TRUE); $l = str_replace("\n", "
", $l); $l = str_replace(' ', ' ', $l); return $l; } set_error_handler("errorHandler"); ob_start(); ?>