<?php
/********************************************************/
/* NSN Your Account                                     */
/* By: NukeScripts Network (webmaster@nukescripts.fr)   */
/* http://www.nukescripts.fr                            */
/* Copyright  2000-2004 by NukeScripts Network         */
/* ==================================================== */
/* Based from:                                          */
/* NSN YAT 320 from www.nukescripts.net                 */
/* Based from:                                          */
/* PHP-NUKE: Web Portal System                          */
/********************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}
global $admin_file;
$aid = substr("$aid", 0,25);
$row = $GLOBALS['db']->sql_fetchrow($GLOBALS['db']->sql_query("SELECT `title`, `admins` FROM `".TABLE_MODULES."` WHERE title='Your_Account'"));
$row2 = $GLOBALS['db']->sql_fetchrow($GLOBALS['db']->sql_query("SELECT `name`, `radminsuper` FROM `".TABLE_AUTHORS."` WHERE `aid`='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) {
    if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") {
        $auth_user = 1;
    }
}
if ($row2['radminsuper'] == 1 || $auth_user == 1) {


    $pagetitle = ": "._USERADMIN." - "._ADDUSER;
    incoh();
    title(_USERADMIN." - "._ADDUSER);
    amain();
    echo "<br />\n";
    Max_OpenTable();
    echo "<center><table border='0'>\n";
    echo "<form action='".$admin_file.".php' method='post'>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._NICKNAME.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_uname' size='30' maxlength='".$ya_config['nick_max']."'> <font class='tiny'>"._REQUIRED."</font></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._NAME.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_name' size='30' maxlength='50'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._EMAIL.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_email' size='30' maxlength='60'> <font class='tiny'>"._REQUIRED."</font></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._RETYPEEMAIL.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_email2' size='30' maxlength='60'> <font class='tiny'>"._REQUIRED."</font></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._FAKEEMAIL.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_femail' size='30' maxlength='60'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._URL.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_url' size='30' maxlength='60'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._ICQ.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_user_icq' size='20' maxlength='20'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._AIM.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_user_aim' size='20' maxlength='20'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._YIM.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_user_yim' size='20' maxlength='20'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._MSNM.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_user_msnm' size='20' maxlength='20'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._LOCATION.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_user_from' size='25' maxlength='60'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._OCCUPATION.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_user_occ' size='25' maxlength='60'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._INTERESTS.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_user_intrest' size='25' maxlength='255'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._OPTION.":</td><td bgcolor='$bgcolor1'><input type='checkbox' name='add_user_viewemail' VALUE='1'> "._ALLOWUSERS."</td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._NEWSLETTER.":</td><td bgcolor='$bgcolor1'><input type='checkbox' name='add_newsletter' value='1'> "._YES."</td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._YA_POINTS.":</td><td bgcolor='$bgcolor1'><input type='test' name='add_points' value='0'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2' valign='top'>"._SIGNATURE.":</td><td bgcolor='$bgcolor1'><textarea name='add_user_sig' rows='6' cols='45'></textarea></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._PASSWORD.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_pass' size='12' maxlength='".$ya_config['pass_max']."'> <font class='tiny'>"._REQUIRED."</font></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._RETYPEPASSWORD.":</td><td bgcolor='$bgcolor1'><input type='text' name='add_pass2' size='12' maxlength='".$ya_config['pass_max']."'> <font class='tiny'>"._REQUIRED."</font></td></tr>\n";
    echo "<input type='hidden' name='add_avatar' value='gallery/blank.gif'>\n";
    echo "<input type='hidden' name='op' value='addUserConf'>\n";
    if (isset($min)) { echo "<input type='hidden' name='min' value='$min'>\n"; }
    if (isset($xop)) { echo "<input type='hidden' name='xop' value='$xop'>\n"; }
    echo "<tr><td align='center' colspan='2'><input type='submit' value='"._ADDUSERBUT."'></td></tr>\n";
    echo "</form>\n";
    echo "<form action='".$admin_file.".php?op=members' method='post'>\n";
    if (isset($min)) { echo "<input type='hidden' name='min' value='$min'>\n"; }
    if (isset($xop)) { echo "<input type='hidden' name='op' value='$xop'>\n"; }
    echo "<tr><td align='center' colspan='2'><input type='submit' value='"._CANCEL."'></td></tr>\n";
    echo "</form>\n";
    echo "</table>\n";
    Max_CloseTable();
    incof();

}