Здравствуйте, помогите пожалуйста новичку завершить страничку регистрации <?PHP $_OPTIMIZATION["title"] = "Ðåãèñòðàöèÿ"; $_OPTIMIZATION["description"] = "Ðåãèñòðàöèÿ ïîëüçîâàòåëÿ â ñèñòåìå"; $_OPTIMIZATION["keywords"] = "Ðåãèñòðàöèÿ íîâîãî ó÷àñòíèêà â ñèñòåìå"; if(isset($_SESSION["user_id"])){ Header("Location: /account"); return; } ?> <div class="s-bk-lf"> <div class="acc-title">Ðåãèñòðàöèÿ</div> </div> <div class="silver-bk"><div class="clr"></div> <?PHP # Ðåãèñòðàöèÿ if(isset($_POST["login"])){ if(isset($_SESSION["captcha"]) AND strtolower($_SESSION["captcha"]) == strtolower($_POST["captcha"])){ unset($_SESSION["captcha"]); $login = $func->IsLogin($_POST["login"]); $pass = $func->IsPassword($_POST["pass"]); $status = $func->IsStatus($_POST["status"]); $rules = isset($_POST["rules"]) ? true : false; $time = time(); $ip = $func->UserIP; $email = $func->IsMail($_POST["email"]); $referer_id = (isset($_COOKIE["i"]) AND intval($_COOKIE["i"]) > 0 AND intval($_COOKIE["i"]) < 1000000) ? intval($_COOKIE["i"]) : 1; $referer_name = ""; if($referer_id != 1){ $db->Query("SELECT user FROM db_users_a WHERE id = '$referer_id' LIMIT 1"); if($db->NumRows() > 0){$referer_name = $db->FetchRow();} else{ $referer_id = 1; $referer_name = "Admin"; } }else{ $referer_id = 1; $referer_name = "First"; } if($rules){ if($email !== false){ if($login !== false){ if($pass !== false){ if($pass == $_POST["repass"]){ if($status !== false){ $db->Query("SELECT COUNT(*) FROM db_users_a WHERE user = '$login'"); if($db->FetchRow() == 0){ # Ðåãàåì ïîëüçîâàòåëÿ $db->Query("INSERT INTO db_users_a (user, email, pass, status, referer, referer_id, date_reg, ip) VALUES ('$login','{$email}','$pass','$status','$referer_name','$referer_id','$time',INET_ATON('$ip'))"); $lid = $db->LastInsert(); $db->Query("INSERT INTO db_users_b (id, user, money_b, a_t, last_sbor) VALUES ('$lid','$login','20000', '1', '".time()."')"); $db->Query("UPDATE db_users_b SET money_b = money_b +100 WHERE id = '$referer_id'"); # Âñòàâëÿåì ñòàòèñòèêó $db->Query("UPDATE db_stats SET all_users = all_users +1 WHERE id = '1'"); echo "<center><div class='alert' id='good'>Âû óñïåøíî çàðåãèñòðèðîâàëèñü. Èñïîëüçóéòå ôîðìó ñëåâà äëÿ âõîäà â àêêàóíò</div></center>"; ?></div> <div class="clr"></div> <div class="clr"></div> <br> <br> </div> <div class="clr"></div> <?PHP return; }else echo "<center><div class='alert' id='error'>Óêàçàííûé ëîãèí óæå èñïîëüçóåòñÿ</div></center>"; }else echo "<center><div class='alert' id='error'>Ïàðîëü è ïîâòîð ïàðîëÿ íå ñîâïàäàþò</div></center>"; }else echo "<center><div class='alert' id='error'>Ïàðîëü çàïîëíåí íåâåðíî</div></center>"; }else echo "<center><div class='alert' id='error'>Ëîãèí çàïîëíåí íåâåðíî</div></center>"; }else echo "<center><font color = 'red'><b>Email èìååò íåâåðíûé ôîðìàò</b></font></center>"; }else echo "<center><div class='alert' id='error'>Âû íå ïîäòâåðäèëè ïðàâèëà</div></center>"; }else echo "<center><font color = 'red'><b>Ñèìâîëû ñ êàðòèíêè ââåäåíû íåâåðíî</b></font></center>"; } } ?>