1: 2: /* -------------------------------------------------------------
3: This file is part of FreeNATS
4:
5: FreeNATS is (C) Copyright 2008 PurplePixie Systems
6:
7: FreeNATS is free software: you can redistribute it and/or modify
8: it under the terms of the GNU General Public License as published by
9: the Free Software Foundation, either version 3 of the License, or
10: (at your option) any later version.
11:
12: FreeNATS is distributed in the hope that it will be useful,
13: but WITHOUT ANY WARRANTY; without even the implied warranty of
14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: GNU General Public License for more details.
16:
17: You should have received a copy of the GNU General Public License
18: along with FreeNATS. If not, see www.gnu.org/licenses
19:
20: For more information see www.purplepixie.org/freenats
21: -------------------------------------------------------------- */
22:
23: ob_start();
24: require("include.php");
25: $NATS->Start();
26: if (!$NATS_Session->Check($NATS->DB))
27: {
28: header("Location: ./?login_msg=Invalid+Or+Expired+Session");
29: exit();
30: }
31: ob_end_flush();
32: Screen_Header("Monitoring Interface",1);
33:
34: if (isset($_REQUEST['message']))
35: {
36: echo "".$_REQUEST['message']." ";
37: $poplist[]=$_REQUEST['message'];
38: }
39:
40: if (isset($_REQUEST['nodemove'])) $nm=true;
41: else $nm=false;
42:
43: ?>
44: 45: 46: if (isset($_REQUEST['check_updates']))
47: {
48: // check for updates
49: $dq="?CheckVersion=".$NATS->Version."&JSMode=1";
50: $dl="http://www.purplepixie.org/freenats/download.php";
51: $du=$dl.$dq;
52: echo "Checking for Updates: ";
53: echo "\n";
54: echo " ";
55: echo "If this test fails you can check on the website. ";
56: echo "You are currently running version ";
57: echo $NATS->Version.$NATS->Release.".";
58: echo " You can check regularly via the top-right admin link
";
59: }
60:
61: if ($nm)
62: {
63: $q="SELECT nodeid,weight FROM fnnode ORDER BY weight ASC";
64: $r=$NATS->DB->Query($q);
65: $nml="Move Before 66: while ($row=$NATS->DB->Fetch_Array($r))
67: {
68: $nml.="";
69: }
70: $nml.="";
71: $NATS->DB->Free($r);
72: }
73:
74: echo "Nodes ".hlink("Node")."
";
75: $q="SELECT nodeid,nodename,alertlevel,weight FROM fnnode ORDER BY weight ASC";
76: $r=$NATS->DB->Query($q);
77:
78: echo "