File: 0.02.45a/server/web/monitor.php (View as Code)

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 Foobar. 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: if ($NATS_Session->userlevel<1) UL_Error("View Monitor"); 32: ob_end_flush(); 33: Screen_Header("Live Monitor",1,1,""); 34: ?> 35:
36: 37: 38: $q="SELECT * FROM fngroup ORDER BY weight ASC"; 39: $r=$NATS->DB->Query($q); 40: 41: echo ""; 42: $a=0; 43: while ($row=$NATS->DB->Fetch_Array($r)) 44: { 45: if ($a==0) echo ""; 46: echo ""; 49: $a++; 50: if ($a==2) 51: { 52: $a=0; 53: echo ""; 54: } 55: } 56: if ($a>0) echo ""; 57: echo "
"; 47: ng_big($row['groupid'],$row['groupname'],$row['groupdesc'],$row['groupicon']); 48: echo "
";
58: 59: 60: $NATS->DB->Free($r); 61: 62: echo "

";
63: 64: $q="SELECT * FROM fnnode ORDER BY weight ASC"; 65: $r=$NATS->DB->Query($q); 66: 67: echo ""; 68: $a=0; 69: while ($row=$NATS->DB->Fetch_Array($r)) 70: { 71: if ($a==0) echo ""; 72: echo ""; 75: $a++; 76: if ($a==5) 77: { 78: $a=0; 79: echo ""; 80: } 81: } 82: if ($a>0) echo ""; 83: echo "
"; 73: np_tiny($row['nodeid']); 74: echo "
";
84: 85: 86: $NATS->DB->Free($r); 87: 88: Screen_Footer(); 89: ?> 90: