File: 1.17.3a/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: $r=$NATS->DB->Query($q); 92: while ($row=$NATS->DB->Fetch_Array($r)) 93: { 94: if ($a==0) echo ""; 95: echo ""; 98: $a++; 99: if ($a>=5) 100: { 101: echo ""; 102: $a=0; 103: } 104: } 105: if ($a>0) echo ""; 106: /* 107: if ($a>0) // otherwise at the first row anyway 108: { 109: while ($a<5) 110: { 111: echo ""; 112: $a++; 113: } 114: echo ""; 115: } 116: */ 117: echo "
"; 96: np_tiny($row['nodeid']); 97: echo "
 
";
118: 119: ?> 120: 121: 122: 123: Screen_Footer(); 124: ?> 125: