File: 0.04.09a/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: echo "\n\n\n"; 43: ?> 44:
45: 46: 47: $q="SELECT * FROM fngroup WHERE groupid=".ss($_REQUEST['groupid'])." LIMIT 0,1"; 48: $r=$NATS->DB->Query($q); 49: if (!$row=$NATS->DB->Fetch_Array($r)) 50: { 51: echo "No such group.

";
52: Screen_Footer(); 53: exit(); 54: } 55: $NATS->DB->Free($r); 56: echo "Editing Group: ".$row['groupname']."

";
57: 58: 59: echo ""; 60: echo "
";
61: echo ""; 62: echo ""; 63: echo ""; 64: 65: echo ""; 70: 71: echo ""; 76: 77: echo ""; 82: 83: echo ""; 94: 95: 96: echo ""; 100: echo ""; 101: 102: if (isset($_REQUEST['show_icons'])) 103: { 104: echo ""; 107: } 108: 109: echo ""; 110: 111: 112: echo ""; 113: 114: echo "
Group Settings

66: GroupID 67: :"; 68: echo $row['groupid']; 69: echo "
72: Group Name 73: :"; 74: echo ""; 75: echo "
78: Description 79: :"; 80: echo ""; 81: echo "
84: Group Icon 85: :"; 86: echo " [ Show Icons ]"; 92: echo " [ Show Icons ]"; 93: echo "
"; 97: echo " Cancel Changes"; 98: echo "

";
99: echo "


"; 105: ShowIcons(); 106: echo "


Group Members

";
115: 116: echo ""; 117: echo ""; 118: echo ""; 119: $q="SELECT nodeid,nodename FROM fnnode ORDER BY weight ASC"; 120: $r=$NATS->DB->Query($q); 121: $c=0; 122: while ($row=$NATS->DB->Fetch_Array($r)) 123: { 124: // has link? 125: $lq="SELECT glid FROM fngrouplink WHERE groupid=\"".ss($_REQUEST['groupid'])."\" AND nodeid=\"".ss($row['nodeid'])."\" LIMIT 0,1"; 126: $lr=$NATS->DB->Query($lq); 127: if ($NATS->DB->Num_Rows($lr)>0) $s=" checked"; 128: else $s=""; 129: $NATS->DB->Free($lr); 130: echo ""; 132: } 133: $NATS->DB->Free($r); 134: echo ""; 135: echo "
"; 131: echo "".$row['nodeid']." - ".$row['nodename']."
";
136: 137: ?> 138: 139: 140: 141: Screen_Footer(); 142: ?> 143: