27 require
'../../main.inc.php';
29 $langs->load(
"admin");
34 $table =
GETPOST(
'table',
'alpha');
48 if (preg_match(
'/mysql/i', $conf->db->type))
50 $sql =
"SHOW TABLE STATUS LIKE '".$db->escape($table).
"'";
52 } elseif ($conf->db->type ==
'pgsql')
54 $sql =
"SELECT conname,contype FROM pg_constraint";
60 print $langs->trans(
"FeatureNotAvailableWithThisDatabaseDriver");
65 $num = $db->num_rows(
$resql);
69 $row = $db->fetch_row(
$resql);
77 $cons = explode(
";", $row[14]);
80 foreach ($cons as $cc)
82 $cx = preg_replace(
"/\)\sREFER/",
"", $cc);
83 $cx = preg_replace(
"/\(`/",
"", $cx);
84 $cx = preg_replace(
"/`\)/",
"", $cx);
85 $cx = preg_replace(
"/`\s/",
"", $cx);
87 $val = explode(
"`", $cx);
89 $link[trim($val[0])][0] = (isset($val[1]) ? $val[1] :
'');
90 $link[trim($val[0])][1] = (isset($val[2]) ? $val[2] :
'');
96 print '<table class="noborder">';
97 print '<tr class="liste_titre">';
98 print '<td>'.$langs->trans(
"Fields").
'</td><td>'.$langs->trans(
"Type").
'</td><td>'.$langs->trans(
"Index").
'</td>';
103 print '<td>'.$langs->trans(
"FieldsLinked").
'</td>';
107 $sql =
"SHOW FULL COLUMNS IN ".$db->escape($table);
109 $resql = $db->query($sql);
112 $num = $db->num_rows(
$resql);
116 $row = $db->fetch_row(
$resql);
117 print '<tr class="oddeven">';
118 print "<td>".$row[0].
"</td>";
119 print "<td>".$row[1].
"</td>";
120 print "<td>".$row[3].
"</td>";
121 print "<td>".(empty($row[4]) ?
'' : $row[4]).
"</td>";
122 print "<td>".(empty($row[5]) ?
'' : $row[5]).
"</td>";
123 print "<td>".(empty($row[6]) ?
'' : $row[6]).
"</td>";
124 print "<td>".(empty($row[7]) ?
'' : $row[7]).
"</td>";
126 print "<td>".(isset($link[$row[0]][0]) ? $link[$row[0]][0] :
'').
".";
127 print (isset($link[$row[0]][1]) ? $link[$row[0]][1] :
'').
"</td>";
129 print '<!-- ALTER ALTER TABLE '.$table.
' MODIFY '.$row[0].
' '.$row[1].
' COLLATE utf8_unicode_ci; -->';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
print
Draft customers invoices.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.