Вход Регистрация
Файл: wml/addchat.php
Строк: 104
<?php
header 
("Content-type:text/vnd.wap.wml; charset=utf-8");

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>";

$agent = $HTTP_USER_AGENT;
$we = "MAUI WAP Browser";
if ((strpos (
$agent,"M3Gate") !== false)||(strpos ($agent,"emulator") !== false)||(strpos ($agent,"WinWAP") !== false)||(strpos ($agent,"Wapsilon") !== false)||(strpos ($agent,"M3GATE") !== false)||
(strpos (
$agent,"$we") !==  false))
{


print "
<card id="error" title="&#1057;&#1090;&#1086;&#1087;!" ontimer="serv.php"><timer value="100"/>";
print "
<p align="center">";
print "
<small>
&
#1042;&#1099; &#1085;&#1077; &#1080;&#1084;&#1077;&#1077;&#1090;&#1077; &#1087;&#1088;&#1072;&#1074;&#1072; &#1085;&#1072; &#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1102; &#1095;&#1072;&#1090;&#1072; &#1087;&#1086; &#1086;&#1076;&#1085;&#1086;&#1081; &#1080;&#1079; &#1087;&#1088;&#1080;&#1095;&#1080;&#1085;:</small><br/>";
print "<small><b>1.</b> &#1042;&#1099; &#1087;&#1099;&#1090;&#1072;&#1077;&#1090;&#1077;&#1089;&#1100; &#1087;&#1088;&#1086;&#1081;&#1090;&#1080; &#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1102; &#1089; &#1082;&#1086;&#1084;&#1087;&#1072;.</small><br/>";
print 
"<small><b>2.</b> &#1042;&#1099; &#1079;&#1072;&#1085;&#1077;&#1089;&#1077;&#1085;&#1099; &#1074; &#1095;&#1077;&#1088;&#1085;&#1099;&#1081; &#1089;&#1087;&#1080;&#1089;&#1086;&#1082;.</small><br/>";
print 
"</p></card></wml>";
exit;

}
else {
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)));
$ml=htmlspecialchars(stripslashes(trim($ml)));

function 
go()
{
print 
"
<card title="
&#1056;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1103;">
<p align="left">";
};
//
function ending()
{
print "
</p></card></wml>";
};


go();
//
$all_chats = @mysql_query("SELECT count(*) FROM `cusersWHERE 1;");
$all_1 = @mysql_fetch_array($all_chats);
$all = $all_1['count(*)'];
if (
$all>=$limit)
{
echo "
<small>&#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;.</small>";
echo "<br/><small><a href="http://$site_url">$site_url</a></small>";
ending();
} else {
//
$login trim($login);
$pass trim($pass);

///////////////////////////////////
if(!preg_match("/[^A-Za-z1-9@*()?!-~_[]=]+/",$login)) {
if(!
preg_match("/[^0-9a-zA-Z_]+/",$pass)) {
if(empty(
$login)) $error="<small>&#1053;&#1080;&#1082; &#1072;&#1076;&#1084;&#1080;&#1085;&#1072; &#1087;&#1091;&#1089;&#1090;!</small><br/>";
if(empty(
$pass)) $error=$error."<small>&#1055;&#1072;&#1088;&#1086;&#1083;&#1100; &#1087;&#1091;&#1089;&#1090;!</small><br/>";
if(empty(
$topic)) $error=$error."<small>&#1058;&#1086;&#1087;&#1080;&#1082; &#1095;&#1072;&#1090;&#1072; &#1087;&#1091;&#1089;&#1090;!</small><br/>";
if(empty(
$link)) $error=$error."<small>&#1053;&#1077;&#1090; &#1072;&#1076;&#1088;&#1077;&#1089;&#1072; &#1089;&#1072;&#1081;&#1090;&#1072;!</small><br/>";
if(empty(
$name)) $error=$error."<small>&#1053;&#1077;&#1090; &#1085;&#1072;&#1079;&#1074;&#1072;&#1085;&#1080;&#1103; &#1089;&#1072;&#1081;&#1090;&#1072;!</small><br/>";
if(empty(
$ml)) $error=$error."<small>&#1053;&#1077; &#1074;&#1074;&#1077;&#1076;&#1077;&#1085; &#1072;&#1076;&#1088;&#1077;&#1089; e-mail!</small><br/>";



if(empty(
$error))
{

$q_c=@mysql_query("select link from cusers where ((link='".$link."')or(mail='".$ml."'));");
if(
mysql_affected_rows()==0)
{
$datte=date('Y-m-d');
        @
mysql_query("insert into cusers values(0,'$login','$pass','$topic','$link','$name','$datte','$ml','0','0','0','','0000','0000');");


        
$q_c=@mysql_query("select * from cusers where link='".$link."';");
        
$q_ch=@mysql_fetch_array($q_c);
        
$ci=$q_ch['ci'];
        @
mysql_query("insert into `".$px.$utable."` values(0,'$login','$pass','','m','0','0','','','','','','$ml','$link','http://','','','&#1040;&#1076;&#1084;&#1080;&#1085;',0,0,'','','medium','','','',0,5,5,'".time()."','".time()."','".getenv(REMOTE_ADDR)."','".getenv(HTTP_USER_AGENT)."','$ci', 'yes','1','1','1','0','0','1','');");

        echo 
"<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;,
&#1076;&#1072;&#1085;&#1085;&#1099;&#1077; &#1076;&#1083;&#1103; &#1074;&#1093;&#1086;&#1076;&#1072;
&#1080; &#1089;&#1089;&#1099;&#1083;&#1082;&#1072; &#1085;&#1072; &#1095;&#1072;&#1090; &#1074;&#1099;&#1089;&#1083;&#1072;&#1085;&#1072;
&#1085;&#1072; &#1091;&#1082;&#1072;&#1079;&#1072;&#1085;&#1085;&#1099;&#1081; &#1074;&#1072;&#1084;&#1080;
e-mail. &#1058;&#1072;&#1082;&#1078;&#1077; &#1074; &#1089;&#1083;&#1091;&#1095;&#1072;&#1077; &#1077;&#1089;&#1083;&#1080;
&#1074;&#1099; &#1079;&#1072;&#1073;&#1091;&#1076;&#1077;&#1090;&#1077; &#1074;&#1072;&#1096; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100;
&#1090;&#1086; &#1076;&#1083;&#1103; &#1074;&#1086;&#1089;&#1089;&#1090;&#1072;&#1085;&#1086;&#1074;&#1083;&#1077;&#1085;&#1080;&#1103;
&#1079;&#1072;&#1081;&#1076;&#1080;&#1090;&#1077; &#1074; &#1074;&#1072;&#1096; &#1087;&#1088;&#1086;&#1092;&#1080;&#1083;&#1100; &#1080;
&#1074;&#1099;&#1073;&#1077;&#1088;&#1080;&#1090;&#1077;
&#1087;&#1091;&#1085;&#1082;&#1090; &#8216;&#1047;&#1072;&#1073;&#1099;&#1083;
&#1087;&#1072;&#1088;&#1086;&#1083;&#1100;&#8217;.</small>"
;

        
$q_u=@mysql_query("select * from `".$px.$utable."` where login='".$login."' and ci='".$ci."';");
        
$q_us=@mysql_fetch_array($q_u);
        
$id=$q_us['id'];
        
$rules file("rules.txt");
        
$rules = @implode(""$rules);
        
mail("$ml""Chat_registration""Спасибо за регистрацию чата в нашем сервисе! Ваши данные для входа и ссылка на чат:
        Ссылка: 
$serv_url/index.php?ci=$ci
        Логин администратора: 
$login
        Пароль администратора: 
$pass
        Правила сервиса: 
$rules");
        echo 
"<br/><small>&#1053;&#1080;&#1082; &#1072;&#1076;&#1084;&#1080;&#1085;&#1072;: ".$login."</small><br/>";
        echo 
"<small>&#1055;&#1072;&#1088;&#1086;&#1083;&#1100; &#1072;&#1076;&#1084;&#1080;&#1085;&#1072;: ".$pass."</small><br/> ";

            print 
"<small><anchor>
        &#1042; &#1095;&#1072;&#1090;
        <go href="
./enter.php?ci=$ci&amp;pass=$pass&amp;id=$id" method="post">
        <postfield name="
id" value="$id"/>
        <postfield name="
pass" value="$(pass)"/>
        <postfield name="
ref" value="$ref"/>
        </go>
        </anchor></small>"
;
        
mysql_query("OPTIMIZE TABLE `cusers`");
}
else
{
    echo 
"<p align="center"><small>&#1057;&#1072;&#1081;&#1090; &#1089; &#1090;&#1072;&#1082;&#1080;&#1084; &#1072;&#1076;&#1088;&#1077;&#1089;&#1086;&#1084;/email &#1091;&#1078;&#1077; &#1079;&#1072;&#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;!</small><br/>
<small><a href="
addchat.wml">&#1053;&#1072;&#1079;&#1072;&#1076;</a></small></p>";
}

}
else
{
    print 
$error;
}
} else {
print 
"<small>&#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;!</small>";
print 
"<br/><small><a href="addchat.wml">&#1053;&#1072;&#1079;&#1072;&#1076;</a></small>";
}

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

exit;
?>
Онлайн: 0
Реклама