<?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_GROUPSUSERSMOVE;
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?op=NSNGroupsUsersMoveSave'>\n";
echo "<input type='hidden' name='gid' value='$gid' />\n";
echo "<input type='hidden' name='uid' value='$chng_uid' />\n";
echo "<tr>\n";
list($uname) = $GLOBALS['db']->sql_fetchrow($GLOBALS['db']->sql_query("SELECT `username` FROM `".TABLE_USERS."` WHERE `user_id`='$chng_uid'"));
echo "<td class='content' align='center'>"._GR_USRNAME.": $uname<br />\n";
list($gname) = $GLOBALS['db']->sql_fetchrow($GLOBALS['db']->sql_query("SELECT `gname` FROM `".TABLE_NSNGR_GROUPS."` WHERE `gid`='$gid'"));
echo ""._GR_CURRGROUP.": $gname<br />\n";
echo ""._GR_NEWGROUP.": <select name='new_gid'>\n";
$result3 = $GLOBALS['db']->sql_query("select `gid`, `gname` from `".TABLE_NSNGR_GROUPS."` order by `gname`");
while(list($thisGID, $thisGNAME) = $GLOBALS['db']->sql_fetchrow($result3)) {
  if ($thisGID != $gid) { echo "<option value='$thisGID'>$thisGNAME</option><br />\n"; }
}
echo "</select><br />\n";
echo "<input type='submit' value='"._GR_MOVEUSR."' onclick=\"this.form.submit();this.disabled=true;this.value='"._WAITING."'\" /></td>\n";
echo "</tr>\n";
echo "</form>\n";
echo "</table></center>\n";
Max_CloseTable();
incof();