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