File size: 3.29Kb
<?php
//ᮥ¤ЁҐЁҐ б Ў §®© ¤ ле
include "config.php";
//®Ўа Ў влў Ґ¬ Ї®«гзҐлҐ ¤ лҐ
$title=cyr(htmlspecialchars(stripslashes(trim($title))));
$pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
$email=cyr(htmlspecialchars(stripslashes(trim($email))));
$about=cyr(htmlspecialchars(stripslashes(trim($about))));
$link=cyr(htmlspecialchars(stripslashes(trim($link))));
//дгЄжЁп з « ўлў®¤ wml Є®¤
function go()
{
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">";
print "<wml><head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>
<card title=\"ђҐЈЁбва жЁп\">
<p align=\"left\">";
};
//дгЄжЁп ®Є®з Ёп wml Є®¤
function ending()
{
print "</p></card></wml>";
};
// з «® ўлў®¤ ў Ўа 㧥а wml бва Ёжл
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
go();
//ўлЎ®а Ё§ в Ў«Ёжл ¤ ле ® Ї®«м§®ў ⥫пе
$query_users = mysql_query("select * from `".$px.$utable."`;");
//ўлЎ®а ¤ ле ¤ ®Ј® Ї®«м§®ў ⥫п
$query_users_title = mysql_query("select * from `".$px.$utable."` where title='$title';");
//ЄЁ¤ Ґ¬ ўбҐ ў ¬ ббЁў
$users_title = mysql_fetch_array($query_users_title);
//Ў«®Є Їа®ўҐаЄЁ ®ЎиЁЎ®Є, ўбҐ ®ЎиЁЎЄЁ § ЇЁблў Ґ¬ ў ЇҐаҐ¬Ґго
if(empty($title)) $error="Ќ §ў ЁҐ Їгбв®!<br/>";
if(empty($pass)) $error=$error."ЌҐ ўўҐ¤Ґ Ї а®«м!<br/>";
if(empty($link)) $error=$error."ЌҐ ўўҐ¤Ґ ббл«Є !<br/>";
if(empty($email)) $error=$error."ЌҐв ¬л« !<br/>";
if(empty($about)) $error=$error."ЋЇЁб Ёп Ґв!<br/>";
if(empty($k)) $error=$error."ЌҐ ўлЎа Є ⥣®аЁп!<br/>";
///////////////////////////////////
$db_title = $users_title['title'];
//Ґб«Ё ®иЁЎ®Є Ґв, Ё¤Ґ¬ ¤ «миҐ
if(empty($error))
{ //Ґб«Ё Їгбв § Ј®«®ў®Є Ё Ї бб ўлў ®¤Ё¬ ®иЁЎЄг Їгбв®вл :)
if(empty($title)||empty($pass))
{
print "ОШИБКА!<br/>Не все поля заполнены!";
} //Ё зҐ ў®в:
else
{ //Ґб«Ё в Є®Ј® §ў Ёп ў Ў §Ґ Ґв, Їа®¤ «¦ Ґ¬
if($title != $db_title)
{ //ЄЁ¤ Ґ¬ ў Ў §г ®ў®Ј® а
if(!$act) { print $db_title;
mysql_query("insert into `".$px.$utable."` values(0,'$title','$link','$pass','$email','$about',0,'".time()."','$k','0','0');");
//г§ Ґ¬ ¤ лҐ в®«мЄ® зв® § ॣ ®Ј® Ї®«м§®ў ⥫п
$q=mysql_query("select * from `".$px.$utable."` where title='$title' limit 1;");
$data=mysql_fetch_array($q);
$id=$data['id'];
//и«Ґ¬ Є®¤ ¬л«®
mail($email,"REGISTRATION IN RATE-KAT!","link: http://mobilka.us/katalog/vote?i=$id","From: $site");
print $title." гбЇҐи® § ॣЁбваЁа®ў ! ђ §¬ҐбвЁвҐ б«Ґ¤гойЁ© Є®¤ г ᥡп б ©вҐ:<br/>".(htmlspecialchars("<a href=\"http://mobilka.us/katalog/vote.php?i="))."$id\">ѓ®«®б®ў вм § б ©в</a>";
} else {
mysql_query("update `".$px.$utable."` set pass='$pass',link='$link',about='$about',category='$k' where title='$title';");
print "‚ иЁ ¤ лҐ гбЇҐи® Ё§¬ҐҐл!<br/>";
}
} //Ё зҐ
else
{
print "’ Є®Ґ §ў ЁҐ 㦥 Ґбвм ў Є в «®ЈҐ!<br/>";
}
}
}
else
{ //ўлў®¤Ё¬ ®иЁЎЄЁ
print $error;
}
print '<a href="http://mobilka.us">Mobilka.Us</a><br/>';
print '<img src="http://pslink.ru/b.php?id=780" alt="PSLink"/><br/>';
//®Є®з ЁҐ wml Є®¤
ending();
?>