[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_handlers/ -> pclerror.lib.php (source)

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


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7