Location: PHPKode > projects > Plici > view/error_doc/error.php
<?php   /*
   *@=@=@=@ START LICENSE @=@=@=@*
   Copyright or Copr. Stephane TRICHET and Nicolas SOTRON
   hide@address.com and hide@address.com
   This software is a computer program whose purpose is to make a
   web hosting platform
   This software is governed by the CeCILL  license under French law and
   abiding by the rules of distribution of free software.  You can  use, 
   modify and/ or redistribute the software under the terms of the CeCILL
   license as circulated by CEA, CNRS and INRIA at the following URL
   As a counterpart to the access to the source code and  rights to copy,
   modify and redistribute granted by the license, users are provided only
   with a limited warranty  and the software's author,  the holder of the
   economic rights,  and the successive licensors  have only  limited
   In this respect, the user's attention is drawn to the risks associated
   with loading,  using,  modifying and/or developing or reproducing the
   software by the user in light of its specific status of free software,
   that may mean  that it is complicated to manipulate,  and  that  also
   therefore means  that it is reserved for developers  and  experienced
   professionals having in-depth computer knowledge. Users are therefore
   encouraged to load and test the software's suitability as regards their
   requirements in conditions enabling the security of their systems and/or 
   data to be ensured and,  more generally, to use and operate it in the 
   same conditions as regards security. 
   The fact that you are presently reading this means that you have had
   knowledge of the CeCILL license and that you accept its terms.
   *@=@=@=@ END   LICENSE @=@=@=@*

 * PLICI error web page
 * @author SimpliciWeb
 * @version $Id: error.php 1764 2009-09-01 10:53:34Z stephanet $
 * @package Common
 * @subpackage FrameWork

      $_GET['num'] = substr(preg_replace('/[^0-9]/', '', $_GET['num']), 0, 3);
      $error_message = "";
      $error_title = $_GET['num'];
      switch ($_GET['num']) { 
       case '400': 
          $error_title = "Bad request";
          $error_message = "The request had bad syntax or was inherently impossible to be satisfied.";
       case '401': 
          $error_title = "Unauthorized";
          $error_message = "The parameter to this message gives a specification of authorization schemes which are acceptable. The client should retry the request with a suitable Authorization header.";
       case '403': 
          $error_title = "Forbidden";
          $error_message = "The request is for something forbidden. Authorization will not help.";
       case '404': 
          $error_title = "Not found";
          $error_message = "The server has not found anything matching the URI given.";
       case '500': 
          $error_title = "Internal Error";
          $error_message = "The server encountered an unexpected condition which prevented it from fulfilling the request.";

      if (isset($plicirewriting_suite_msg))
        $error_message .= "\n<br/><br/><strong>Plici error message:</strong>&nbsp;&nbsp;<em>".$plicirewriting_suite_msg."</em>";

      /* système de test de l'existance d'une gestion des erreurs HTTP
          dans le site en lui même, sinon on prend le système général
      $siteinfo = new siteInformation();
      $error_replacement_file = 

      header("HTTP/1.x ".$_GET['num']." ".$error_title);
   	  header("Status: ".$_GET['num']." ".$error_title);

      if (file_exists($error_replacement_file)) {

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 	   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  lang="fr" xml:lang="fr-fr">
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" href="/view/error_doc/css/css.css" />
  <body >
    <table class="setup_window" cellpadding="0" cellspacing="0">
        <th class="setup_window">
          &gt; Error '<?php  echo($error_title);?>' :
        <td valign="top" class="setup_window">       
          <?php  echo($_GET['num']);?> : <?php  echo($error_message);?><br/>
          Request URI : <?php  echo($_SERVER['REQUEST_URI']);?>
          <hr style="margin-top: 20px;"/>
          <a href='javascript:history.go(-1);' class='button' id='back' style='float: left;' onclick="javascript:history.go(-1);return false;">&lt; Back</a>
Return current item: Plici