28require
'../../main.inc.php';
44llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-system_database');
49print
'<div class="div-table-responsive-no-min">';
50print
'<table class="noborder centpercent">';
51print
'<tr class="liste_titre"><td colspan="2">'.$langs->trans(
"Database").
'</td></tr>'.
"\n";
52print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"Version").
'</td><td>'.$db::LABEL.
' '.$db->getVersion().
'</td></tr>'.
"\n";
53print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"DatabaseServer").
'</td><td>'.$conf->db->host.
'</td></tr>'.
"\n";
54print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"DatabasePort").
'</td><td>'.(empty($conf->db->port) ? $langs->trans(
"Default") : $conf->db->port).
'</td></tr>'.
"\n";
55print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"DatabaseName").
'</td><td>'.$conf->db->name.
'</td></tr>'.
"\n";
56print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"DriverType").
'</td><td>'.$conf->db->type.($db->getDriverInfo() ?
' ('.$db->getDriverInfo().
')' :
'').
'</td></tr>'.
"\n";
58print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"User").
'</td><td>'.$conf->db->user.
'</td></tr>'.
"\n";
59print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"Password").
'</td><td>'.preg_replace(
'/./i',
'*', $dolibarr_main_db_pass).
'</td></tr>'.
"\n";
60print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"DBStoringCharset").
'</td><td>'.$db->getDefaultCharacterSetDatabase().
'</td></tr>'.
"\n";
61print
'<tr class="oddeven"><td width="300">'.$langs->trans(
"DBSortingCharset").
'</td><td>'.$db->getDefaultCollationDatabase().
'</td></tr>'.
"\n";
67print
'<div class="div-table-responsive-no-min">';
68print
'<table class="noborder centpercent">';
69print
'<tr class="liste_titre"><td colspan="2">'.$langs->trans(
"Tables").
'</td></tr>'.
"\n";
70print
'<tr class="oddeven"><td class=""><a href="'.DOL_URL_ROOT.
'/admin/system/database-tables.php?mainmenu=home">'.
img_picto(
'',
'list',
'class="pictofixedwidth"').$langs->trans(
"List").
'</a></td></tr>'.
"\n";
74$listofvars = $db->getServerParametersValues();
75$listofstatus = $db->getServerStatusValues();
76$arraylist = array(
'listofvars',
'listofstatus');
78if (!count($listofvars) && !count($listofstatus)) {
79 print $langs->trans(
"FeatureNotAvailableWithThisDatabaseDriver");
81 foreach ($arraylist as $listname) {
83 print
'<div class="div-table-responsive-no-min">';
84 print
'<table class="noborder centpercent">';
85 print
'<tr class="liste_titre">';
86 print
'<td width="300">'.$langs->trans(
"Parameters").
'</td>';
87 print
'<td>'.$langs->trans(
"Value").
'</td>';
92 if (preg_match(
'/mysql/i', $db->type)) {
94 'character_set_database' => array(
'var' =>
'dolibarr_main_db_character_set',
'valifempty' =>
'utf8'),
95 'collation_database' => array(
'var' =>
'dolibarr_main_db_collation',
'valifempty' =>
'utf8_unicode_ci')
100 if ($listname ==
'listofvars') {
101 $listtouse = $listofvars;
103 if ($listname ==
'listofstatus') {
104 $listtouse = $listofstatus;
107 foreach ($listtouse as $param => $paramval) {
108 print
'<tr class="oddeven">';
112 print
'<td class="wordbreak">';
115 foreach ($arraytest as $key => $val) {
116 if ($key != $param) {
119 $tmpvar = $val[
'var'];
121 $text =
'Should be in line with value of param <b>'.$val[
'var'].
'</b> thas is <b>'.($val2 ? $val2 :
"'' (=".$val[
'valifempty'].
")").
'</b>';
129 print $form->textwithpicto($paramval, $text);
133 print $form->textwithpicto($paramval, $text, 1,
'warning');
138 print
'</table>'.
"\n";
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.