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

Размер файла: 2.92Kb
<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
require("db.php");
print '<?xml version="1.0" encoding="utf-8"?>'.
'<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'.
' "http://www.wapforum.org/DTD/wml_1.1.xml">'.
'<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';

   $link = htmlspecialchars(stripslashes(trim($link)));
   $title = htmlspecialchars(stripslashes(trim($title)));
   $pass = htmlspecialchars(stripslashes(trim($pass)));
   $opis = htmlspecialchars(stripslashes(trim($opis)));
   

print '<card title="&#1056;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1103;">'.
'<p align="left">';

$query_users_link = @mysql_query("select * from `top` where link='".$link."';");
$users_link = @mysql_fetch_array($query_users_link);

if(empty($link)) $error='<small>&#1053;&#1077;&#1090; &#1089;&#1089;&#1099;&#1083;&#1082;&#1080;!</small><br/>';
if(empty($title)) $error=$error.'<small>&#1053;&#1077;&#1090; &#1085;&#1072;&#1079;&#1074;&#1072;&#1085;&#1080;&#1103;!</small><br/>';
if(empty($pass)) $error=$error.'<small>&#1053;&#1077;&#1090; &#1087;&#1072;&#1088;&#1086;&#1083;&#1103;!</small><br/>';
if(empty($opis)) $error=$error.'<small>&#1053;&#1077;&#1090; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1103;!</small><br/>';


$db_link = $users_link['link'];

if(empty($error))
{
	if(strtolower($link) != strtolower($db_link))
	{
	
	@mysql_query("insert into `top` values(0,'".$link."','".$title."','".$pass."','".$opis."','0','0','0','0','0','0','0',NOW(),1);");
$q=mysql_query("select * from `top` where link='$link' limit 1;");
		$data=mysql_fetch_array($q);
		$id=$data['id'];
	print "<small>&#1042;&#1072;&#1096; &#1089;&#1072;&#1081;&#1090; &#1079;&#1072;&#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;!</small><br/>";

print "<small><u>&#1042;&#1072;&#1096; ID:</u> ".$data['id']."</small><br/>";
print "<small><u>&#1042;&#1072;&#1096; &#1055;&#1072;&#1088;&#1086;&#1083;&#1100;:</u> ".$data['pass']."</small><br/>";
print "<small><u>&#1050;&#1086;&#1076; &#1074;&#1072;&#1096;&#1077;&#1075;&#1086; &#1089;&#1095;&#1077;&#1090;&#1095;&#1080;&#1082;&#1072;:</u></small><br/><small>";
print  htmlspecialchars("<a href=\"http://amlet.com.ru/top/in.php?id=".$data['id']."\"><img src=\"http://amlet.com.ru/top/c.php?id=".$data['id']."\" alt=\"AmLet\"/></a>");
print '</small><br/><small>:::::</small><br/>  
<small><a href="index.php">&#1042; &#1088;&#1077;&#1081;&#1090;&#1080;&#1085;&#1075;</a></small><br/>
<small><a href="http://amlet.com.ru">amlet.com.ru</a></small>';
	}
	else
	{
	print '<small>&#1058;&#1072;&#1082;&#1086;&#1081; &#1089;&#1072;&#1081;&#1090; &#1091;&#1078;&#1077; &#1079;&#1072;&#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;!</small>';
	}
}
else
{
	print $error;
}
print '</p></card></wml>';

@mysql_close();
?>