stem */
/* =========================== */
/* */
/* Copyright (c) 2005 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$userpage = 1;
if(isset($_GET['redirect'])) $redirect = substr($_SERVER['QUERY_STRING'], strpos($_SERVER['QUERY_STRING'], "redirect=") + strlen("redirect="), strlen($_SERVER['QUERY_STRING']));
if(is_user($user)) {
include("modules/$module_name/navbar.php");
}
function userCheck($username, $user_email) {
$username = filter($username, "nohtml", 1);
$user_email = filter($user_email, "nohtml", 1);
global $stop, $user_prefix, $db;
if ((!$user_email) || (empty($user_email)) || (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$user_email))) $stop = "
"._ERRORINVEMAIL."
";
if (strrpos($user_email,' ') > 0) $stop = ""._ERROREMAILSPACES."";
if ((!$username) || (empty($username)) || (ereg("[^a-zA-Z0-9_-]",$username))) $stop = ""._ERRORINVNICK."
";
if (strlen($username) > 25) $stop = ""._NICK2LONG."";
if (eregi("^((root)|(adm)|(linux)|(webmaster)|(admin)|(god)|(administrator)|(administrador)|(nobody)|(anonymous)|(anonimo)|(anónimo)|(operator)|(JackFromWales4u2))$",$username)) $stop = ""._NAMERESERVED."";
if (strrpos($username,' ') > 0) $stop = ""._NICKNOSPACES."";
if ($db->sql_numrows($db->sql_query("SELECT username FROM ".$user_prefix."_users WHERE username='$username'")) > 0) $stop = ""._NICKTAKEN."
";
if ($db->sql_numrows($db->sql_query("SELECT username FROM ".$user_prefix."_users_temp WHERE username='$username'")) > 0) $stop = ""._NICKTAKEN."
";
if ($db->sql_numrows($db->sql_query("SELECT user_email FROM ".$user_prefix."_users WHERE user_email='$user_email'")) > 0) $stop = ""._EMAILREGISTERED."
";
if ($db->sql_numrows($db->sql_query("SELECT user_email FROM ".$user_prefix."_users_temp WHERE user_email='$user_email'")) > 0) $stop = ""._EMAILREGISTERED."
";
return $stop;
}
function confirmNewUser($username, $user_email, $user_password" href="/india/indiatour.php#north">