File: 1.19.1b/server/web/group.php (View as Code)

1: 2: /* ------------------------------------------------------------- 3: This file is part of FreeNATS 4: 5: FreeNATS is (C) Copyright 2008-2017 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: 33: if (!$NATS->isUserAllowedGroup($NATS_Session->username,$_REQUEST['groupid'])) 34: UL_Error("View Group"); 35: 36: ob_end_flush(); 37: Screen_Header("Viewing Group",1); 38: ?> 39:
40: 41: 42: $q="SELECT * FROM fngroup WHERE groupid=\"".ss($_REQUEST['groupid'])."\" LIMIT 0,1"; 43: $r=$NATS->DB->Query($q); 44: if (!$row=$NATS->DB->Fetch_Array($r)) 45: { 46: echo "No such group.

";
47: Screen_Footer(); 48: exit(); 49: } 50: $NATS->DB->Free($r); 51: 52: echo "
"; 53: 54: echo "Group: ".$row['groupname']."

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

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