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