<?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                          */
/********************************************************/
defined('IN_YA') OR die ('Access denied new_user1 MAXIMUS directly...');
defined('MAXIMUS') OR header("Location: index.php");

    mt_srand ((double)microtime()*1000000);
    $maxran = 1000000;
    $random_num = mt_rand(0, $maxran);
    incoh();
    title(_USERAPPLOGIN);
    Max_OpenTable();
    echo "<table align='center' cellpadding='3' cellspacing='3' border='0'>\n";
    echo "<tr><td align='center' bgcolor='$bgcolor1' colspan='2'><b>"._REGNEWUSER."</b> ("._ALLREQUIRED.")</td></tr>\n";
    echo "<form action='modules.php?name=$module_name' method='post'>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._NICKNAME.":</td><td bgcolor='$bgcolor1'><input type='text' name='username' size='30' maxlength='".$ya_config['nick_max']."'><br /><font class='tiny'>("._YA_NICKLENGTH.")</font></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._EMAIL.":</td><td bgcolor='$bgcolor1'><input type='text' name='user_email' size='30' maxlength='255'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._RETYPEEMAIL.":</td><td bgcolor='$bgcolor1'><input type='text' name='user_email2' size='30' maxlength='255'></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._PASSWORD.":</td><td bgcolor='$bgcolor1'><input type='password' name='user_password' size='11' maxlength='".$ya_config['pass_max']."'><br /><font class='tiny'>("._BLANKFORAUTO.")</font><br /><font class='tiny'>("._YA_PASSLENGTH.")</font></td></tr>\n";
    echo "<tr><td bgcolor='$bgcolor2'>"._RETYPEPASSWORD.":</td><td bgcolor='$bgcolor1'><input type='password' name='user_password2' size='11' maxlength='".$ya_config['pass_max']."'><br /><font class='tiny'>("._BLANKFORAUTO.")</font><br /><font class='tiny'>("._YA_PASSLENGTH.")</font></td></tr>\n";
    if (extension_loaded("gd") AND ($ya_config['usegfxcheck'] == 1 OR $ya_config['usegfxcheck'] == 3)) {
        echo "<tr><td bgcolor='$bgcolor2'>"._SECURITYCODE.":</td><td bgcolor='$bgcolor1'><img src='./?gfx=gfx&random_num=$random_num' border='0' height='20' width='80' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>\n";
        echo "<tr><td bgcolor='$bgcolor2'>"._TYPESECCODE.":</td><td bgcolor='$bgcolor1'><input type='text' name='gfx_check' size='10' maxlength='8'></td></tr>\n";
        echo "<input type='hidden' name='random_num' value='$random_num'/>\n";
    }
    echo "<input type='hidden' name='op' value='new_confirm'/>\n";
    echo "<tr><td align='center' bgcolor='$bgcolor1' colspan='2'><input type='submit' value='"._NEWUSER."'></td></tr>\n";
    echo "</form></table>\n";
    echo "<br />\n";
    echo ""._WAITAPPROVAL."<br /><br />\n";
    echo ""._COOKIEWARNING."<br />\n";
    echo ""._ASREGUSER."<br />\n";
    echo "<ul>\n";
    echo "<li>"._ASREG1."\n";
    echo "<li>"._ASREG2."\n";
    echo "<li>"._ASREG3."\n";
    echo "<li>"._ASREG4."\n";
    echo "<li>"._ASREG5."\n";
    $handle=opendir('themes');
    while ($file = readdir($handle)) {
        if ((!ereg("[.]",$file) AND file_exists("themes/$file/theme.php"))) { $thmcount++; }
    }
    closedir($handle);
    if ($thmcount > 1) { echo "<li>"._ASREG6."\n"; }
    $sql = "SELECT `custom_title` FROM `".TABLE_MODULES."` WHERE `active`='1' AND `install`='1' AND `view`='1' AND `inmenu`='1'";
    $result = $GLOBALS['db']->sql_query($sql);
    while ($row = $GLOBALS['db']->sql_fetchrow($result)) {
        $custom_title = stripslashes($row['custom_title']);
        if ($custom_title != "") { echo "<li>"._ACCESSTO." $custom_title\n"; }
    }
    $sql = "SELECT `title` FROM `".TABLE_BLOCKS."` WHERE `active`='1' AND `view`='1'";
    $result = $GLOBALS['db']->sql_query($sql);
    while ($row = $GLOBALS['db']->sql_fetchrow($result)) {
        $b_title = stripslashes($row['title']);
        if ($b_title != "") { echo "<li>"._ACCESSTO." $b_title\n"; }
    }
    if (is_active("Journal")) { echo "<li>"._CREATEJOURNAL."\n"; }
    if ($my_headlines == 1) { echo "<li>"._READHEADLINES."\n"; }
    echo "<li>"._ASREG7."\n";
    echo "</ul>\n";
    echo ""._REGISTERNOW."<br />\n";
    echo ""._WEDONTGIVE."<br /><br />\n";
    echo "<center><font class='content'>[ <a href='modules.php?name=$module_name'>"._USERLOGIN."</a> | <a href='modules.php?name=$module_name&amp;op=pass_lost'>"._PASSWORDLOST."</a> ]</font></center>\n";
    Max_CloseTable();
    incof();