<?php
/********************************************************/
/* NSN Your Account                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.fr                            */
/* Original Script www.nukescripst.net                  */
/* Copyright © 2000-2005 by NukeScripts Network         */
/* ==================================================== */
/* Based from:                                          */
/* PHP-NUKE: Web Portal System                          */
/********************************************************/

if (!defined('IN_YA')) { die("You can't access this file directly."); }
if (!defined('MAXIMUS')) {
header("Location: index.php");
  die();
}

    incoh();
    if ($user_email != $user_email2) {
        Max_OpenTable();
        echo "<center><font class='title'><b>"._ERRORREG."</b></font><br /><br />";
        echo "<font class='content'>"._EMAILDIFFERENT."<br /><br />"._GOBACK."</font></center>";
        Max_CloseTable();
        incof();
        die();
    }
    $user_viewemail = "0";
    $user_email = strtolower($user_email);
    ya_userCheck($username);
    ya_mailCheck($user_email);
    if (!$stop) {
        $datekey = date("F j");
        $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $_POST[random_num] . $datekey));
        $code = substr($rcode, 2, 6);
        if (extension_loaded("gd") AND $code != $gfx_check AND ($ya_config['usegfxcheck'] == 1 OR $ya_config['usegfxcheck'] == 3)) {
            Max_OpenTable();
            echo "<center><font class='title'><b>"._ERRORREG."</b></font><br /><br />";
            echo "<font class='content'>"._SECCODEINCOR."<br /><br />"._GOBACK."</font></center>";
            Max_CloseTable();
            incof();
            die();
        }
        if ($user_password == "" AND $user_password2 == "") {
            $user_password = YA_MakePass();
        } elseif ($user_password != $user_password2) {
            Max_OpenTable();
            echo "<center><font class='title'><b>"._ERRORREG."</b></font><br /><br />";
            echo "<font class='content'>"._PASSDIFFERENT."<br /><br />"._GOBACK."</font></center>";
            Max_CloseTable();
            incof();
            die();
        } elseif ($user_password == $user_password2 AND (strlen($user_password) < $ya_config['pass_min'] OR strlen($user_password) > $ya_config['pass_max'])) {
            Max_OpenTable();
            echo "<center><font class='title'><b>"._ERRORREG."</b></font><br /><br />";
            echo "<font class='content'>"._YA_PASSLENGTH."<br /><br />"._GOBACK."</font></center>";
            Max_CloseTable();
            incof();
            die();
        }
        title(_USERREGLOGIN);
        Max_OpenTable();
        echo "<center><b>"._USERFINALSTEP."</b><br /><br />$username, "._USERCHECKDATA."</center><br /><br />";
        echo "<table align='center' border='0'>";
        echo "<tr><td><b>"._USERNAME.":</b> $username<br /></td></tr>";
        echo "<tr><td><b>"._EMAIL.":</b> $user_email</td></tr>";
        echo "<tr><td><b>"._YA_PASSWORD.":</b> $user_password<br /></td></tr>";
        echo "</table>";
        echo "<center><form action='modules.php?name=$module_name' method='post'>";
        echo "<input type='hidden' name='random_num' value='$random_num'>";
        echo "<input type='hidden' name='gfx_check' value='$gfx_check'>";
        echo "<input type='hidden' name='username' value='$username'>";
        echo "<input type='hidden' name='user_email' value='$user_email'>";
        echo "<input type='hidden' name='user_password' value='$user_password'>";
        echo "<input type='hidden' name='realname' value='$realname'>\n";
        echo "<input type='hidden' name='femail' value='$femail'>\n";
        echo "<input type='hidden' name='user_website' value='$user_website'>\n";
        echo "<input type='hidden' name='user_icq' value='$user_icq'>\n";
        echo "<input type='hidden' name='user_aim' value='$user_aim'>\n";
        echo "<input type='hidden' name='user_yim' value='$user_yim'>\n";
        echo "<input type='hidden' name='user_msnm' value='$user_msnm'>\n";
        echo "<input type='hidden' name='user_from' value='$user_from'>\n";
        echo "<input type='hidden' name='user_occ' value='$user_occ'>\n";
        echo "<input type='hidden' name='user_interests' value='$user_interests'>\n";
        echo "<input type='hidden' name='newsletter' value='$newsletter'>\n";
        echo "<input type='hidden' name='user_viewemail' value='$user_viewemail'>\n";
        echo "<input type='hidden' name='user_allow_viewonline' value='$user_allow_viewonline'>\n";
        echo "<input type='hidden' name='user_timezone' value='$user_timezone'>\n";
        echo "<input type='hidden' name='user_dateformat' value='$user_dateformat'>\n";
        echo "<input type='hidden' name='user_sig' value='$user_sig'>\n";
        echo "<input type='hidden' name='bio' value='$bio'>\n";
        echo "<input type='hidden' name='op' value='new_finish'><br /><br />";
        echo "<input type='submit' value='"._FINISH."'> &nbsp;&nbsp;"._GOBACK."</form></center>";
        Max_CloseTable();
    } else {
        Max_OpenTable();
        echo "<center><font class='title'><b>"._ERRORREG."</b></font><br /><br />";
        echo "<font class='content'>$stop<br /><br />"._GOBACK."</font></center>";
        Max_CloseTable();
    }
    incof();
