Correction oubli initialisation de i=0 pour boucle affichant la liste des propriétés mysql.
Conditionnement de l'accès au droit user->admin. Remplacement des border=0/1 par class="noborder/border"
This commit is contained in:
parent
ecf819ea2c
commit
6d50f289b2
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -20,11 +21,21 @@
|
|||||||
*/
|
*/
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
if (!$user->admin)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
print_titre("Tables Mysql - Contraintes");
|
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";
|
$sql = "SHOW TABLE STATUS";
|
||||||
|
|
||||||
@ -38,7 +49,7 @@ if ($result)
|
|||||||
{
|
{
|
||||||
$row = $db->fetch_row($i);
|
$row = $db->fetch_row($i);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<TR $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
print '<td>'.$row[0].'</td>';
|
print '<td>'.$row[0].'</td>';
|
||||||
print '<td>'.$row[1].'</td>';
|
print '<td>'.$row[1].'</td>';
|
||||||
@ -49,5 +60,6 @@ if ($result)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -20,6 +21,10 @@
|
|||||||
*/
|
*/
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
if (!$user->admin)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["action"] == 'convert')
|
if ($_GET["action"] == 'convert')
|
||||||
{
|
{
|
||||||
$db->query("alter table ".$_GET["table"]." type=INNODB");
|
$db->query("alter table ".$_GET["table"]." type=INNODB");
|
||||||
@ -29,7 +34,19 @@ llxHeader();
|
|||||||
|
|
||||||
print_titre("Tables Mysql");
|
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";
|
$sql = "SHOW TABLE STATUS";
|
||||||
|
|
||||||
@ -59,11 +76,14 @@ if ($result)
|
|||||||
print '<td align="right">'.$row[3].'</td>';
|
print '<td align="right">'.$row[3].'</td>';
|
||||||
print '<td align="right">'.$row[4].'</td>';
|
print '<td align="right">'.$row[4].'</td>';
|
||||||
print '<td align="right">'.$row[5].'</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[7].'</td>';
|
||||||
|
print '<td align="right">'.$row[12].'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -20,26 +21,34 @@
|
|||||||
*/
|
*/
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
if (!$user->admin)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
print_titre("Configuration Mysql");
|
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 du serveur</td>';
|
||||||
|
print '<td>Valeur</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
$sql = "SHOW VARIABLES";
|
$sql = "SHOW VARIABLES";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
$i=0;
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
$objp = $db->fetch_object( $i);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<TR $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
print '<td>'.$objp->Variable_name.'</td><td>'.$objp->Value.'</td>';
|
print '<td>'.$objp->Variable_name.'</td><td>'.$objp->Value.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -48,9 +57,5 @@ if ($result)
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user