mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Clean v14
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
@@ -35,6 +37,10 @@ if (!$user->admin) {
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'convert') {
|
||||
$sql = "ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." ENGINE=INNODB";
|
||||
$db->query($sql);
|
||||
@@ -82,6 +88,7 @@ if (!$base) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>#</td>';
|
||||
print '<td>'.$langs->trans("TableName").'</td>';
|
||||
print '<td colspan="2">'.$langs->trans("Type").'</td>';
|
||||
print '<td>'.$langs->trans("Format").'</td>';
|
||||
@@ -105,7 +112,18 @@ if (!$base) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a></td>';
|
||||
print '<td>'.($i+1).'</td>';
|
||||
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a>';
|
||||
$tablename = preg_replace('/^'.MAIN_DB_PREFIX.'/', 'llx_', $obj->Name);
|
||||
if (dol_is_file(DOL_DOCUMENT_ROOT.'/install/mysql/tables/'.$tablename.'.sql')) {
|
||||
$img = "info";
|
||||
//print img_picto($langs->trans("ExternalModule"), $img);
|
||||
} else {
|
||||
$img = "info_black";
|
||||
//print DOL_DOCUMENT_ROOT.'/install/mysql/tables/'.$tablename.'.sql';
|
||||
print img_picto($langs->trans("ExternalModule"), $img, 'class="small"');
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$obj->Engine.'</td>';
|
||||
if (isset($obj->Engine) && $obj->Engine == "MyISAM") {
|
||||
print '<td><a class="reposition" href="database-tables.php?action=convert&table='.$obj->Name.'">'.$langs->trans("Convert").' InnoDb</a></td>';
|
||||
@@ -142,6 +160,8 @@ if (!$base) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<td>#</td>';
|
||||
print '<td>'.$langs->trans("TableName").'</td>';
|
||||
print '<td>Nb of tuples</td>';
|
||||
print '<td>Nb index fetcher.</td>';
|
||||
@@ -160,6 +180,7 @@ if (!$base) {
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.($i+1).'</td>';
|
||||
print '<td>'.$row[0].'</td>';
|
||||
print '<td class="right">'.$row[1].'</td>';
|
||||
print '<td class="right">'.$row[2].'</td>';
|
||||
@@ -179,6 +200,7 @@ if (!$base) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>#</td>';
|
||||
print '<td>'.$langs->trans("TableName").'</td>';
|
||||
print '<td>'.$langs->trans("NbOfRecord").'</td>';
|
||||
print "</tr>\n";
|
||||
@@ -197,6 +219,7 @@ if (!$base) {
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.($i+1).'</td>';
|
||||
print '<td>'.$row[0].'</td>';
|
||||
print '<td>'.$count.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
Reference in New Issue
Block a user