View file top/reg.php

File size: 4.03Kb
<?
include "config2.php";

$linkkk=mysql_pconnect ($DB_HOST, $DB_USER, $DB_PASS);
mysql_select_db($DB_NAME);

header ("Content-type:text/vnd.wap.wml; charset=utf-8");
header("Cache-Control: no-store, no-cache, must-revalidate"); 
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
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>
<card title=\"Регистрация\">
<p align=\"left\">";
};
function ending()
{
print "</p>
</card>
</wml>";
};
go();
$q_u_l=@mysql_query("select title from users where title='".$title."';");
$u_l=@mysql_fetch_array($q_u_l);

if(empty($title)) $error = $error."<b>Нет названия!</b><br/>";
if(empty($pass)) $error = $error."<b>&#x412;&#x44B; &#x43D;&#x435; &#x432;&#x432;&#x435;&#x43B;&#x438; &#x43F;&#x430;&#x440;&#x43E;&#x43B;&#x44C;!</b><br/>";
if(empty($email)) $error = $error."<b>&#x412;&#x44B; &#x43D;&#x435; &#x432;&#x432;&#x435;&#x43B;&#x438; e-mail!</b><br/>";
if(empty($link)) $error = $error."<b>Ссылка не может быть пустой!</b><br/>";
if(empty($about)) $error = $error."<b>Не введено описание сайта!</b><br/>";
if(empty($error))
{
		if (@MySQL_Num_rows($q_u_l)==0)
		{

	$title = htmlspecialchars(stripslashes(trim($title)));
	$pass = htmlspecialchars(stripslashes(trim($pass)));
	$email = htmlspecialchars(stripslashes(trim($email)));
	$link = htmlspecialchars(stripslashes(trim($link)));
	$about = htmlspecialchars(stripslashes(trim($about)));
	if(mysql_query("insert into users values(0,'$title','$pass','$email','$link','$about',NOW(),0,0,0,0,0,0,0,0,0,'','','','',0,0,0,0);")) {
		print "&#x412;&#x44B; &#x443;&#x441;&#x43F;&#x435;&#x448;&#x43D;&#x43E; &#x437;&#x430;&#x440;&#x435;&#x433;&#x438;&#x441;&#x442;&#x440;&#x438;&#x440;&#x43E;&#x432;&#x430;&#x43D;&#x44B;. &#x420;&#x430;&#x437;&#x43C;&#x435;&#x441;&#x442;&#x438;&#x442;&#x435; &#x43E;&#x434;&#x438;&#x43D; &#x441;&#x43B;&#x435;&#x434;&#x443;&#x44E;&#x449;&#x438;&#x439; &#x43A;&#x43E;&#x434; &#x443; &#x441;&#x435;&#x431;&#x44F; &#x43D;&#x430; &#x433;&#x43B;&#x430;&#x432;&#x43D;&#x43E;&#x439; &#x441;&#x442;&#x440;&#x430;&#x43D;&#x438;&#x446;&#x435; :<br/>";
		$query = mysql_query("select id,title from users where title='".$title."';");
		$data = mysql_fetch_array($query);
		include "config3.php";
        print "1)<img src=\"http://$domen/count.php?id=".$data['id']."\" alt=\"$name\"/><br/>";
		print htmlspecialchars("<a href=\"http://$domen/index.php?cid=".$data['id']."\"><img src=\"http://$domen/count.php?id=".$data['id']."\" alt=\"$name\"/></a>");
//		print "<br/>2)<img src=\"http://wapmax.ru/count.php?id=".$data['id']."&amp;img=1\" alt=\"Zagruzki.Ru\"/><br/>";
//		print htmlspecialchars("<a href=\"http://wapmax.ru/index.php?cid=".$data['id']."\"><img src=\"http://wapmax.ru/count.php?id=".$data['id']."&amp;img=1\" alt=\"wapmax.ru\"/></a>");
//	    print "<br/>3)<img src=\"http://wapmax.ru/count.php?id=".$data['id']."&amp;img=2\" alt=\"wapmax.ru\"/><br/>";
//		print htmlspecialchars("<a href=\"http://wapmax.ru/index.php?cid=".$data['id']."\"><img src=\"http://wapmax.ru/count.php?id=".$data['id']."&amp;img=2\" alt=\"wapmax.ru\"/></a>");



		print "<br/><b>&#x412;&#x43D;&#x438;&#x43C;&#x430;&#x43D;&#x438;&#x435;! &#x412;&#x430;&#x448; id ".$data['id']."! <br/>Id &#x43F;&#x43E;&#x442;&#x440;&#x435;&#x431;&#x443;&#x435;&#x442;&#x441;&#x44F; &#x432;&#x430;&#x43C; &#x434;&#x43B;&#x44F; &#x438;&#x437;&#x43C;&#x435;&#x43D;&#x435;&#x43D;&#x438;&#x44F; &#x43F;&#x440;&#x43E;&#x444;&#x438;&#x43B;&#x44F;!</b><br/><a href=\"index.php\">$topic</a> ";
	}
	} else {
	print "&#x412; &#x43D;&#x430;&#x448;&#x435;&#x439; &#x431;&#x430;&#x437;&#x435; &#x443;&#x436;&#x435; &#x435;&#x441;&#x442;&#x44C; &#x441;&#x430;&#x439;&#x442; &#x441; &#x442;&#x430;&#x43A;&#x438;&#x43C; &#x43D;&#x430;&#x437;&#x432;&#x430;&#x43D;&#x438;&#x435;&#x43C;!";
	}
}
else
{
print $error;
}
ending();
mysql_close($linkkk);
?>