Esempio n. 1
0
    $Tools = new Tools($Database);
    $Subnets = new Subnets($Database);
    $Sections = new Sections($Database);
    $Log = new Logging($Database);
    $Result = new Result();
}
# user must be authenticated
$User->check_user_session();
# if direct request that redirect to tools page
if ($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") {
    header("Location: " . create_link("tools", "changelog"));
}
# changelog to syslog
if ($User->settings->log != "syslog") {
    /* get logs */
    $clogs = $Log->fetch_all_changelogs(false, "", 50);
}
# syslog
if ($User->settings->log == "syslog") {
    $Result->show("warning", _("Changelog files are sent to syslog"), false);
} elseif (sizeof($clogs) == 0) {
    print "<blockquote style='margin-top:20px;margin-left:20px;'>";
    print "<p>" . _("No changelogs available") . "</p>";
    print "<small>" . _("No changelog entries are available") . "</small>";
    print "</blockquote>";
} else {
    # printout
    print "<table class='table changelog table-hover table-top table-condensed'>";
    # headers
    print "<tr>";
    print "\t<th>" . _('User') . "</th>";