Esempio n. 1
0
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
$dolversion = version_dolibarr();
print "<tr {$bc['0']}><td width=\"280\">" . $langs->trans("Version") . "</td><td>" . $dolversion . "</td></tr>\n";
print '</table>';
print "<br>\n";
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">" . $langs->trans("OS") . "</td></tr>\n";
$osversion = version_os();
print "<tr {$bc['0']}><td width=\"280\">" . $langs->trans("Version") . "</td><td>" . $osversion . "</td></tr>\n";
print '</table>';
print "<br>\n";
// Serveur web
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">" . $langs->trans("WebServer") . "</td></tr>\n";
$apacheversion = version_webserver();
print "<tr {$bc['0']}><td width=\"280\">" . $langs->trans("Version") . "</td><td>" . $apacheversion . "</td></tr>\n";
print '</table>';
print "<br>\n";
// Php
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">" . $langs->trans("PHP") . "</td></tr>\n";
$phpversion = version_php();
print "<tr {$bc['0']}><td width=\"280\">" . $langs->trans("Version") . "</td><td>" . $phpversion . "</td></tr>\n";
print "<tr {$bc['1']}><td>" . $langs->trans("PhpWebLink") . "</td><td>" . php_sapi_name() . "</td></tr>\n";
print '</table>';
print "<br>\n";
// Database
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">" . $langs->trans("Database") . "</td></tr>\n";
$dblabel = $db::LABEL;
Esempio n. 2
0
function getVersions($authentication)
{
    global $db, $conf, $langs;
    dol_syslog("Function: getVersions login=" . $authentication['login']);
    if ($authentication['entity']) {
        $conf->entity = $authentication['entity'];
    }
    // Init and check authentication
    $objectresp = array();
    $errorcode = '';
    $errorlabel = '';
    $error = 0;
    $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel);
    // Check parameters
    if (!$error) {
        $objectresp['result'] = array('result_code' => 'OK', 'result_label' => '');
        $objectresp['dolibarr'] = version_dolibarr();
        $objectresp['os'] = version_os();
        $objectresp['php'] = version_php();
        $objectresp['webserver'] = version_webserver();
    }
    if ($error) {
        $objectresp = array('result' => array('result_code' => $errorcode, 'result_label' => $errorlabel));
    }
    return $objectresp;
}