File: 0.02.50a/server/web/group.edit.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 FreeNATS. 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<5) UL_Error("Edit Group"); 32: ob_end_flush(); 33: Screen_Header("Group Editor",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: echo "Editing Group: ".$row['groupname']."

";
48: 49: 50: echo ""; 51: echo "
";
52: echo ""; 53: echo ""; 54: echo ""; 55: 56: echo ""; 61: 62: echo ""; 67: 68: echo ""; 73: 74: echo ""; 84: 85: 86: echo ""; 90: echo ""; 91: 92: if (isset($_REQUEST['show_icons'])) 93: { 94: echo ""; 97: } 98: 99: 100: echo ""; 101: 102: echo "
Group Settings

57: GroupID 58: :"; 59: echo $row['groupid']; 60: echo "
63: Group Name 64: :"; 65: echo ""; 66: echo "
69: Description 70: :"; 71: echo ""; 72: echo "
75: Group Icon 76: :"; 77: echo " [ Show Icons ]"; 83: echo "
"; 87: echo " Cancel Changes"; 88: echo "

";
89: echo "


"; 95: ShowIcons(); 96: echo "


Group Members

";
103: 104: echo ""; 105: echo ""; 106: echo ""; 107: $q="SELECT nodeid,nodename FROM fnnode"; 108: $r=$NATS->DB->Query($q); 109: $c=0; 110: while ($row=$NATS->DB->Fetch_Array($r)) 111: { 112: // has link? 113: $lq="SELECT glid FROM fngrouplink WHERE groupid=\"".ss($_REQUEST['groupid'])."\" AND nodeid=\"".ss($row['nodeid'])."\" LIMIT 0,1"; 114: $lr=$NATS->DB->Query($lq); 115: if ($NATS->DB->Num_Rows($lr)>0) $s=" checked"; 116: else $s=""; 117: $NATS->DB->Free($lr); 118: echo ""; 120: } 121: $NATS->DB->Free($r); 122: echo ""; 123: echo "
"; 119: echo "".$row['nodeid']." - ".$row['nodename']."
";
124: 125: ?> 126: 127: 128: 129: Screen_Footer(); 130: ?> 131: