include ("design/session.inc.php"); include ("design/config.inc.php"); include ("design/function.inc.php"); $label_user=0; if (isset($_SESSION['valid_user']) and (!empty($_SESSION['valid_user']))) { $label_user=1; } // Объявление переменных для размера полей $status_ok = 0; $max_email = 30; $max_login = 16; // Проверка на правильность заполнения обязательных полей if (isset($_POST['reconstruction'])) { if (isset($_POST['input_login']) && empty($_POST['input_login'])) { $error[] = 'Вы не указали Логин.'; } else { if (strlen($_POST['input_login']) <= $max_login) { $sql_login=cutty($_POST['input_login']); $show_login=cutty_html($_POST['input_login']); } else { $error[] = "Логин не должен превышать $max_login символов."; } } if (isset($_POST['input_email']) && !empty($_POST['input_email'])) { if (strlen($_POST['input_email']) <= $max_email) { if (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',$_POST['input_email'])) { $sql_email = cutty($_POST['input_email']); $show_email = cutty_html($_POST['input_email']); } else { $error[] = 'Такой электронной почты (email) не существует.'; } } else { $error[] = "Поле \"Адрес электронной почты (email)\" не должно превышать $max_email символов."; } } else { $error[] = 'Вы не указали E-mail.'; } if ($error == "") { $sql_reconstruction = ("SELECT user_login, user_email FROM ".$tablename_user." WHERE user_login='".$sql_login."' AND user_email='".$sql_email."'"); $result_reconstruction = mysql_query($sql_reconstruction) or die ("$h_error".mysql_error()."$f_error"); if (mysql_num_rows($result_reconstruction)>0) { while($row = mysql_fetch_array($result_reconstruction)) { $user_login_reading = cutty_html($row['user_login']); $user_email_reading = cutty_html($row['user_email']); } } else { $error[] = 'Извините, но такого логина /адреса электронной почты (email), в базе данных нет.'; } } $status_ok=1; } ?>
include("design/top.inc.php");?> | ||||||||||||||||||||||
include("design/top_menu.inc.php"); ?> | ||||||||||||||||||||||
|
||||||||||||||||||||||
include("design/bottom.inc.php"); ?> |