Вход Регистрация
Файл: addchat.php
Строк: 104
<?php
ini_set
('display_errors''off');
header ("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
include 
"./ini.php";
$id=@mysql_escape_string($id);
$pass=@mysql_escape_string($pass);
$login=@mysql_escape_string($login);
$ref=rand(10000,1000000);
$login=htmlspecialchars(stripslashes(trim($login)));
$pass=htmlspecialchars(stripslashes(trim($pass)));
$topic=htmlspecialchars(stripslashes(trim($topic)));
$link=htmlspecialchars(stripslashes(trim($link)));
$name=htmlspecialchars(stripslashes(trim($name)));
$user_code=htmlspecialchars(stripslashes(trim($user_code)));
function 
go()
{
print 
"<?xml version="1.0" encoding="utf-8"?>";
print 
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Регистрация завершена!</title><link rel="StyleSheet" type="text/css" href="style/0.css"></head><body><div>";
};

function 
ending()
{
print 
"</div></body></html>";
};
go();
//
$all_chats = @mysql_query("SELECT count(*) FROM `cusers` WHERE 1;");
$all_1 = @mysql_fetch_array($all_chats);
$all $all_1['count(*)'];
if (
$all>=$limit)
{
echo 
"<div class="main">&#1053;&#1072; &#1076;&#1072;&#1085;&#1085;&#1099;&#1081; &#1084;&#1086;&#1084;&#1077;&#1085;&#1090; &#1083;&#1080;&#1084;&#1080;&#1090; &#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1080; &#1095;&#1072;&#1090;&#1086;&#1074; &#1080;&#1079;&#1088;&#1072;&#1089;&#1093;&#1086;&#1076;&#1086;&#1074;&#1072;&#1085;. &#1055;&#1086;&#1087;&#1088;&#1086;&#1073;&#1091;&#1081;&#1090;&#1077; &#1087;&#1086;&#1079;&#1078;&#1077;.</div>";
echo 
"<div class="smain"><br/><a href="../">На главную/a>";
ending();
} else {
//
$login htmlspecialchars(trim($login), ENT_QUOTES);
$pass htmlspecialchars(trim($pass), ENT_QUOTES);

///////////////////////////////////
if(!preg_match("/[^A-Za-z1-9@*()?!-~_[]=]+/",$login)) {
if(!
preg_match("/[^0-9a-zA-Z_]+/",$pass)) {
if(empty(
$login)) $error="&#1053;&#1080;&#1082; &#1072;&#1076;&#1084;&#1080;&#1085;&#1072; &#1087;&#1091;&#1089;&#1090;!<br/>";
if(empty(
$pass)) $error=$error."&#1055;&#1072;&#1088;&#1086;&#1083;&#1100; &#1087;&#1091;&#1089;&#1090;!<br/>";
if(empty(
$topic)) $error=$error."&#1058;&#1086;&#1087;&#1080;&#1082; &#1095;&#1072;&#1090;&#1072; &#1087;&#1091;&#1089;&#1090;!<br/>";
if(empty(
$link)) $error=$error."&#1053;&#1077;&#1090; &#1072;&#1076;&#1088;&#1077;&#1089;&#1072; &#1089;&#1072;&#1081;&#1090;&#1072;!<br/>";
if(empty(
$name)) $error=$error."&#1053;&#1077;&#1090; &#1085;&#1072;&#1079;&#1074;&#1072;&#1085;&#1080;&#1103; &#1089;&#1072;&#1081;&#1090;&#1072;!<br/>";
if (!
strstr($link'http://')) {
    
$error=$error."Не верный URL (http://)!<br/>";
}


if(empty(
$error))
{

$q_c=@mysql_query("select link from cusers where link='".$link."';");
if(
mysql_affected_rows()==0)
{
$datte=date('Y-m-d');
                @
mysql_query("insert into cusers values(0,'$login','$pass','$topic','$link','$name','$datte');");
                 
$q_c=@mysql_query("select * from `cusers` where `link`='".$link."';");
                
$q_ch=@mysql_fetch_array($q_c);
                
$ci=mysql_escape_string($q_ch['ci']);
                @
mysql_query("insert into `".$px.$utable."` values(0,'$login','$pass','','m','0','0','','','','','','','','','','','&#1040;&#1076;&#1084;&#1080;&#1085;',0,0,'10','100','small','','','',0,5,5,'".time()."','".time()."','".getenv(REMOTE_ADDR)."','".getenv(HTTP_USER_AGENT)."','$ci');")
&&@
mysql_query("INSERT INTO `chat_settings` VALUES (0, 'room', 'vict', '&#1042;&#1080;&#1082;&#1090;&#1086;&#1088;&#1080;&#1085;&#1072;', 'vict', 0, '$ci');");

 echo 
"<body><div style="text-aligncenter"><div class="contur"><div class="header"><small>&#1063;&#1072;&#1090; &#1091;&#1089;&#1087;&#1077;&#1096;&#1085;&#1086; &#1079;&#1072;&#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;. &#1047;&#1072;&#1087;&#1086;&#1084;&#1085;&#1080;&#1090;&#1077; &#1076;&#1072;&#1085;&#1085;&#1099;&#1077; &#1087;&#1088;&#1080;&#1074;&#1077;&#1076;&#1077;&#1085;&#1085;&#1099;&#1077; &#1085;&#1080;&#1078;&#1077;!
</br>Скин стандарт:<a href="
index.php?ci=".$ci."">http://".$vash_site."/?ci=".$ci."</a>
</br>Скин 2:<a href="
index.php?s=1&amp;ci=".$ci."">http://".$vash_site."/?s=1&amp;ci=".$ci."</a>
</br>Скин 3:<a href="
index.php?s=2&amp;ci=".$ci."">http://".$vash_site."/?s=2&amp;ci=".$ci."</a>
</br>Скин 4:<a href="
index.php?s=3&amp;ci=".$ci."">http://".$vash_site."/?s=3&amp;ci=".$ci."</a>
</br>Скин 5:<a href="
index.php?s=4&amp;ci=".$ci."">http://".$vash_site."/?s=4&amp;ci=".$ci."</a>
</br>Скин 6:<a href="
index.php?s=7&amp;ci=".$ci."">http://".$vash_site."/?s=7&amp;ci=".$ci."</a>
</br>Скин 7:<a href="
index.php?s=6&amp;ci=".$ci."">http://".$vash_site."/?s=6&amp;ci=".$ci."</a></br>";
                
$q_u=@mysql_query("select * from `".$px.$utable."` where login='".$login."' and ci='".$ci."';");
                
$q_us=@mysql_fetch_array($q_u);
                
$id=mysql_escape_string($q_us['id']);

                echo 
"<br/>&#1053;&#1080;&#1082; &#1072;&#1076;&#1084;&#1080;&#1085;&#1072;: ".$login."<br/>";
                echo 
"&#1055;&#1072;&#1088;&#1086;&#1083;&#1100; &#1072;&#1076;&#1084;&#1080;&#1085;&#1072;: ".$pass."<br/></div> ";

                 print 
"<a href="./enter.php?ci=$ci&amp;id=$id&amp;pass=$pass">В чат</a></div>";
                
mysql_query("OPTIMIZE TaBLE `cusers`");

}
else
{
        echo 
"<p align="center">&#1057;&#1072;&#1081;&#1090; &#1089; &#1090;&#1072;&#1082;&#1080;&#1084; &#1072;&#1076;&#1088;&#1077;&#1089;&#1086;&#1084; &#1091;&#1078;&#1077; &#1079;&#1072;&#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;!<br/>
<a href="
addchats.php">&#1053;&#1072;&#1079;&#1072;&#1076;</a></p>";
}

}
else
{
        print 
$error;
        print
"<a href="addchats.php">&#1053;&#1072;&#1079;&#1072;&#1076;</a>";
}
} else {
print 
"&#1054;&#1096;&#1080;&#1073;&#1082;&#1072; &#1074; &#1087;&#1088;&#1086;&#1094;&#1077;&#1089;&#1089;&#1077; &#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1080;!";
print 
"<br/><a href="addchats.php">&#1053;&#1072;&#1079;&#1072;&#1076;</a>";
}

} else {
print 
"&#1091;&#1078;&#1077; &#1077;&#1089;&#1090;&#1100;!";
print 
"<br/><a href="addchats.php">&#1053;&#1072;&#1079;&#1072;&#1076;</a>";
}
ending();
}

print 
"<center><div class="contur_rek"><div class="header_rek">&#x0425;&#x0430;&#x043B;&#x044F;&#x0432;&#x0430; &#x0434;&#x043B;&#x044F; тебя &#x043D;&#x0430;
<a href="
http://".$link_reklame.""><font color="#FFFF00">".$reklame."</font></a><br/></div></div>";



@mysql_close();
exit;
?>
Онлайн: 0
Реклама