Source for file class.error.inc.php
Documentation is available at class.error.inc.php
/***************************************************************************
* Copyright (C) 2006 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
// $Id: class.error.inc.php,v 1.9 2007/02/11 15:57:17 bigmichi1 Exp $
// Array which holds the error messages
// current number of errors encountered
* @param strCommand string Command, which cause the Error
* @param strMessage string additional Message, to describe the Error
* @param intLine integer on which line the Error occours
* @param strFile string in which File the Error occours
function addError( $strCommand, $strMessage, $intLine, $strFile ) {
* @param strMessage string Warning message to display
* @return string string which contains a HTML table which can be used to echo out the errors
$strHTMLhead =
"<table width=\"100%\" border=\"0\">\n"
.
"\t\t<td><font size=\"-1\"><b>File</b></font></td>\n"
.
"\t\t<td><font size=\"-1\"><b>Line</b></font></td>\n"
.
"\t\t<td><font size=\"-1\"><b>Command</b></font></td>\n"
.
"\t\t<td><font size=\"-1\"><b>Message</b></font></td>\n"
$strHTMLfoot =
"</table>\n";
if( $arrLine['command'] ==
"WARN" ) {
$strWARNString .=
"<font size=\"-1\"><b>WARNING: " .
str_replace( "\n", "<br>", htmlspecialchars( $arrLine['message'] ) ) .
"</b></font><br>\n";
$strHTMLString .=
"\t<tr>\n"
.
"\t\t<td><font size=\"-1\">" .
htmlspecialchars( $arrLine['file'] ) .
"</font></td>\n"
.
"\t\t<td><font size=\"-1\">" .
$arrLine['line'] .
"</font></td>\n"
.
"\t\t<td><font size=\"-1\">" .
htmlspecialchars( $arrLine['command'] ) .
"</font></td>\n"
if( !empty( $strHTMLString ) ) {
$strHTMLString =
$strWARNString .
$strHTMLhead .
$strHTMLString .
$strHTMLfoot;
$strHTMLString =
$strWARNString;
* @return true there are errors logged
Documentation generated on Mon, 17 Nov 2008 01:10:23 +0100 by phpDocumentor 1.4.0