예제 #1
0
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();

// Timeskip check - means this page skips timecheck/reset if site.monitor.keepalive is 0
if ($NATS->Cfg->Get("site.monitor.keepalive",1)==0) $timeskip=true;
else $timeskip=false;

if (!$NATS_Session->Check($NATS->DB,$timeskip))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<1) UL_Error("View Monitor");

if (isset($_REQUEST['style']))
	{
	$style=$_REQUEST['style'];
	setcookie("fn_monitorstyle",$style);
	}
else if (isset($_COOKIE['fn_monitorstyle']))
	{
	$style=$_COOKIE['fn_monitorstyle'];
	}
else $style="standard";

if ($style=="") $style="standard";

Screen_Header("Live Monitor",1,1,"<meta http-equiv=\"refresh\" content=\"60\">");
예제 #2
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    $p = $_SERVER['HTTPS'] == "on" ? "https" : "http";
    $url = $p . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    header("Location: ./?login_msg=Invalid+Or+Expired+Session&url=" . urlencode($url));
    exit;
}
if ($NATS_Session->userlevel < 1) {
    UL_Error($NATS->Lang->Item("viewing.node"));
}
ob_end_flush();
Screen_Header($NATS->Lang->Item("viewing.node") . " " . $_REQUEST['nodeid'], 1);
?>
<br>
<?php 
//echo "<b class=\"minortitle\">Node: ".$_REQUEST['nodeid']."</b><br><br>";
echo "<table border=0><tr><td align=left valign=top>";
$q = "SELECT * FROM fnnode WHERE nodeid=\"" . ss($_REQUEST['nodeid']) . "\" LIMIT 0,1";
$r = $NATS->DB->Query($q);
if (!($row = $NATS->DB->Fetch_Array($r))) {
    echo $NATS->Lang->Item("no.node") . "<br><br>";
    Screen_Footer();
    exit;
}
예제 #3
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 5) {
    UL_Error($NATS->Lang->Item("edit.nodeside.test"));
}
if (isset($_REQUEST['action'])) {
    switch ($_REQUEST['action']) {
        case "enable":
            $q = "UPDATE fnnstest SET testenabled=1 WHERE nstestid=" . ss($_REQUEST['nstestid']);
            //echo $q;
            $NATS->DB->Query($q);
            //exit();
            header("Location: node.edit.php?nodeid=" . $_REQUEST['nodeid']);
            exit;
        case "disable":
            $q = "UPDATE fnnstest SET testenabled=0 WHERE nstestid=" . ss($_REQUEST['nstestid']);
            //echo $q;
            $NATS->DB->Query($q);
            //exit();
예제 #4
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Foobar.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 1) {
    UL_Error("View Group");
}
ob_end_flush();
Screen_Header("Viewing Group", 1);
?>
<br>
<?php 
$q = "SELECT * FROM fngroup WHERE groupid=\"" . ss($_REQUEST['groupid']) . "\" LIMIT 0,1";
$r = $NATS->DB->Query($q);
if (!($row = $NATS->DB->Fetch_Array($r))) {
    echo "No such group.<br><br>";
    Screen_Footer();
    exit;
}
$NATS->DB->Free($r);
echo "<table border=0><tr><td align=left valign=top>";
예제 #5
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<9) UL_Error("Admin SQL Interface");
if ($NATS->Cfg->Get("site.enable.adminsql",0)!=1)
	{
	header("Location: main.php?message=Admin+SQL+Console+Disabled");
	exit();
	}



ob_end_flush();
Screen_Header("Admin SQL Interface",1);
echo "<b>WARNING: This is advanced and unprotected functionality - proceed with caution!</b><br><br>";

echo "<form action=admin.sql.php method=post>";
echo "<input type=hidden name=action value=sql>";
if (isset($_REQUEST['query'])) $t=htmlspecialchars($_REQUEST['query']);
예제 #6
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<5) UL_Error("Action Group");
$msg="";

switch($_REQUEST['action'])
	{
	case "delete":
		if (!isset($_REQUEST['confirm']))
			{
			$go="confirm.php?action=Delete+Group&back=";
			$go.=urlencode("group.action.php?action=delete&groupid=".$_REQUEST['groupid']."&confirm=1");
			header("Location: ".$go);
			exit();
			}
		// delete it and shit!
		
		// group + links + lt results
예제 #7
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 5) {
    UL_Error("Action Group");
}
$msg = "";
switch ($_REQUEST['action']) {
    case "delete":
        if (!isset($_REQUEST['confirm'])) {
            $go = "confirm.php?action=Delete+Group&back=";
            $go .= urlencode("group.action.php?action=delete&groupid=" . $_REQUEST['groupid'] . "&confirm=1");
            header("Location: " . $go);
            exit;
        }
        // delete it and shit!
        // group + links + lt results
        $q = "DELETE FROM fngroup WHERE groupid=" . ss($_REQUEST['groupid']);
        $NATS->DB->Query($q);
        $q = "DELETE FROM fngrouplink WHERE groupid=" . ss($_REQUEST['groupid']);
예제 #8
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 5) {
    UL_Error($NATS->Lang->Item("group.editor"));
}
ob_end_flush();
Screen_Header($NATS->Lang->Item("group.editor"), 1, 1, "", "main", "groups");
echo "\n<script type=\"text/javascript\">\n";
echo "var iconDivText='";
ShowIcons();
echo "';\n\n";
echo "function showIcons()\n";
echo "{\n";
echo "document.getElementById('iconDiv').innerHTML='<br><br>'+iconDivText+'<br><br>';\n";
echo "}\n";
echo "</script>\n\n";
?>
<br>
<?php 
예제 #9
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<5) UL_Error("Edit Local Test");
ob_end_flush();
Screen_Header("Local Test Editor",1,1,"","main","nodes");
?>
<br>
<?php
$q="SELECT * FROM fnlocaltest WHERE localtestid=".ss($_REQUEST['localtestid'])." LIMIT 0,1";
$r=$NATS->DB->Query($q);
if (!$row=$NATS->DB->Fetch_Array($r))
	{
	echo "No such test!<br><br>";
	Screen_Footer();
	exit();
	}
if ($row['testname']!="") $nicename=$row['testname'];
else $nicename=lText($row['testtype']);
예제 #10
0
    $mode = $_REQUEST['mode'];
} else {
    $mode = "";
}
if ($mode == "savereport") {
    if ($NATS_Session->userlevel < 5) {
        UL_Error("Save Report");
    }
    $q = "INSERT INTO fnreport(reportname,reporttests) VALUES(\"" . ss($_REQUEST['reportname']) . "\",\"" . ss($_REQUEST['reporttests']) . "\")";
    $NATS->DB->Query($q);
    header("Location: main.php?mode=views&message=Saved+Report");
    exit;
}
if ($mode == "delete") {
    if ($NATS_Session->userlevel < 5) {
        UL_Error("Delete Report");
    }
    if (!isset($_REQUEST['confirmed'])) {
        $back = "report.php?mode=delete&reportid=" . $_REQUEST['reportid'] . "&confirmed=1";
        $back = urlencode($back);
        $msg = urlencode("Delete availability report");
        header("Location: confirm.php?action=" . $msg . "&back=" . $back);
        exit;
    }
    $q = "DELETE FROM fnreport WHERE reportid=" . ss($_REQUEST['reportid']);
    $NATS->DB->Query($q);
    $message = urlencode("Report Deleted");
    header("Location: main.php?mode=views&message=" . $message);
    exit;
}
$testlist = array();
예제 #11
0
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
// Timeskip check - means this page skips timecheck/reset if site.monitor.keepalive is 0
if ($NATS->Cfg->Get("site.monitor.keepalive", 1) == 0) {
    $timeskip = true;
} else {
    $timeskip = false;
}
if (!$NATS_Session->Check($NATS->DB, $timeskip)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 1) {
    UL_Error($NATS->Lang->Item("live.monitor"));
}
if (isset($_REQUEST['style'])) {
    $style = $_REQUEST['style'];
    setcookie("fn_monitorstyle", $style);
} else {
    if (isset($_COOKIE['fn_monitorstyle'])) {
        $style = $_COOKIE['fn_monitorstyle'];
    } else {
        $style = "standard";
    }
}
if ($style == "") {
    $style = "standard";
}
Screen_Header($NATS->Lang->Item("live.monitor"), 1, 1, "<meta http-equiv=\"refresh\" content=\"60\">");
예제 #12
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 9) {
    UL_Error($NATS->Lang->Item("test.run"));
}
ob_end_flush();
Screen_Header($NATS->Lang->Item("test.run") . ": test/" . $_REQUEST['trid'], 1);
if (isset($_REQUEST['message'])) {
    echo "<b>" . $_REQUEST['message'] . "</b><br>";
}
if (isset($amsg)) {
    echo "<b>" . $amsg . "</b><br>";
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "finish") {
    if (!isset($_REQUEST['confirmed'])) {
        echo "<b>" . $NATS->Lang->Item("testrun.manual.close") . "</b><br>";
        echo $NATS->Lang->Item("testrun.manual.close.detail");
        echo "<br><br>";
        echo "<b>" . $NATS->Lang->Item("confirm.action") . ":</b> ";
예제 #13
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<5) UL_Error("Edit Nodeside Test");

if (isset($_REQUEST['action']))
	{
	switch($_REQUEST['action'])
		{
		case "enable":
			$q="UPDATE fnnstest SET testenabled=1 WHERE nstestid=".ss($_REQUEST['nstestid']);
			//echo $q;
			$NATS->DB->Query($q);
			//exit();
			header("Location: node.edit.php?nodeid=".$_REQUEST['nodeid']);
			exit();
		case "disable":
			$q="UPDATE fnnstest SET testenabled=0 WHERE nstestid=".ss($_REQUEST['nstestid']);
			//echo $q;
예제 #14
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 9) {
    UL_Error($NATS->Lang->Item("admin.interface"));
}
if (isset($_REQUEST['action'])) {
    switch ($_REQUEST['action']) {
        case "create":
            $id = $NATS->RSS->Create($_REQUEST['feedname']);
            $_REQUEST['edit'] = 1;
            $_REQUEST['id'] = $id;
            break;
        case "update":
            $id = $_REQUEST['feedid'];
            $opts = array();
            $opts['feedname'] = $_REQUEST['feedname'];
            $opts['feedkey'] = $_REQUEST['feedkey'];
            $opts['feedtype'] = $_REQUEST['feedtype'];
            if ($_REQUEST['feedtype'] == "node") {
예제 #15
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 5) {
    UL_Error($NATS->Lang->Item("edit.view"));
}
function chs($var, $def = 0)
{
    if (isset($_REQUEST[$var])) {
        return ss($_REQUEST[$var]);
    } else {
        return $def;
    }
}
if (isset($_REQUEST['action'])) {
    switch ($_REQUEST['action']) {
        case "create":
            $q = "INSERT INTO fnview(vtitle,vclick,vstyle) VALUES(\"" . ss($_REQUEST['vtitle']) . "\",\"standard\",\"standard\")";
            $NATS->DB->Query($q);
            $_REQUEST['viewid'] = $NATS->DB->Insert_Id();
예제 #16
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<9) UL_Error("Test Run");



ob_end_flush();
Screen_Header("Test Run: test/".$_REQUEST['trid'],1);

if (isset($_REQUEST['message'])) echo "<b>".$_REQUEST['message']."</b><br>";
if (isset($amsg)) echo "<b>".$amsg."</b><br>";

if ( (isset($_REQUEST['action'])) && ($_REQUEST['action']=="finish") )
	{
	if (!isset($_REQUEST['confirmed']))
		{
		echo "<b>Manually Close Test Session</b><br>";
		echo "Are you sure you want to do this? Only close sessions that you're sure aren't still running in the background.<br>";
예제 #17
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 5) {
    UL_Error("Welcome Page");
}
$NATS->Cfg->Set("freenats.firstrun", "0");
if (isset($_REQUEST['process'])) {
    if (isset($_REQUEST['set_tracker'])) {
        $NATS->Cfg->Set("freenats.tracker", "1");
    } else {
        $NATS->Cfg->Set("freenats.tracker", "0");
    }
    if (isset($_REQUEST['send_confirm'])) {
        $NATS->PhoneHome(0, "firstrun.conf");
    }
}
if ($NATS->Cfg->Get("freenats.tracker") != "" && $NATS->Cfg->Get("freenats.tracker") > 0) {
    $NATS->PhoneHome(0, "firstrun");
}
예제 #18
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<5) UL_Error("Action Node");
$msg="";

switch($_REQUEST['action'])
	{
	case "delete":
		if (!isset($_REQUEST['confirm']))
			{
			$go="confirm.php?action=Delete+Node+".$_REQUEST['nodeid']."+and+all+associated+data&back=";
			$go.=urlencode("node.action.php?action=delete&nodeid=".$_REQUEST['nodeid']."&confirm=1");
			header("Location: ".$go);
			exit();
			}
		// delete it and shit!
		
		// node + localtests + lt results
예제 #19
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 1) {
    UL_Error("View Test Summary");
}
if (isset($_REQUEST['nodeid'])) {
    $nodeid = $_REQUEST['nodeid'];
} else {
    $nodeid = "";
}
Screen_Header("Summary for " . $nodeid, 1);
ob_end_flush();
$td_day = date("d");
$td_mon = date("m");
$td_yr = date("Y");
function gtinfo($testid)
{
    global $NATS;
    $o = "Error fetching test";
예제 #20
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<9) UL_Error("Backup Manager");

if (isset($_REQUEST['action']))
	{
	switch ($_REQUEST['action'])
		{
		case "backup":
		
		header("Content-type: text/sql");
		if (isset($_REQUEST['filename'])) $filename=$_REQUEST['filename'];
		else $filename="freenats-".date("Ymd").".sql";
		header("Content-Disposition: attachment; filename=".$filename);
		
		echo "-- FreeNATS SQL Data Backup\n";
		echo "-- ".date("Y-m-d H:i:s")."\n\n";
		echo "-- Warning: Only use on FreeNATS ".$NATS->Version." or later schemas!\n\n";
예제 #21
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 5) {
    UL_Error($NATS->Lang->Item("local.test.editor"));
}
ob_end_flush();
Screen_Header($NATS->Lang->Item("local.test.editor"), 1, 1, "", "main", "nodes");
?>
<br>
<?php 
$q = "SELECT * FROM fnlocaltest WHERE localtestid=" . ss($_REQUEST['localtestid']) . " LIMIT 0,1";
$r = $NATS->DB->Query($q);
if (!($row = $NATS->DB->Fetch_Array($r))) {
    echo $NATS->Lang->Item("no.test") . "<br><br>";
    Screen_Footer();
    exit;
}
if ($row['testname'] != "") {
    $nicename = $row['testname'];
예제 #22
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 9) {
    UL_Error("Backup Manager");
}
if (isset($_REQUEST['action'])) {
    switch ($_REQUEST['action']) {
        case "backup":
            header("Content-type: text/sql");
            if (isset($_REQUEST['filename'])) {
                $filename = $_REQUEST['filename'];
            } else {
                $filename = "freenats-" . date("Ymd") . ".sql";
            }
            header("Content-Disposition: attachment; filename=" . $filename);
            echo "-- FreeNATS SQL Data Backup\n";
            echo "-- " . date("Y-m-d H:i:s") . "\n\n";
            echo "-- Warning: Only use on FreeNATS " . $NATS->Version . " or later schemas!\n\n";
            foreach ($_REQUEST['table'] as $table) {
예제 #23
0
if ($filename != "") {
    if ($filename[0] == "/") {
        $filename = substr($filename, 1);
    }
    if (strpos($filename, "..") !== false) {
        $filename = "";
    }
}
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 9) {
    UL_Error("Filemanager Interface");
}
$dirs = array();
$dircount = 0;
function add_dir($name, $path)
{
    global $dirs, $dircount;
    $dirs[$dircount]['name'] = $name;
    $dirs[$dircount]['path'] = $path;
    $dircount++;
    return $dircount - 1;
}
add_dir("Site Tests", $BaseDir . "site/tests/");
add_dir("Site Events", $BaseDir . "site/events/");
// Actions Here
if (isset($_REQUEST['action'])) {
예제 #24
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 9) {
    UL_Error("Admin Interface");
}
// Actions Here
if (isset($_REQUEST['action'])) {
    switch ($_REQUEST['action']) {
        // create delete save_edit
        // create_item delete_item save_item
        case "create":
            $q = "INSERT INTO fnschedule(schedulename) VALUES(\"" . ss($_REQUEST['schedulename']) . "\")";
            $NATS->DB->Query($q);
            $_REQUEST['scheduleid'] = $NATS->DB->Insert_Id();
            break;
        case "delete":
            if (!isset($_REQUEST['confirmed'])) {
                $back = "schedule.php?delscheduleid=" . $_REQUEST['delscheduleid'] . "&action=delete&confirmed=1";
                $msg = "Delete Schedule and All Associated Items";
예제 #25
0
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<5) UL_Error("Edit Node");
ob_end_flush();
Screen_Header("Node Editor",1,1,"","main","nodes");
echo "\n<script type=\"text/javascript\">\n";
echo "var iconDivText='";
ShowIcons();
echo "';\n\n";
echo "function showIcons()\n";
echo "{\n";
echo "if (document.getElementById('iconDiv').innerHTML=='') document.getElementById('iconDiv').innerHTML='<br><br>'+iconDivText+'<br><br>';\n";
echo "else document.getElementById('iconDiv').innerHTML='';\n";
echo "}\n\n";
echo "var optionContent='';\n";
echo "function showOptions()\n";
echo "{\n";
echo "if (document.getElementById('nodeoptions').innerHTML=='') document.getElementById('nodeoptions').innerHTML=optionContent;\n";
예제 #26
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Foobar.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 1) {
    UL_Error("View Alert");
}
ob_end_flush();
Screen_Header("Alert History for " . $_REQUEST['nodeid'], 1);
?>
<br>
<?php 
echo "<b class=\"minortitle\">Node Alerts for: <a href=node.php?nodeid=" . $_REQUEST['nodeid'] . ">" . $_REQUEST['nodeid'] . "</a></b><br><br>";
function dal($arow)
{
    global $NATS;
    echo "<table border=0>";
    echo "<tr><td align=right><b>Alert : </b></td>";
    echo "<td align=left><b>" . $arow['nodeid'] . "/" . $arow['alertid'] . "</b></td></tr>";
    echo "<tr><td align=right>Opened : </td>";
    echo "<td align=left>" . nicedt($arow['openedx']) . "</td></tr>";
예제 #27
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 5) {
    UL_Error("Action Node");
}
$msg = "";
switch ($_REQUEST['action']) {
    case "delete":
        if (!isset($_REQUEST['confirm'])) {
            $go = "confirm.php?action=Delete+Node+" . $_REQUEST['nodeid'] . "+and+all+associated+data&back=";
            $go .= urlencode("node.action.php?action=delete&nodeid=" . $_REQUEST['nodeid'] . "&confirm=1");
            header("Location: " . $go);
            exit;
        }
        // delete it and shit!
        // node + localtests + lt results
        $dnc = 0;
        $dnt = 0;
        $dnd = 0;
예제 #28
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 9) {
    UL_Error("Admin SQL Interface");
}
if ($NATS->Cfg->Get("site.enable.adminsql", 0) != 1) {
    header("Location: main.php?message=Admin+SQL+Console+Disabled");
    exit;
}
ob_end_flush();
Screen_Header("Admin SQL Interface", 1);
echo "<b>WARNING: This is advanced and unprotected functionality - proceed with caution!</b><br><br>";
if (isset($_REQUEST['query'])) {
    $query = $NATS->StripGPC($_REQUEST['query']);
} else {
    $query = "";
}
echo "<form action=admin.sql.php method=post>";
echo "<input type=hidden name=action value=sql>";
예제 #29
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */
ob_start();
require "include.php";
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB)) {
    header("Location: ./?login_msg=Invalid+Or+Expired+Session");
    exit;
}
if ($NATS_Session->userlevel < 5) {
    UL_Error($NATS->Lang->Item("node.editor"));
}
ob_end_flush();
Screen_Header($NATS->Lang->Item("node.editor"), 1, 1, "", "main", "nodes");
echo "\n<script type=\"text/javascript\">\n";
echo "var iconDivText='";
ShowIcons();
echo "';\n\n";
echo "function showIcons()\n";
echo "{\n";
echo "if (document.getElementById('iconDiv').innerHTML=='') document.getElementById('iconDiv').innerHTML='<br><br>'+iconDivText+'<br><br>';\n";
echo "else document.getElementById('iconDiv').innerHTML='';\n";
echo "}\n\n";
echo "var optionContent='';\n";
echo "function showOptions()\n";
echo "{\n";
예제 #30
0
파일: log.php 프로젝트: remap/ndn-status
You should have received a copy of the GNU General Public License
along with FreeNATS.  If not, see www.gnu.org/licenses

For more information see www.purplepixie.org/freenats
-------------------------------------------------------------- */

ob_start();
require("include.php");
$NATS->Start();
if (!$NATS_Session->Check($NATS->DB))
	{
	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
	exit();
	}
if ($NATS_Session->userlevel<9) UL_Error("View Log");


ob_end_flush();
Screen_Header("System Event Log",1);
?>

<br>
<b class="subtitle">System Event Log</b><br><br>

<?php

if (isset($_REQUEST['f_mod'])) $f_mod=$_REQUEST['f_mod'];
else $f_mod="";
if (isset($_REQUEST['f_cat'])) $f_cat=$_REQUEST['f_cat'];
else $f_cat="";