28 require
'../../main.inc.php';
30 $langs->load(
"admin");
36 $table =
GETPOST(
'table',
'alpha');
46 print
load_fiche_titre($langs->trans(
"Table").
" ".$table,
'',
'title_setup');
50 if (preg_match(
'/mysql/i', $conf->db->type)) {
51 $sql =
"SHOW TABLE STATUS LIKE '".$db->escape($table).
"'";
53 } elseif ($conf->db->type ==
'pgsql') {
54 $sql =
"SELECT conname,contype FROM pg_constraint";
59 print $langs->trans(
"FeatureNotAvailableWithThisDatabaseDriver");
63 $num = $db->num_rows(
$resql);
66 $row = $db->fetch_row(
$resql);
73 $cons = explode(
";", $row[14]);
75 foreach ($cons as $cc) {
76 $cx = preg_replace(
"/\)\sREFER/",
"", $cc);
77 $cx = preg_replace(
"/\(`/",
"", $cx);
78 $cx = preg_replace(
"/`\)/",
"", $cx);
79 $cx = preg_replace(
"/`\s/",
"", $cx);
81 $val = explode(
"`", $cx);
83 $link[trim($val[0])][0] = (isset($val[1]) ? $val[1] :
'');
84 $link[trim($val[0])][1] = (isset($val[2]) ? $val[2] :
'');
90 print
'<table class="noborder">';
91 print
'<tr class="liste_titre">';
92 print
'<td>'.$langs->trans(
"Fields").
'</td><td>'.$langs->trans(
"Type").
'</td><td>'.$langs->trans(
"Index").
'</td>';
97 print
'<td>'.$langs->trans(
"FieldsLinked").
'</td>';
101 $sql =
"SHOW FULL COLUMNS IN ".$db->escape($table);
103 $resql = $db->query($sql);
105 $num = $db->num_rows(
$resql);
108 $row = $db->fetch_row(
$resql);
109 print
'<tr class="oddeven">';
110 print
"<td>".$row[0].
"</td>";
111 print
"<td>".$row[1].
"</td>";
112 print
"<td>".$row[3].
"</td>";
113 print
"<td>".(empty($row[4]) ?
'' : $row[4]).
"</td>";
114 print
"<td>".(empty($row[5]) ?
'' : $row[5]).
"</td>";
115 print
"<td>".(empty($row[6]) ?
'' : $row[6]).
"</td>";
116 print
"<td>".(empty($row[7]) ?
'' : $row[7]).
"</td>";
118 print
"<td>".(isset($link[$row[0]][0]) ? $link[$row[0]][0] :
'').
".";
119 print (isset($link[$row[0]][1]) ? $link[$row[0]][1] :
'').
"</td>";
121 print
'<!-- ALTER ALTER TABLE '.$table.
' MODIFY '.$row[0].
' '.$row[1].
' COLLATE utf8_unicode_ci; -->';
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.