Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Vartotojo varde tik skaičiai ir raidės

Parašė AgS· 2010 Rugs. 29 17:09:09
#16

čia register.php faile,


} else if (isset($_POST['register'])) {
	$error = "";
 
	$username = stripinput(trim(eregi_replace(" +", "", $_POST['username'])));
	$email = stripinput(trim(eregi_replace(" +", "", $_POST['email'])));
	$password1 = stripinput(trim(eregi_replace(" +", "", $_POST['password1'])));
 
	if ($username == "" || $password1 == "" || $email == "" || $gender == "" || $user_year == "" || $user_month == "") $error .= $locale['402']."<br>\n";
 
	if (!preg_match("/[^A-z0-9_\-]/", $username)) $error .= $locale['403']."<br>\n";
 
	if (preg_match("/^[0-9A-Z@]{6,20}$/i", $password1)) {
		if ($password1 != $_POST['password2']) $error .= $locale['404']."<br>\n";
	} else {
		$error .= $locale['405']."<br>\n";
	}
 
	if (!preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $email)) {
		$error .= $locale['406']."<br>\n";
	}

Redagavo AgS· 2010 Rugs. 29 17:09:27