mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 01:58:09 +01:00
70 lines
1.8 KiB
PHP
70 lines
1.8 KiB
PHP
<?PHP
|
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
*
|
|
* 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
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* $Id$
|
|
* $Source$
|
|
*/
|
|
require("./pre.inc.php");
|
|
|
|
if ($_GET["action"] == 'convert')
|
|
{
|
|
$db->query("alter table ".$_GET["table"]." type=INNODB");
|
|
}
|
|
|
|
llxHeader();
|
|
|
|
print_titre("Tables Mysql");
|
|
|
|
print '<table border="0" cellpadding="4" cellspacing="1">';
|
|
|
|
$sql = "SHOW TABLE STATUS";
|
|
|
|
$result = $db->query($sql);
|
|
if ($result)
|
|
{
|
|
$num = $db->num_rows();
|
|
$var=True;
|
|
$i=0;
|
|
while ($i < $num)
|
|
{
|
|
$row = $db->fetch_row($i);
|
|
$var=!$var;
|
|
print "<TR $bc[$var]>";
|
|
|
|
print '<td>'.$row[0].'</td>';
|
|
print '<td>'.$row[1].'</td>';
|
|
if ($row[1] == "MyISAM")
|
|
{
|
|
print '<td><a href="mysql-tables.php?action=convert&table='.$row[0].'">Convertir</a></td>';
|
|
}
|
|
else
|
|
{
|
|
print '<td>-</td>';
|
|
}
|
|
print '<td>'.$row[2].'</td>';
|
|
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[7].'</td>';
|
|
print '</tr>';
|
|
$i++;
|
|
}
|
|
}
|
|
print '</table>';
|
|
llxFooter();
|
|
?>
|