| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: pclerror.lib.php 10381 2008-06-01 03:35:53Z pasamio $ 4 * @package Joomla 5 */ 6 7 8 // -------------------------------------------------------------------------------- 9 // PhpConcept Library (PCL) Error 1.0 10 // -------------------------------------------------------------------------------- 11 // License GNU/GPL - Vincent Blavet - Mars 2001 12 // http://www.phpconcept.net & http://phpconcept.free.fr 13 // -------------------------------------------------------------------------------- 14 // Fran�ais : 15 // La description de l'usage de la librairie PCL Error 1.0 n'est pas encore 16 // disponible. Celle-ci n'est pour le moment distribu�e qu'avec les 17 // d�veloppements applicatifs de PhpConcept. 18 // Une version ind�pendante sera bientot disponible sur http://www.phpconcept.net 19 // 20 // English : 21 // The PCL Error 1.0 library description is not available yet. This library is 22 // released only with PhpConcept application and libraries. 23 // An independant release will be soon available on http://www.phpconcept.net 24 // 25 // -------------------------------------------------------------------------------- 26 // 27 // * Avertissement : 28 // 29 // Cette librairie a �t� cr��e de fa�on non professionnelle. 30 // Son usage est au risque et p�ril de celui qui l'utilise, en aucun cas l'auteur 31 // de ce code ne pourra �tre tenu pour responsable des �ventuels d�gats qu'il pourrait 32 // engendrer. 33 // Il est entendu cependant que l'auteur a r�alis� ce code par plaisir et n'y a 34 // cach� aucun virus, ni malveillance. 35 // Cette libairie est distribu�e sous la license GNU/GPL (http://www.gnu.org) 36 // 37 // * Auteur : 38 // 39 // Ce code a �t� �crit par Vincent Blavet (vincent@blavet.net) sur son temps 40 // de loisir. 41 // 42 // -------------------------------------------------------------------------------- 43 44 // ----- Look for double include 45 if (!defined("PCLERROR_LIB")) 46 { 47 define( "PCLERROR_LIB", 1 ); 48 49 // ----- Version 50 $g_pcl_error_version = "1.0"; 51 52 // ----- Internal variables 53 // These values must only be change by PclError library functions 54 $g_pcl_error_string = ""; 55 $g_pcl_error_code = 1; 56 57 58 // -------------------------------------------------------------------------------- 59 // Function : PclErrorLog() 60 // Description : 61 // Parameters : 62 // -------------------------------------------------------------------------------- 63 function PclErrorLog($p_error_code=0, $p_error_string="") 64 { 65 global $g_pcl_error_string; 66 global $g_pcl_error_code; 67 68 $g_pcl_error_code = $p_error_code; 69 $g_pcl_error_string = $p_error_string; 70 71 } 72 // -------------------------------------------------------------------------------- 73 74 // -------------------------------------------------------------------------------- 75 // Function : PclErrorFatal() 76 // Description : 77 // Parameters : 78 // -------------------------------------------------------------------------------- 79 function PclErrorFatal($p_file, $p_line, $p_error_string="") 80 { 81 global $g_pcl_error_string; 82 global $g_pcl_error_code; 83 84 $v_message = "<html><body>"; 85 $v_message .= "<p align=center><font color=red bgcolor=white><b>PclError Library has detected a fatal error on file '$p_file', line $p_line</b></font></p>"; 86 $v_message .= "<p align=center><font color=red bgcolor=white><b>$p_error_string</b></font></p>"; 87 $v_message .= "</body></html>"; 88 die($v_message); 89 } 90 // -------------------------------------------------------------------------------- 91 92 // -------------------------------------------------------------------------------- 93 // Function : PclErrorReset() 94 // Description : 95 // Parameters : 96 // -------------------------------------------------------------------------------- 97 function PclErrorReset() 98 { 99 global $g_pcl_error_string; 100 global $g_pcl_error_code; 101 102 $g_pcl_error_code = 1; 103 $g_pcl_error_string = ""; 104 } 105 // -------------------------------------------------------------------------------- 106 107 // -------------------------------------------------------------------------------- 108 // Function : PclErrorCode() 109 // Description : 110 // Parameters : 111 // -------------------------------------------------------------------------------- 112 function PclErrorCode() 113 { 114 global $g_pcl_error_string; 115 global $g_pcl_error_code; 116 117 return($g_pcl_error_code); 118 } 119 // -------------------------------------------------------------------------------- 120 121 // -------------------------------------------------------------------------------- 122 // Function : PclErrorString() 123 // Description : 124 // Parameters : 125 // -------------------------------------------------------------------------------- 126 function PclErrorString() 127 { 128 global $g_pcl_error_string; 129 global $g_pcl_error_code; 130 131 return($g_pcl_error_string." [code $g_pcl_error_code]"); 132 } 133 // -------------------------------------------------------------------------------- 134 135 136 // ----- End of double include look 137 } 138 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |