File: 1.02.4b/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 ""; 96: 97: 98: echo ""; 102: echo ""; 103: 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 ]"; 94: echo " [ Show Icons ]"; 95: echo "
"; 99: echo " Cancel Changes"; 100: echo "

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

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

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