[ Index ]
 

Code source de phpMyAdmin 2.10.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/ -> server_variables.php (source)

   1  <?php
   2  /* $Id: server_variables.php 9779 2006-12-06 18:07:06Z lem9 $ */
   3  // vim: expandtab sw=4 ts=4 sts=4:
   4  
   5  if ( ! defined( 'PMA_NO_VARIABLES_IMPORT' ) ) {
   6      define( 'PMA_NO_VARIABLES_IMPORT', true );
   7  }
   8  require_once  './libraries/common.lib.php';
   9  
  10  /**
  11   * Does the common work
  12   */
  13  require  './libraries/server_common.inc.php';
  14  
  15  
  16  /**
  17   * Displays the links
  18   */
  19  require  './libraries/server_links.inc.php';
  20  
  21  
  22  /**
  23   * Displays the sub-page heading
  24   */
  25  echo '<h2>' . "\n"
  26     . ($cfg['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" alt="" />' : '' )
  27     . '' . $strServerVars . "\n"
  28     . '</h2>' . "\n";
  29  
  30  
  31  /**
  32   * Sends the queries and buffers the results
  33   */
  34  if (PMA_MYSQL_INT_VERSION >= 40003) {
  35      $serverVars = PMA_DBI_fetch_result('SHOW SESSION VARIABLES;', 0, 1);
  36      $serverVarsGlobal = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES;', 0, 1);
  37  } else {
  38      $serverVars = PMA_DBI_fetch_result('SHOW VARIABLES;', 0, 1);
  39  }
  40  
  41  
  42  /**
  43   * Displays the page
  44   */
  45  ?>
  46  <table class="data">
  47  <thead>
  48  <tr><th><?php echo $strVar; ?></th>
  49      <th>
  50  <?php
  51  if (PMA_MYSQL_INT_VERSION >= 40003) {
  52      echo $strSessionValue . ' / ' . $strGlobalValue;
  53  } else {
  54      echo $strValue;
  55  }
  56  ?>
  57      </th>
  58  </tr>
  59  </thead>
  60  <tbody>
  61  <?php
  62  $odd_row = true;
  63  foreach ($serverVars as $name => $value) {
  64      ?>
  65  <tr class="<?php
  66      echo $odd_row ? 'odd' : 'even';
  67      if (PMA_MYSQL_INT_VERSION >= 40003
  68       && $serverVarsGlobal[$name] !== $value) {
  69          echo ' marked';
  70      }
  71      ?>">
  72      <th nowrap="nowrap">
  73          <?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?></th>
  74      <td class="value"><?php
  75      if (strlen($value) < 16 && is_numeric($value)) {
  76          echo PMA_formatNumber($value, 0);
  77          $is_numeric = true;
  78      } else {
  79          echo htmlspecialchars($value);
  80          $is_numeric = false;
  81      }
  82      ?></td>
  83      <?php
  84      if (PMA_MYSQL_INT_VERSION >= 40003
  85       && $serverVarsGlobal[$name] !== $value) {
  86          ?>
  87  </tr>
  88  <tr class="<?php
  89      echo $odd_row ? 'odd' : 'even';
  90      ?> marked">
  91      <td>(<?php echo $strGlobalValue; ?>)</td>
  92      <td class="value"><?php
  93      if ($is_numeric) {
  94          echo PMA_formatNumber($serverVarsGlobal[$name], 0);
  95      } else {
  96          echo htmlspecialchars($serverVarsGlobal[$name]);
  97      }
  98      ?></td>
  99      <?php } ?>
 100  </tr>
 101      <?php
 102      $odd_row = !$odd_row;
 103  }
 104  ?>
 105  </tbody>
 106  </table>
 107  <?php
 108  
 109  
 110  /**
 111   * Sends the footer
 112   */
 113  require_once  './libraries/footer.inc.php';
 114  
 115  ?>


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