Viewing File server/web/group.php of 1.17.3a
|
1: <?php 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: <br> 40: <?php 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.<br><br>"; 47: Screen_Footer(); 48: exit(); 49: } 50: $NATS->DB->Free($r); 51: 52: echo "<table border=0><tr><td align=left valign=top>"; 53: 54: echo "<b class=\"minortitle\">Group: ".$row['groupname']."</b><br><br>"; 55: 56: echo "<table class=\"nicetable\">"; 57: 58: echo "<tr><td align=right> 59: Group Name 60: :</td><td align=left>"; 61: echo $row['groupname']; 62: echo "</td></tr>"; 63: 64: echo "<tr><td align=right> 65: Description 66: :</td><td align=left>"; 67: echo $row['groupdesc']; 68: echo "</td></tr>"; 69: 70: echo "<tr><td align=right> 71: Status 72: :</td><td align=left>"; 73: $al=$NATS->GroupAlertLevel($_REQUEST['groupid']); 74: echo "<b class=\"al".$al."\">"; 75: echo oText($al); 76: echo "</b>"; 77: echo "</td></tr>"; 78: 79: if ($NATS_Session->userlevel>4) 80: echo "<tr><td align=right>Settings :</td><td align=left><a href=group.edit.php?groupid=".$_REQUEST['groupid'].">Group Options</a></td></tr>"; 81: 82: echo "</table>"; 83: echo "</td><td style=\"width: 50px;\"> </td><td align=left valign=top>"; 84: ng_tiny($_REQUEST['groupid'],$row['groupname']); 85: echo "</td></tr></table>"; 86: 87: echo "<br><br>"; 88: echo "<table border=0>"; 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 "<tr>"; 95: echo "<td>"; 96: np_tiny($row['nodeid']); 97: echo "</td>"; 98: $a++; 99: if ($a>=5) 100: { 101: echo "</tr>"; 102: $a=0; 103: } 104: } 105: if ($a>0) echo "</tr>"; 106: /* 107: if ($a>0) // otherwise at the first row anyway 108: { 109: while ($a<5) 110: { 111: echo "<td> </td>"; 112: $a++; 113: } 114: echo "</tr>"; 115: } 116: */ 117: echo "</table>"; 118: 119: ?> 120: 121: 122: <?php 123: Screen_Footer(); 124: ?> 125: