<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0068)http://127.1/code/source.php?url=./projects/csv-htmltable/errOut.inc -->
<HTML><HEAD><TITLE>Source Display</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY>
<TABLE width="100%" align=center bgColor=#6699cc>
<TBODY>
<TR>
<TD align=middle><B>Source listing for <PRE>errOut.inc</PRE></B></TD></TR></TBODY></TABLE><CODE><FONT
color=#000000><FONT color=#0000bb><?php <BR></FONT><FONT
color=#ff8000>/****************************************************************************************
<BR>* CSV2HTML - PHP code by Srinivasan Ramakrishnan, cheeni@bigfoot.com *
<BR>* http://www.sriniram.com, 03/FEB/2001 *
<BR>* Free for non-commercial use. For commercial use please contact author. *
<BR>* No warranties of correctness are extended for non-commercial usage. *
<BR>****************************************************************************************/
<BR>/* This is the error output function of CSV2HTML
<BR> Change this as desired to manipulate output errors.
<BR>*/ <BR></FONT><FONT color=#007700>function </FONT><FONT
color=#0000bb>errOut</FONT><FONT color=#007700>(</FONT><FONT
color=#0000bb>$errMsg</FONT><FONT color=#007700>,</FONT><FONT
color=#0000bb>$priority</FONT><FONT color=#007700>){
<BR> switch(</FONT><FONT
color=#0000bb>$priority</FONT><FONT color=#007700>){
<BR> case </FONT><FONT color=#0000bb>0</FONT><FONT
color=#007700>: </FONT><FONT color=#0000bb>$start </FONT><FONT
color=#007700>= </FONT><FONT color=#dd0000>"<h1>"</FONT><FONT
color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$end </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"</h1>"</FONT><FONT color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$errLevel </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"FATAL ERROR: (0)"</FONT><FONT color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$color </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"#FF0000"</FONT><FONT color=#007700>;
<BR> break;
<BR> case </FONT><FONT color=#0000bb>1</FONT><FONT
color=#007700>: </FONT><FONT color=#0000bb>$start </FONT><FONT
color=#007700>= </FONT><FONT color=#dd0000>"<h2>"</FONT><FONT
color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$end </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"</h2>"</FONT><FONT color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$errLevel </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"ERROR: (1)"</FONT><FONT color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$color </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"#cc3300"</FONT><FONT color=#007700>;
<BR> break;
<BR> case </FONT><FONT color=#0000bb>2</FONT><FONT
color=#007700>: </FONT><FONT color=#0000bb>$start </FONT><FONT
color=#007700>= </FONT><FONT color=#dd0000>"<h3>"</FONT><FONT
color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$end </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"</h3>"</FONT><FONT color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$errLevel </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"WARNING: (2)"</FONT><FONT
color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$color </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"#ff9900"</FONT><FONT color=#007700>;
<BR> break;
<BR> case </FONT><FONT color=#0000bb>3</FONT><FONT
color=#007700>: </FONT><FONT color=#0000bb>$start </FONT><FONT
color=#007700>= </FONT><FONT color=#dd0000>"<h4>"</FONT><FONT
color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$end </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"</h4>"</FONT><FONT color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$errLevel </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"NOTE: (3)"</FONT><FONT
color=#007700>;
<BR> </FONT><FONT
color=#0000bb>$color </FONT><FONT color=#007700>= </FONT><FONT
color=#dd0000>"Yellow"</FONT><FONT color=#007700>;
<BR> break;
<BR> } <BR>
<BR> echo </FONT><FONT
color=#0000bb>$start </FONT><FONT color=#007700>. </FONT><FONT
color=#dd0000>'<font color="' </FONT><FONT
color=#007700>. </FONT><FONT color=#0000bb>$color </FONT><FONT
color=#007700>.</FONT><FONT color=#dd0000>'">' </FONT><FONT
color=#007700>. </FONT><FONT color=#dd0000>"<b>" </FONT><FONT
color=#007700>. </FONT><FONT color=#0000bb>$errLevel </FONT><FONT
color=#007700>.</FONT><FONT
color=#dd0000>"</b><br><i>"</FONT><FONT
color=#007700>. </FONT><FONT color=#0000bb>$errMsg </FONT><FONT
color=#007700>.</FONT><FONT color=#dd0000>"</i></font>"</FONT><FONT
color=#007700>. </FONT><FONT color=#0000bb>$end</FONT><FONT color=#007700>;
<BR>} <BR></FONT><FONT color=#0000bb>?></FONT> </FONT></CODE>
<TABLE width="100%" align=center bgColor=#6699cc>
<TBODY>
<TR>
<TD align=middle><STRONG>Last modified: Saturday
03/February/2001</STRONG></TD></TR></TBODY></TABLE></BODY></HTML>
|