Translation for dbtools
This commit is contained in:
parent
e11b06bc5b
commit
86ab9171a7
@ -17,16 +17,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/admin/system/database-tables-contraintes.php
|
* \file htdocs/admin/system/database-tables-contraintes.php
|
||||||
\brief Page d'info des contraintes de la base
|
* \brief Page d'info des contraintes de la base
|
||||||
\version $Revision$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
||||||
@ -38,12 +35,18 @@ if (!$user->admin)
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("Constraints"),'','setup');
|
print_fiche_titre($langs->trans("Constraints"),'','setup');
|
||||||
|
|
||||||
|
|
||||||
|
// Define request to get table description
|
||||||
$base=0;
|
$base=0;
|
||||||
if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
|
if (eregi('mysql',$conf->db->type))
|
||||||
{
|
{
|
||||||
$sql = "SHOW TABLE STATUS";
|
$sql = "SHOW TABLE STATUS";
|
||||||
$base=1;
|
$base=1;
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
\file htdocs/admin/system/database-tables.php
|
\file htdocs/admin/system/database-tables.php
|
||||||
\brief Page d'infos des tables de la base
|
\brief Page d'infos des tables de la base
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
||||||
@ -34,8 +34,7 @@ include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".li
|
|||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["action"] == 'convert')
|
if ($_GET["action"] == 'convert')
|
||||||
@ -43,13 +42,19 @@ if ($_GET["action"] == 'convert')
|
|||||||
$db->query("alter table ".$_GET["table"]." type=INNODB");
|
$db->query("alter table ".$_GET["table"]." type=INNODB");
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("Tables")." ".ucfirst($conf->db->type),'','setup');
|
print_fiche_titre($langs->trans("Tables")." ".ucfirst($conf->db->type),'','setup');
|
||||||
|
|
||||||
|
|
||||||
|
// Define request to get table description
|
||||||
$base=0;
|
$base=0;
|
||||||
if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
|
if (eregi('mysql',$conf->db->type))
|
||||||
{
|
{
|
||||||
$sql = "SHOW TABLE STATUS";
|
$sql = "SHOW TABLE STATUS";
|
||||||
$base=1;
|
$base=1;
|
||||||
@ -92,19 +97,19 @@ else
|
|||||||
|
|
||||||
$sql = "SHOW TABLE STATUS";
|
$sql = "SHOW TABLE STATUS";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($result)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($resql);
|
||||||
$var=True;
|
$var=True;
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
print '<td>'.$obj->Name.'</td>';
|
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a></td>';
|
||||||
print '<td>'.$obj->Engine.'</td>';
|
print '<td>'.$obj->Engine.'</td>';
|
||||||
if ($row[1] == "MyISAM")
|
if ($row[1] == "MyISAM")
|
||||||
{
|
{
|
||||||
@ -143,15 +148,15 @@ else
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$sql = "select relname,seq_tup_read,idx_tup_fetch,n_tup_ins,n_tup_upd,n_tup_del from pg_stat_user_tables;";
|
$sql = "select relname,seq_tup_read,idx_tup_fetch,n_tup_ins,n_tup_upd,n_tup_del from pg_stat_user_tables;";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($result)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($resql);
|
||||||
$var=True;
|
$var=True;
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row($i);
|
$row = $db->fetch_row($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td align="right">'.$row[0].'</td>';
|
print '<td align="right">'.$row[0].'</td>';
|
||||||
@ -169,5 +174,4 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -17,16 +17,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/admin/system/dbtable.php
|
\file htdocs/admin/system/dbtable.php
|
||||||
\brief Page d'info des contraintes d'une table
|
\brief Page d'info des contraintes d'une table
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
||||||
@ -35,15 +32,21 @@ $langs->load("admin");
|
|||||||
|
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("Table") . " ".$_GET["table"],'','setup');
|
print_fiche_titre($langs->trans("Table") . " ".$_GET["table"],'','setup');
|
||||||
|
|
||||||
if ($conf->db->type == 'mysql')
|
// Define request to get table description
|
||||||
|
$base=0;
|
||||||
|
if (eregi('mysql',$conf->db->type))
|
||||||
{
|
{
|
||||||
$sql = "SHOW TABLE STATUS LIKE '".$_GET["table"]."'";
|
$sql = "SHOW TABLE STATUS LIKE '".$_GET["table"]."'";
|
||||||
$base=1;
|
$base=1;
|
||||||
@ -51,28 +54,35 @@ if ($conf->db->type == 'mysql')
|
|||||||
|
|
||||||
if ($conf->db->type == 'pgsql')
|
if ($conf->db->type == 'pgsql')
|
||||||
{
|
{
|
||||||
$sql = "SELECT conname,contype FROM pg_constraint;";
|
$sql = "SELECT conname,contype FROM pg_constraint";
|
||||||
$base=2;
|
$base=2;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
$result = $db->query($sql);
|
if (! $base)
|
||||||
if ($result)
|
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
print $langs->trans("FeatureNotAvailableWithThisDatabaseDriver");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
$var=True;
|
$var=True;
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row();
|
$row = $db->fetch_row($resql);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($base==1)
|
if ($base==1)
|
||||||
{
|
{
|
||||||
|
|
||||||
$cons = explode(";",$row[14]);
|
$cons = explode(";",$row[14]);
|
||||||
|
|
||||||
@ -93,7 +103,8 @@ if ($base==1)
|
|||||||
// var_dump($link);
|
// var_dump($link);
|
||||||
|
|
||||||
print '<table>';
|
print '<table>';
|
||||||
print '<tr class="liste_titre"><td>Champs</td><td>Type</td><td>Index</td><td>Champ lié</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Fields").'</td><td>'.$langs->trans("Type").'</td><td>'.$langs->trans("Index").'</td>';
|
||||||
|
print '<td>'.$langs->trans("FieldsLinked").'</td></tr>';
|
||||||
|
|
||||||
$sql = "DESCRIBE ".$_GET["table"];
|
$sql = "DESCRIBE ".$_GET["table"];
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -121,7 +132,7 @@ if ($base==1)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|||||||
@ -37,6 +37,7 @@ UsePopupCalendar=Use popup for dates input
|
|||||||
UsePreviewTabs=Use preview tabs
|
UsePreviewTabs=Use preview tabs
|
||||||
ShowPreview=Show preview
|
ShowPreview=Show preview
|
||||||
ThemeCurrentlyActive=Theme currently active
|
ThemeCurrentlyActive=Theme currently active
|
||||||
|
Fields=Fields
|
||||||
Mask=Mask
|
Mask=Mask
|
||||||
NextValue=Next value
|
NextValue=Next value
|
||||||
NextValueForInvoices=Next value (invoices)
|
NextValueForInvoices=Next value (invoices)
|
||||||
|
|||||||
@ -37,6 +37,7 @@ UsePopupCalendar=Utiliser les popups pour la saisie des dates
|
|||||||
UsePreviewTabs=Afficher les onglets "Aperçu"
|
UsePreviewTabs=Afficher les onglets "Aperçu"
|
||||||
ShowPreview=Afficher aperçu
|
ShowPreview=Afficher aperçu
|
||||||
ThemeCurrentlyActive=Theme actuellement actif
|
ThemeCurrentlyActive=Theme actuellement actif
|
||||||
|
Fields=Champs
|
||||||
Mask=Masque
|
Mask=Masque
|
||||||
NextValue=Prochaine valeur
|
NextValue=Prochaine valeur
|
||||||
NextValueForInvoices=Prochaine valeur (factures)
|
NextValueForInvoices=Prochaine valeur (factures)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user