Пример #1
0
        if (!file_exists($path)) {
            $error .= "Download error: file not found<br />";
        }
    } else {
        $error .= "Error: Cannot find report file for task &lt;" . $tid . "&gt;";
    }
}
///////////////////////////////////////////
// HTML HEADER
///////////////////////////////////////////
display_header();
if (isset($_GET["display_task"])) {
    $tid = $_GET["display_task"];
    display_task($tid);
} elseif (isset($_GET["display_alerts"])) {
    display_alerts();
} elseif (isset($_GET["display_json"])) {
    $tid = $_GET["display_json"];
    display_analysis($tid, True);
} elseif (isset($_GET["display_analysis"])) {
    $tid = $_GET["display_analysis"];
    display_analysis($tid);
} elseif (isset($_GET["config"])) {
    display_config();
} elseif (isset($_GET["search"])) {
    display_search();
} elseif (isset($_GET["meta_sign"])) {
    display_meta_sign();
} elseif (isset($_GET["sql_query"])) {
    display_sql_query();
} elseif (isset($_GET["display_tasks"])) {
Пример #2
0
<?php

#alerts: gets the alerts from the central amp db and displays them
require_once "Connections/freedomrising.php";
function display_alerts($q)
{
    while (!$q->EOF) {
        echo "<h3>" . $q->Fields("alert_title") . "</h3>";
        echo "<p class=\"name\"><b>" . $q->Fields("date") . "</b><br>" . $q->Fields("alert_text") . "</p>";
        $q->MoveNext();
    }
}
include "header.php";
if (isset($ampdbcon)) {
    $sql = "SELECT * FROM alerts WHERE publish = 1 ORDER BY date DESC";
    $alerts_txt = $ampdbcon->Execute($sql) or die("15" . $ampdbcon->ErrorMsg());
    echo "<table width=\"100%\" cellpadding=3><tr><td>";
    echo "<h2>AMP SYSTEM UPDATES & NEWS</h2>";
    display_alerts($alerts_txt);
    include "amp_alerts_emails.php";
    echo "</td></tr></table>";
} else {
    print "No Alerts.";
}
include "footer.php";