[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/public_html/admin/install/ -> configinfo.php (source)

   1  <?php
   2  
   3  /* Reminder: always indent with 4 spaces (no tabs). */
   4  // +---------------------------------------------------------------------------+
   5  // | Geeklog 1.4                                                               |
   6  // +---------------------------------------------------------------------------+
   7  // | configinfo.php                                                            |
   8  // |                                                                           |
   9  // | Display contents of config.php                                            |
  10  // +---------------------------------------------------------------------------+
  11  // | Copyright (C) 2002-2006 by the following authors:                         |
  12  // |                                                                           |
  13  // | Authors: Jeffrey Schoolcraft  - dream AT dr3amscap3 DOT com               |
  14  // |          Dirk Haun            - dirk AT haun-online DOT de                |
  15  // +---------------------------------------------------------------------------+
  16  // |                                                                           |
  17  // | This program is free software; you can redistribute it and/or             |
  18  // | modify it under the terms of the GNU General Public License               |
  19  // | as published by the Free Software Foundation; either version 2            |
  20  // | of the License, or (at your option) any later version.                    |
  21  // |                                                                           |
  22  // | This program is distributed in the hope that it will be useful,           |
  23  // | but WITHOUT ANY WARRANTY; without even the implied warranty of            |
  24  // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
  25  // | GNU General Public License for more details.                              |
  26  // |                                                                           |
  27  // | You should have received a copy of the GNU General Public License         |
  28  // | along with this program; if not, write to the Free Software Foundation,   |
  29  // | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
  30  // |                                                                           |
  31  // +---------------------------------------------------------------------------+
  32  //
  33  // $Id: configinfo.php,v 1.5 2006/09/06 05:31:00 ospiess Exp $
  34  
  35  /**
  36  * This script will display file and permission information based on settings in
  37  * config.php  This is meant to be as a support tool when asked questions in #geeklog
  38  *
  39  *
  40  * @author   Jeffrey Schoolcraft <dream@dr3amscap3.com>
  41  *
  42  */
  43  
  44  if (file_exists ('../../../config.php')) {
  45      require_once ('../../../config.php');
  46  } else if (file_exists ('../../lib-common.php')) {
  47      require_once ('../../lib-common.php');
  48  } else {
  49      die ("Sorry, config.php not found ...");
  50  }
  51  
  52  $highlight_on     = '#EFEFEF';
  53  $highlight_off    = '#D9D9D9';
  54  
  55  if (isset ($_CONF['site_url']) &&
  56          strpos ($_CONF['site_url'], 'example.com') === false) {
  57      $docs = $_CONF['site_url'] . '/docs/config.html#desc_';
  58  } else {
  59      $docs = '../../docs/config.html#desc_';
  60  }
  61  
  62  if (isset ($_CONF['mail_settings']['password'])) {
  63      unset ($_CONF['mail_settings']['password']);
  64  }
  65  
  66  $display = "<html>\n<head><title>config.php</title></head>\n<body>\n";
  67  $n = 0;
  68  $display .= '<table width="100%" cellspacing="0" cellpadding="0" border="0" style="border: thin black solid;">';
  69  
  70  foreach($_CONF as $option => $value) {
  71      $display .= '<tr';
  72      if ($n % 2 == 0) {
  73          $display .= ' style="background-color: ' . $highlight_on . '">';
  74      } else {
  75          $display .= ' style="background-color: ' . $highlight_off . '">';
  76      }
  77      $display .= '<td style="border: thin black solid; padding: 2px;"><strong>$_CONF[\'<a href="'
  78                . $docs . $option . '">' . $option . '</a>\']</strong></td>';
  79      if (is_array($value)) {
  80          ob_start();
  81          print_r($value);
  82          $value=nl2br(ob_get_contents());
  83          ob_end_clean();
  84      } elseif (is_bool ($value)) {
  85          $value = ($value === false) ? 'false' : 'true';
  86      } elseif (eregi('[a-z]+html', $option)) {
  87          $value = htmlentities($value);
  88      } elseif (!isset($value)) {
  89          $value = '&nbsp;';
  90      }
  91      $display .= '<td style="border: thin black solid; padding: 2px;"><strong>' . $value . '</strong></td>';
  92      $display .= '</tr>';
  93      $n++;
  94  }
  95  $display .= "</table>\n</body>\n</html>";
  96  
  97  echo $display;


Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics