Correction oubli initialisation de i=0 pour boucle affichant la liste des proprits mysql.

Conditionnement de l'accs au droit user->admin.
Remplacement des border=0/1 par class="noborder/border"
This commit is contained in:
Laurent Destailleur 2004-02-15 00:06:47 +00:00
parent ecf819ea2c
commit 6d50f289b2
3 changed files with 48 additions and 11 deletions

View File

@ -1,5 +1,6 @@
<?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,11 +21,21 @@
*/
require("./pre.inc.php");
if (!$user->admin)
accessforbidden();
llxHeader();
print_titre("Tables Mysql - Contraintes");
print '<table border="0" cellpadding="4" cellspacing="1">';
print '<br>';
print '<table class="noborder" cellpadding="4" cellspacing="1">';
print '<tr class="liste_titre">';
print '<td>Tables</td>';
print '<td>Type</td>';
print '<td>Contraintes</td>';
print "</tr>\n";
$sql = "SHOW TABLE STATUS";
@ -38,7 +49,7 @@ if ($result)
{
$row = $db->fetch_row($i);
$var=!$var;
print "<TR $bc[$var]>";
print "<tr $bc[$var]>";
print '<td>'.$row[0].'</td>';
print '<td>'.$row[1].'</td>';
@ -49,5 +60,6 @@ if ($result)
}
}
print '</table>';
llxFooter();
?>

View File

@ -1,5 +1,6 @@
<?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,6 +21,10 @@
*/
require("./pre.inc.php");
if (!$user->admin)
accessforbidden();
if ($_GET["action"] == 'convert')
{
$db->query("alter table ".$_GET["table"]." type=INNODB");
@ -29,7 +34,19 @@ llxHeader();
print_titre("Tables Mysql");
print '<table border="0" cellpadding="4" cellspacing="1">';
print '<br>';
print '<table class="noborder" cellpadding="4" cellspacing="1">';
print '<tr class="liste_titre">';
print '<td>Nom de la table</td>';
print '<td colspan="2">Type</td>';
print '<td>Format lignes</td>';
print '<td>Nb enr.</td>';
print '<td>Avg_row_length</td>';
print '<td>Data_length</td>';
print '<td>Max_Data_length</td>';
print '<td>Index_length</td>';
print '<td>Last check</td>';
print "</tr>\n";
$sql = "SHOW TABLE STATUS";
@ -59,11 +76,14 @@ if ($result)
print '<td align="right">'.$row[3].'</td>';
print '<td align="right">'.$row[4].'</td>';
print '<td align="right">'.$row[5].'</td>';
print '<td align="right">'.$row[6].'</td>';
print '<td align="right">'.$row[7].'</td>';
print '<td align="right">'.$row[12].'</td>';
print '</tr>';
$i++;
}
}
print '</table>';
llxFooter();
?>

View File

@ -1,5 +1,6 @@
<?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,26 +21,34 @@
*/
require("./pre.inc.php");
if (!$user->admin)
accessforbidden();
llxHeader();
print_titre("Configuration Mysql");
print '<table border="0" cellpadding="3" cellspacing="1">';
print '<br>';
print '<table class="noborder" cellpadding="3" cellspacing="1">';
print '<tr class="liste_titre">';
print '<td>Propriétés&nbsp;du&nbsp;serveur</td>';
print '<td>Valeur</td>';
print "</tr>\n";
$sql = "SHOW VARIABLES";
$result = $db->query($sql);
if ($result)
{
$i=0;
$num = $db->num_rows();
$var=True;
while ($i < $num)
{
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print "<tr $bc[$var]>";
print '<td>'.$objp->Variable_name.'</td><td>'.$objp->Value.'</td>';
print '</tr>';
@ -48,9 +57,5 @@ if ($result)
}
print '</table>';
llxFooter();
?>