File: 1.00.6a/server/web/group.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 Group"); 32: ob_end_flush(); 33: Screen_Header("Viewing Group",1); 34: ?> 35:
36: 37: 38: $q="SELECT * FROM fngroup WHERE groupid=\"".ss($_REQUEST['groupid'])."\" LIMIT 0,1"; 39: $r=$NATS->DB->Query($q); 40: if (!$row=$NATS->DB->Fetch_Array($r)) 41: { 42: echo "No such group.

";
43: Screen_Footer(); 44: exit(); 45: } 46: $NATS->DB->Free($r); 47: 48: echo "
"; 49: 50: echo "Group: ".$row['groupname']."

";
51: 52: echo ""; 53: 54: echo ""; 59: 60: echo ""; 65: 66: echo ""; 74: 75: if ($NATS_Session->userlevel>4) 76: echo ""; 77: 78: echo "
55: Group Name 56: :"; 57: echo $row['groupname']; 58: echo "
61: Description 62: :"; 63: echo $row['groupdesc']; 64: echo "
67: Status 68: :"; 69: $al=$NATS->GroupAlertLevel($_REQUEST['groupid']); 70: echo ""; 71: echo oText($al); 72: echo ""; 73: echo "
Settings :Group Options
";
79: echo "
 "; 80: ng_tiny($_REQUEST['groupid'],$row['groupname']); 81: echo "
";
82: 83: echo "

";
84: echo ""; 85: $a=0; 86: $q="SELECT nodeid FROM fngrouplink WHERE groupid=".ss($_REQUEST['groupid']); 87: $r=$NATS->DB->Query($q); 88: while ($row=$NATS->DB->Fetch_Array($r)) 89: { 90: if ($a==0) echo ""; 91: echo ""; 94: $a++; 95: if ($a>=5) 96: { 97: echo ""; 98: $a=0; 99: } 100: } 101: if ($a>0) echo ""; 102: /* 103: if ($a>0) // otherwise at the first row anyway 104: { 105: while ($a<5) 106: { 107: echo ""; 108: $a++; 109: } 110: echo ""; 111: } 112: */ 113: echo "
"; 92: np_tiny($row['nodeid']); 93: echo "
 
";
114: 115: ?> 116: 117: 118: 119: Screen_Footer(); 120: ?> 121: