[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/admin/ -> db_stats.php (source)

   1  <?php
   2  # Mantis - a php based bugtracking system
   3  
   4  # Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
   5  # Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
   6  
   7  # Mantis 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  # Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.
  19  
  20      # --------------------------------------------------------
  21      # $Id: db_stats.php,v 1.3.2.1 2007-10-13 22:34:54 giallu Exp $
  22      # --------------------------------------------------------
  23  
  24      require_once ( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' );
  25  
  26      # --------------------
  27  	function helper_table_row_count( $p_table ) {
  28          $t_table = $p_table;
  29  
  30          $query = "SELECT COUNT(*) FROM $t_table";
  31          $result = db_query( $query );
  32  
  33          $t_users = db_result( $result );
  34  
  35          return $t_users;
  36      }
  37  
  38  
  39      # --------------------
  40  	function print_table_stats( $p_table_name ) {
  41          $t_count = helper_table_row_count( $p_table_name );
  42          # echo "<tr><td>$p_table_name</td><td>$t_count</td></tr>";
  43          echo "$p_table_name = $t_count records<br />";
  44      }
  45  
  46      echo '<html><head><title>Mantis Database Statistics</title></head><body>';
  47  
  48      echo '<h1>Mantis Database Statistics</h1>';
  49      # echo '<table border="1" width="50%" cellpadding="3" cellspacing="0">';
  50  
  51      print_table_stats( config_get( 'mantis_bug_file_table' ) );
  52      print_table_stats( config_get( 'mantis_bug_history_table' ) );
  53      print_table_stats( config_get( 'mantis_bug_monitor_table' ) );
  54      print_table_stats( config_get( 'mantis_bug_relationship_table' ) );
  55      print_table_stats( config_get( 'mantis_bug_table' ) );
  56      print_table_stats( config_get( 'mantis_bug_text_table' ) );
  57      print_table_stats( config_get( 'mantis_bugnote_table' ) );
  58      print_table_stats( config_get( 'mantis_bugnote_text_table' ) );
  59      print_table_stats( config_get( 'mantis_config_table' ) );
  60      print_table_stats( config_get( 'mantis_custom_field_project_table' ) );
  61      print_table_stats( config_get( 'mantis_custom_field_string_table' ) );
  62      print_table_stats( config_get( 'mantis_custom_field_table' ) );
  63      print_table_stats( config_get( 'mantis_filters_table' ) );
  64      print_table_stats( config_get( 'mantis_news_table' ) );
  65      print_table_stats( config_get( 'mantis_project_category_table' ) );
  66      print_table_stats( config_get( 'mantis_project_file_table' ) );
  67      print_table_stats( config_get( 'mantis_project_hierarchy_table' ) );
  68      print_table_stats( config_get( 'mantis_project_table' ) );
  69      print_table_stats( config_get( 'mantis_project_user_list_table' ) );
  70      print_table_stats( config_get( 'mantis_project_version_table' ) );
  71      print_table_stats( config_get( 'mantis_sponsorship_table' ) );
  72      print_table_stats( config_get( 'mantis_tokens_table' ) );
  73      print_table_stats( config_get( 'mantis_user_pref_table' ) );
  74      print_table_stats( config_get( 'mantis_user_print_pref_table' ) );
  75      print_table_stats( config_get( 'mantis_user_profile_table' ) );
  76      print_table_stats( config_get( 'mantis_user_table' ) );
  77  
  78      # echo '</table>';
  79      echo '</body></html>';
  80  ?>


Généré le : Thu Nov 29 09:42:17 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics