<?php
/********************************************************/
/* NSN Groups                                           */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright  2000-2005 by NukeScripts Network         */
/********************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}

$pagetitle = _GR_ADMIN." ".$gr_config['version_number'].": "._GR_GROUPSEDIT;
incoh();
title("$pagetitle");
NSNGroupsAdmin();
br('1');
Max_OpenTable();
echo "<center><table border='0' cellpadding='0' cellspacing='2'>\n";
echo "<form method='post' action='".$admin_file.".php'>\n";
echo "<input type='hidden' name='op' value='NSNGroupsEditSave' />\n";
echo "<input type='hidden' name='gid' value='$gid' />\n";
$grow = $GLOBALS['db']->sql_fetchrow($GLOBALS['db']->sql_query("SELECT * FROM `".TABLE_NSNGR_GROUPS."` WHERE `gid`='$gid'"));
echo "<input type='hidden' name='old_muid' value='".$grow['muid']."' />\n";
echo "<tr><td bgcolor='$bgcolor2'><b>"._GR_GROUP.":</b></td>";
echo "<td><input type='text' name='gname' size='40' maxlength='32' value=\"".$grow['gname']."\" /></td></tr>\n";
$mrow = $GLOBALS['db']->sql_fetchrow($GLOBALS['db']->sql_query("SELECT * FROM `".TABLE_USERS."` WHERE `user_id`='".$grow['muid']."'"));
echo "<tr><td bgcolor='$bgcolor2'><b>"._GR_BBMODERATOR.":</b></td>";
echo "<td><input type='text' name='mname' size='30' maxlength='25' value=\"".$mrow['username']."\" /></td></tr>\n";
echo "<tr><td bgcolor='$bgcolor2' valign='top'><b>"._GR_DESCRIPTION.":</b></td>";
echo "<td><textarea name='gdesc' cols='40' rows='10'>".$grow['gdesc']."</textarea></td></tr>\n";
$sel1 = $sel2 = "";
if ($grow['public'] == 0) { $sel1 = " selected"; } else { $sel2 = " selected"; }
echo "<tr><td bgcolor='$bgcolor2' valign='top'><b>"._GR_PUBLIC.":</b></td>";
echo "<td><select name='gpublic'><option value='0'$sel1>"._NO."</option>";
echo "<option value='1'$sel2>"._YES."</option></select><br />"._GR_PUBLICNOTE."</td></tr>\n";
echo "<tr><td bgcolor='$bgcolor2' valign='top'><b>"._GR_LIMIT.":</b></td>";
echo "<td><input type='text' name='glimit' size='4' maxlength='4' value='".$grow['glimit']."' /><br />"._GR_LIMITNOTE."</td></tr>\n";
echo "<tr><td align='center' colspan='2'><input type='submit' value='"._GR_EDITGRP."' onclick=\"this.form.submit();this.disabled=true;this.value='"._WAITING."'\" /></td></tr>\n";
echo "</form>\n";
echo "</table></center>\n";
Max_CloseTable();
incof();