[ Index ]
 

Code source de bblocked 0.6.5

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/includes/ -> error.php (source)

   1  <?php
   2           /*********************************************************\

   3          ******          bblocked Error Reporting Class         ******

   4         *****                                                     *****

   5        ****               Copyright (C) 2007  bblocked              ****

   6       ***                                                             ***

   7      **  This program is free software; you can redistribute it and/or  **

   8     **   modify it under the terms of the GNU General Public License     **

   9    **    as published by the Free Software Foundation; either version 2   **

  10   **     of the License, or (at your option) any later version.            **

  11   **                                                                       **

  12   **     This program is distributed in the hope that it will be useful,   **

  13    **    but WITHOUT ANY WARRANTY; without even the implied warranty of   **

  14     **   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   **

  15      **  GNU General Public License for more details.                   **

  16       ***                                                             ***

  17        ****                                                         ****

  18         ****               http://www.bblocked.org/               *****

  19          ******                                                 ******

  20           \*********************************************************/
  21  
  22  /* Do not remove, prevents direct file access */

  23  if(!defined('BB'))
  24      die();
  25  
  26  
  27  
  28  
  29  // bblocked Error Reporting engine

  30  
  31  function exit_on_error($url, $class, $type, $die) {
  32      
  33      global $_config;
  34      
  35      $errors = array(
  36      
  37                  'connection' => array(
  38                  
  39                      general        => 'An error occured while trying to connect to the page you requested.',
  40                      
  41                      ftp_connect        => 'Could not connect to the FTP server (<i>'.$url['base'].'</i>).',
  42                      ftp_login        => 'Anonymous login not permited on this server.',
  43                      
  44                      http_notfound    => 'The web site you requested could not be found.',
  45                  ),
  46                  
  47                  
  48                  'request'    => array(
  49                  
  50                      ftp_get        => 'An error occured while atempting to fetch <i>' . $url['file'] . '</i> from the server.',
  51                  )
  52      );
  53      
  54      $safe_url = addcslashes($url['full'], "'");
  55      
  56      print <<<ERROR
  57      
  58  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  59  <html>
  60      <head>
  61          <title>{$_config['title']}</title>
  62  
  63          <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  64          <meta name="robots" content="index, nofollow" />
  65  
  66          <link href="{$_config['template_dir']}/stylesheet.css" rel="stylesheet" type="text/css" />
  67          <link rel="shortcut icon" type="image/ico" href="{$_config['template_dir']}/favicon.ico" />
  68          <script>
  69              <!--
  70                  top.headerFrame.document.f.{$_config['arg_url']}.value='{$safe_url}';
  71              -->
  72          </script>
  73      </head>
  74      
  75      <body style="margin: 2cm;">
  76  
  77      {$errors[$class][$type]}
  78  
  79      </body>
  80  </html>
  81  
  82  ERROR;
  83      
  84      $die ? die : exit(1);
  85  }
  86  
  87  ?>


Généré le : Tue Nov 20 20:31:26 2007 par Balluche grâce à PHPXref 0.7 Clicky Web Analytics