Location: PHPKode > projects > Simple But Mighty Blog > sbmb03/reg.php
<?
//Simple But Mighty Blog, version 0.3.1
//copyright © 2007, Mighty Mind
// @license http://opensource.org/licenses/gpl-license.php GNU Public License
// Äàííàÿ ïðîãðàììà ÿâëÿåòñÿ ñâîáîäíûì ïðîãðàììíûì îáåñïå÷åíèåì. Âû âïðàâå ðàñïðîñòðàíÿòü åå è/èëè ìîäèôèöèðîâàòü â ñîîòâåòñòâèè ñ
//óñëîâèÿìè âåðñèè 3 Ñòàíäàðòíîé Îáùåñòâåííîé Ëèöåíçèè GNU, îïóáëèêîâàííîé Free Software Foundation. 
// Ìû ðàñïðîñòðàíÿåì äàííóþ ïðîãðàììó â íàäåæäå íà òî, ÷òî îíà áóäåò âàì ïîëåçíîé, îäíàêî ÍÅ ÏÐÅÄÎÑÒÀÂËßÅÌ ÍÀ ÍÅÅ ÍÈÊÀÊÈÕ ÃÀÐÀÍÒÈÉ,
//â òîì ÷èñëå ÃÀÐÀÍÒÈÈ ÒÎÂÀÐÍÎÃÎ ÑÎÑÒÎßÍÈß ÏÐÈ ÏÐÎÄÀÆÅ è ÏÐÈÃÎÄÍÎÑÒÈ ÄËß ÈÑÏÎËÜÇÎÂÀÍÈß Â ÊÎÍÊÐÅÒÍÛÕ ÖÅËßÕ.
//Äëÿ ïîëó÷åíèÿ áîëåå ïîäðîáíîé èíôîðìàöèè îçíàêîìüòåñü ñî Ñòàíäàðòíîé Îáùåñòâåííîé Ëèöåíçèåé GNU.
//Âìåñòå ñ äàííîé ïðîãðàììîé âû äîëæíû áûëè ïîëó÷èòü ýêçåìïëÿð Ñòàíäàðòíîé Îáùåñòâåííîé Ëèöåíçèè GNU.
//Åñëè âû åãî íå ïîëó÷èëè, ñîîáùèòå îá ýòîì â Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//

include ("config.php");
include ("functions.php");

if ((isset($_POST["login"])) and (isset($_POST["password"])) and (isset($_POST["email"])))
{
$login=check_string($_POST["login"]);
@$result=mysql_query("SELECT * FROM `$t_users` WHERE login='$login'") or die("<p>Îøèáêà ïðè ïîèñêå ïîëüçîâàòåëÿ!<p>");
if (mysql_num_rows($result)==0) {
$password=md5(check_string($_POST["password"]));
$email=check_email($_POST["email"]);
$ip=$_SERVER["REMOTE_ADDR"];
$referer=$_SERVER["HTTP_REFERER"];
@$result=mysql_query("INSERT INTO `$t_users` (`id`,`login`,`password`,`email`,`status`,`ip`,`image`,`style`) VALUES (0,'$login','$password','$email',1,'$ip','','".$CONFIG["blog_style"]."')") or die("<p>Îøèáêà ïðè ðåãèñòðàöèè ïîëüçîâàòåëÿ!<p>");
Header("Location: index.php");
}
else {?>Ïîëüçîâàòåëü ñ òàêèì èìåíåì óæå ñóùåñòâóåò!<p><a href=reg.php>Ðåãèñòðàöèÿ</a><?}
}

else

{
?>
<html>
<? get_html_head();?>
<body>
<form method=POST>
<p align=center>
Ëîãèí<br><input type=text name=login><br>
Ïàðîëü<br><input type=text name=password><br>
E-Mail<br><input type=text name=email><br><br>
<input type=submit value="Ïîäàòü çàÿâêó"></p>
</form>
</body>
</html>
<?
}
?>
Return current item: Simple But Mighty Blog