[ Index ]
 

Code source de Dotclear 1.2.5

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

title

Body

[fermer]

/ecrire/tools/info/ -> index.php (source)

   1  <?php
   2  # ***** BEGIN LICENSE BLOCK *****
   3  # This file is part of DotClear.
   4  # Copyright (c) 2004 Olivier Meunier and contributors. All rights
   5  # reserved.
   6  #
   7  # DotClear is free software; you can redistribute it and/or modify
   8  # it under the terms of the GNU General Public License as published by
   9  # the Free Software Foundation; either version 2 of the License, or
  10  # (at your option) any later version.
  11  # 
  12  # DotClear 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  # You should have received a copy of the GNU General Public License
  18  # along with DotClear; if not, write to the Free Software
  19  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20  #
  21  # ***** END LICENSE BLOCK *****
  22  
  23  buffer::str(
  24  '<h2>'.__('Informations').'</h2>'.
  25  '<h3>'.__('General informations').'</h3>'
  26  );
  27  
  28  # Version de dotclear
  29  buffer::str(
  30  sprintf(__('You are using DotClear version %s'),'<strong>'.DC_VERSION.'</strong>').'</p>'
  31  );
  32  
  33  # Les tables de la base de données
  34  $rs = $con->select('SHOW TABLE STATUS LIKE \''.DB_PREFIX.'%\'');
  35  
  36  buffer::str(
  37  '<p>'.__('DotClear tables in your database are').'&nbsp;:</p>'.
  38  '<table class="clean-table">'.
  39  '<tr><th>'.__('Name').'</th><th>'.__('Records').'</th><th>'.__('Size').'</th></tr>'
  40  );
  41  
  42  while ($rs->fetch())
  43  {
  44      buffer::str(
  45      '<tr>'.
  46      '<td>'.$rs->f('name').'</td>'.
  47      '<td>'.$rs->f('rows').'</td>'.
  48      '<td>'.files::size($rs->f('Data_length')+$rs->f('Index_length')).'</td>'.
  49      '</tr>'
  50      );
  51  }
  52  buffer::str('</table>');
  53  
  54  buffer::str(
  55  '<h3>'.__('Files informations').'</h3>'.
  56  '<p>'.__('Files or directories permissions. If a file or a folder from this '.
  57  'list is not writable, it wont prevent DotClear to work properly. It will only '.
  58  'prevent some tools to work.').'</p>'
  59  );
  60  
  61  $img_check = '<img src="images/check_%s.png" alt="" />';
  62  
  63  if (is_writable(dirname(__FILE__).'/../../../conf/dotclear.ini')) {
  64      buffer::str(
  65      '<p>'.sprintf($img_check,'on').' '.
  66      sprintf(__('File %s is writable.'),'conf/dotclear.ini').
  67      '</p>'
  68      );
  69  } else {
  70      buffer::str(
  71      '<p>'.sprintf($img_check,'off').' '.
  72      sprintf(__('File %s is not writable.'),'conf/dotclear.ini').
  73      '</p>'
  74      );
  75  }
  76  
  77  if (is_writable(dirname(__FILE__).'/../../../conf/UPDATE')) {
  78      buffer::str(
  79      '<p>'.sprintf($img_check,'on').' '.
  80      sprintf(__('File %s is writable.'),'conf/UPDATE').
  81      '</p>'
  82      );
  83  } else {
  84      buffer::str(
  85      '<p>'.sprintf($img_check,'off').' '.
  86      sprintf(__('File %s is not writable.'),'conf/UPDATE').
  87      '</p>'
  88      );
  89  }
  90  
  91  if (is_writable(dc_img_root)) {
  92      buffer::str(
  93      '<p>'.sprintf($img_check,'on').' '.
  94      sprintf(__('Directory %s is writable.'),dc_img_root).
  95      '</p>'
  96      );
  97  } else {
  98      buffer::str(
  99      '<p>'.sprintf($img_check,'off').' '.
 100      sprintf(__('Directory %s is not writable.'),dc_img_root).
 101      '</p>'
 102      );
 103  }
 104  
 105  if (is_writable(dirname(__FILE__).'/../../../themes')) {
 106      buffer::str(
 107      '<p>'.sprintf($img_check,'on').' '.
 108      sprintf(__('Directory %s is writable.'),'themes/').
 109      '</p>'
 110      );
 111  } else {
 112      buffer::str(
 113      '<p>'.sprintf($img_check,'off').' '.
 114      sprintf(__('Directory %s is not writable.'),'themes/').
 115      '</p>'
 116      );
 117  }
 118  
 119  if (is_writable(dirname(__FILE__).'/../')) {
 120      buffer::str(
 121      '<p>'.sprintf($img_check,'on').' '.
 122      sprintf(__('Directory %s is writable.'),DC_ECRIRE.'/tools').
 123      '</p>'
 124      );
 125  } else {
 126      buffer::str(
 127      '<p>'.sprintf($img_check,'off').' '.
 128      sprintf(__('Directory %s is not writable.'),DC_ECRIRE.'/tools').
 129      '</p>'
 130      );
 131  }
 132  
 133  if (is_writable(DC_SHARE_DIR)) {
 134      buffer::str(
 135      '<p>'.sprintf($img_check,'on').' '.
 136      sprintf(__('Directory %s is writable.'),'share/').
 137      '</p>'
 138      );
 139  } else {
 140      buffer::str(
 141      '<p>'.sprintf($img_check,'off').' '.
 142      sprintf(__('Directory %s is not writable.'),'share/').
 143      '</p>'
 144      );
 145  }
 146  
 147  if (!defined('DC_UPDATE_FILE_W') || !DC_UPDATE_FILE_W) {
 148      buffer::str(
 149      '<p><strong>'.__('Important').'&nbsp;:</strong> '.
 150      sprintf(__('the file %s is not writable. While this does not prevent '.
 151      'DotClear from running, you should consider changing this for performance '.
 152      'reasons (HTTP cache).'),'conf/UPDATE')
 153      );
 154  }
 155  
 156  buffer::str(
 157  '<h3>'.__('Server informations').'</h3>'.
 158  '<p>'.sprintf(__('Your PHP version is %s'),'<strong>'.phpversion().'</strong>').'</p>'
 159  );
 160  
 161  
 162  if (($rs = $con->select('SELECT VERSION() AS version')) !== false)
 163  {
 164      $mysql_version = preg_replace('/-log$/','',$rs->f(0));
 165      buffer::str(
 166      '<p>'.sprintf(__('Your MySQL version is %s'),
 167      '<strong>'.preg_replace('/-log$/','',$rs->f(0)).'</strong>').'</p>'
 168      );
 169      
 170      $mysql_version = preg_replace('/-log$/','',$rs->f(0));
 171  }
 172  
 173  if (!empty($_SERVER["SERVER_SOFTWARE"])) {
 174      buffer::str(
 175      '<p>'.sprintf(__('Your Web server is %s'),
 176      '<strong>'.$_SERVER["SERVER_SOFTWARE"].'</strong>').'</p>'
 177      );
 178  }
 179  
 180  
 181  
 182  ?>


Généré le : Fri Feb 23 21:40:15 2007 par Balluche grâce à PHPXref 0.7