Просмотр файла katalog2/reg.php

Размер файла: 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 "&#x41e;&#x428;&#x418;&#x411;&#x41a;&#x410;!<br/>&#x41d;&#x435; &#x432;&#x441;&#x435; &#x43f;&#x43e;&#x43b;&#x44f; &#x437;&#x430;&#x43f;&#x43e;&#x43b;&#x43d;&#x435;&#x43d;&#x44b;!";
	}	//Ё­ зҐ ў®в:
	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\"&gt;ѓ®«®б®ў вм §  б ©в&lt;/a&gt;";
		} 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();
?>