Parašė ramon· 2008 Vas. 19 21:02:05
#10
Atsidarik
register.php faila.
Rask sia eilute :
if ($settings['enable_registration']) {
Po ja rasom (sita redaguokis pagal save) :
$uzdrausti = "1,11,111,1111,2,22,222,2222,3,33,333.3333.4,44,444,4444,5,55,555,5555,6,66,666,6666,7,77,777,7777,8,88,888,8888,9,99,999,9999,0,00,000,0000";
Ir dar po array isdestimo rasom dar sita funkcija :
function funk($username) {
global $uzdrausti;
$a=$uzdrausti!="" ? explode(",",$uzdrausti) : array();
$funkc = str_replace($a, 'NOUSER', strtolower($username));
if (eregi("NOUSER",$funkc)) {
return false;
} else {
return true;
}
}
Veliau rask sia eilute :
$username = stripinput(trim(eregi_replace(" +", "", $_POST['username'])));
Ir pekeisk (replace) :
$username = stripinput(trim(eregi_replace(" +", "_", $_POST['username'])));
Finaly, rask sia eilute :
if ($username == "" || $password1 == "" || $email == "") $error .= $locale['402']."<br>\n";
Ir aisku pakeisk i sias eilutes :
if ($username == "" || $password1 == "" || $email == "") $error .= $locale['402']."<br>\n";
if (!empty($username) && !funk($username)) { $error .= $locale['553'];}
if (!preg_match("/^[-0-9A-Z_@\s]{3,20}+$/i", $username)) $error .= $locale['403']."<br>\n";
PS gali ir neveikt nes rasiau bei netestinau..