dolibarr  7.0.0-beta
web.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
23 require '../../main.inc.php';
24 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
25 require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
26 
27 $langs->load("admin");
28 
29 if (!$user->admin) accessforbidden();
30 
31 
32 /*
33  * Action
34  */
35 
36 // None
37 
38 
39 /*
40  * View
41  */
42 
43 llxHeader('', $langs->trans("InfoWebServer"));
44 
45 print load_fiche_titre($langs->trans("InfoWebServer"),'','title_setup');
46 
47 print '<div class="div-table-responsive-no-min">';
48 print '<table class="noborder" width="100%">';
49 print '<tr class="liste_titre"><td>'.$langs->trans("Parameter")."</td><td>".$langs->trans("Value")."</td></tr>\n";
50 print '<tr class="oddeven"><td>'.$langs->trans("Version")."</td><td>".$_SERVER["SERVER_SOFTWARE"]."</td></tr>\n";
51 print '<tr class="oddeven"><td>'.$langs->trans("VirtualServerName")."</td><td>" . $_SERVER["SERVER_NAME"] . "</td></tr>\n";
52 print '<tr class="oddeven"><td>'.$langs->trans("IP")."</td><td>".$_SERVER["SERVER_ADDR"]."</td></tr>\n";
53 print '<tr><td>'.$langs->trans("Port")."</td><td>" . $_SERVER["SERVER_PORT"] . "</td></tr>\n";
54 print '<tr><td>'.$langs->trans("DocumentRootServer")."</td><td>".$_SERVER["DOCUMENT_ROOT"]."</td></tr>\n";
55 print '<tr><td>'.$langs->trans("DataRootServer")."</td><td>" . DOL_DATA_ROOT . "</td></tr>\n";
56 // Web user group by default
57 $labeluser=dol_getwebuser('user');
58 $labelgroup=dol_getwebuser('group');
59 if ($labeluser && $labelgroup)
60 {
61  print '<tr><td>'.$langs->trans("WebUserGroup")." (env vars)</td><td>".$labeluser.'/'.$labelgroup."</td></tr>\n";
62 }
63 // Web user group real (detected by 'id' external command)
64 $arrayout=array(); $varout=0;
65 exec('id', $arrayout, $varout);
66 if (empty($varout)) // Test command is ok. Work only on Linux OS.
67 {
68  print '<tr><td>'.$langs->trans("WebUserGroup")." (real, 'id' command)</td><td>".join(',', $arrayout)."</td></tr>\n";
69 }
70 print '</table>';
71 print '</div>';
72 
73 llxFooter();
74 
75 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:58
dol_getwebuser($mode)
Return user/group account of web server.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
llxHeader()
Empty header.
Definition: wrapper.php:46
print
Draft customers invoices.
Definition: index.php:91