File: 1.00.6a/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,1,"","main","groups"); 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: $t="Group Settings"; 59: Start_Round($t,600); 60: echo ""; 61: echo "
";
62: echo ""; 63: echo ""; 64: 65: 66: echo ""; 71: 72: echo ""; 77: 78: echo ""; 83: 84: echo ""; 95: 96: 97: echo ""; 101: echo ""; 102: echo "
67: GroupID 68: :"; 69: echo $row['groupid']; 70: echo "
73: Group Name 74: :"; 75: echo ""; 76: echo "
79: Description 80: :"; 81: echo ""; 82: echo "
85: Group Icon 86: :"; 87: echo " [ Show Icons ]"; 93: echo " [ Show Icons ]"; 94: echo "
"; 98: echo " Cancel Changes"; 99: echo "

";
100: echo "
";
103: End_Round(); 104: 105: if (isset($_REQUEST['show_icons'])) 106: { 107: echo "

";
108: ShowIcons(); 109: echo "

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