Вход Регистрация
Файл: foto.php
Строк: 165
<?
header
("Cache-Control: no-cache");
require(
"ini.php");
$ref=rand(10000,1000000); 
if(!isset(
$ps))
{
echo 
"<HTML>n";
echo 
"<HEAD>n";
echo 
"<META HTTP-EQUIV="Content-Type" CONTENT="text/htmlcharset=windows-1251">n";
echo 
"<TITLE>&#1044;&#1086;&#1073;&#1072;&#1074;&#1080;&#1090;&#1100; &#1092;&#1086;&#1090;&#1086;</TITLE>n";
echo 
"<style TYPE="text/css"><!--n";
echo 
".body{ text-align: center; font-family: Arial; font-size: 12pt;}n";
echo 
"A:Link{ Color: #FF4A4A; text-decoration: none;}n";
echo 
"A:Visited{ Color: #FF9BFF; text-decoration: none;}n";
echo 
"A:Active{ Color: #05FA30;}n";
echo 
"A:hover{ Color: #05FA30}n";
echo 
"BODY{Margin-Left: 0; Margin-Right:0; Margin-Top: 50; Margin-Bottom: 10;}n";
echo 
"--></style>n";
echo 
"</HEAD>n";
echo 
"<BODY TEXT="BLACK" BGCOLOR="#F7EDCE" BACKGROUND="07000000.gif">n";
echo "<div class="body">n";
if(@
$error=="user")
{
$msg="<font color="red" size="5"><b>User was not found</b></font><br><br>";}
if(@
$error=="login")
{
$msg="<font color="red" size="5"><b>Your login failed</b></font><br><br>";}
echo @
$msg;
echo 
"<font color="#B31C7D" size="5">&#1042;&#1074;&#1077;&#1076;&#1080;&#1090;&#1077; &#1089;&#1074;&#1086;&#1081; "&#1095;&#1072;&#1090;&#1086;&#1074;&#1089;&#1082;&#1080;&#1081;" &#1085;&#1080;&#1082; &#1080; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100;.</font>n";
echo "<b><form method="POST" action="foto.php?ref=$ref" name="auth">n";
echo 
"&#1053;&#1080;&#1082;:<br>n"
echo 
"<input type="text" name="us" maxlength="15"  size="15"><br>n"
echo 
"&#1055;&#1072;&#1088;&#1086;&#1083;&#1100;:<br>n";
echo 
"<input type="text" name="ps" maxlength="15"  size="15"><br>n";  
echo 
"<input type="submit" value="&#1042;&#1093;&#1086;&#1076;" name="enter" onMouseOver="style.color='#00FF40'" onMouseOut="style.color='black'"></b>n"; 
echo "</BODY>n"
echo 
"</HTML>n";
 exit;
}
if(isset(
$us)){
$us=strtr($us,array("&#1072;"=>"&#1056;°","&#1073;"=>"&#1056;±","&#1074;"=>"&#1056;&#1030;","&#1075;"=>"&#1056;&#1110;","&#1076;"=>"&#1056;&#1169;","&#1077;"=>"&#1056;µ","&#1105;"=>"&#1057;&#8216;","&#1078;"=>"&#1056;¶","&#1079;"=>"&#1056;·","&#1080;"=>"&#1056;&#1105;","&#1081;"=>"&#1056;&#8470;","&#1082;"=>"&#1056;&#1108;","&#1083;"=>"&#1056;»","&#1084;"=>"&#1056;&#1112;","&#1085;"=>"&#1056;&#1029;","&#1086;"=>"&#1056;&#1109;","&#1087;"=>"&#1056;&#1111;","&#1088;"=>"&#1057;&#1026;","&#1089;"=>"&#1057;&#1027;","&#1090;"=>"&#1057;&#8218;","&#1091;"=>"&#1057;&#1107;","&#1092;"=>"&#1057;&#8222;","&#1093;"=>"&#1057;&#8230;","&#1094;"=>"&#1057;&#8224;","&#1095;"=>"&#1057;&#8225;","&#1096;"=>"&#1057;&#8364;","&#1097;"=>"&#1057;&#8240;","&#1098;"=>"&#1057;&#1033;","&#1099;"=>"&#1057;&#8249;","&#1100;"=>"&#1057;&#1034;","&#1101;"=>"&#1057;&#1036;","&#1102;"=>"&#1057;&#1035;","&#1103;"=>"&#1057;&#1039;","&#1040;"=>"&#1056;&#1106;","&#1041;"=>"&#1056;&#8216;","&#1042;"=>"&#1056;&#8217;","&#1043;"=>"&#1056;&#8220;","&#1044;"=>"&#1056;&#8221;","&#1045;"=>"&#1056;&#8226;","&#1025;"=>"&#1056;&#1027;","&#1046;"=>"&#1056;&#8211;","&#1047;"=>"&#1056;&#8212;","&#1048;"=>"&#1056;&#65533;","&#1049;"=>"&#1056;&#8482;","&#1050;"=>"&#1056;&#1113;","&#1051;"=>"&#1056;&#8250;","&#1052;"=>"&#1056;&#1114;","&#1053;"=>"&#1056;&#1116;","&#1054;"=>"&#1056;&#1115;","&#1055;"=>"&#1056;&#1119;","&#1056;"=>"&#1056; ","&#1057;"=>"&#1056;&#1038;","&#1058;"=>"&#1056;&#1118;","&#1059;"=>"&#1056;&#1032;","&#1060;"=>"&#1056;¤","&#1061;"=>"&#1056;&#1168;","&#1062;"=>"&#1056;¦","&#1063;"=>"&#1056;§","&#1064;"=>"&#1056;&#1025;","&#1065;"=>"&#1056;©","&#1066;"=>"&#1056;&#1028;","&#1067;"=>"&#1056;«","&#1068;"=>"&#1056;¬","&#1069;"=>"&#1056;­","&#1070;"=>"&#1056;®","&#1071;"=>"&#1056;&#1031;"));
}
$link = @mysql_pconnect ($MySQL_Hostname$MySQL_Username$MySQL_Password)
                or die (
"Can not connect to MySQL");
     
     @
mysql_select_db($MySQLDatabasename) or die ("error select the database...");
               
               if(isset(
$id)){
        
$result = @mysql_query ("Select * from chat_users where id='".$id."' and ci='".$ci."'");    
        } else {
                         if (
$us=="") {
header ("Location: foto.php?error=user");
mysql_close ($link);
exit;
}               
                function 
rus_to_k($str){
                
$str str_replace("&#1056;°","a",$str); 
                
$str str_replace("&#1056;±","b",$str);
                
$str str_replace("&#1056;&#1030;","v",$str);
                
$str str_replace("&#1056;&#1110;","g",$str);
                
$str str_replace("&#1056;&#1169;","d",$str);
                
$str str_replace("&#1056;µ","e",$str); 
                
$str str_replace("&#1057;&#8216;","e",$str); 
                
$str str_replace("&#1056;¶","j",$str);
                
$str str_replace("&#1056;·","z",$str);
                
$str str_replace("&#1056;&#1105;","i",$str);
                
$str str_replace("&#1056;&#8470;","y",$str);
                
$str str_replace("&#1056;&#1108;","k",$str);
                
$str str_replace("&#1056;»","l",$str); 
                
$str str_replace("&#1056;&#1112;","m",$str);
                
$str str_replace("&#1056;&#1029;","n",$str);
                
$str str_replace("&#1056;&#1109;","o",$str);
                
$str str_replace("&#1056;&#1111;","p",$str);
                
$str str_replace("&#1057;&#1026;","r",$str);
                
$str str_replace("&#1057;&#1027;","s",$str); 
                
$str str_replace("&#1057;&#8218;","t",$str);
                
$str str_replace("&#1057;&#1107;","u",$str);
                
$str str_replace("&#1057;&#8222;","f",$str);
                
$str str_replace("&#1057;&#8230;","h",$str);
                
$str str_replace("&#1057;&#8225;","c",$str);
                
$str str_replace("&#1057;&#8224;","q",$str);//&#1095; 
                
$str str_replace("&#1057;&#8364;","w",$str);
                
$str str_replace("&#1057;&#8240;",">",$str);//&#1097;
                
$str str_replace("&#1057;&#1034;","<",$str);//&#1098;
                
$str str_replace("&#1057;&#8249;","x",$str);//&#1099;
                
$str str_replace("&#1057;&#1033;",".",$str);//&#1100;
                
$str str_replace("&#1057;&#1036;",":",$str);//&#1101; 
                
$str str_replace("&#1057;&#1035;",";",$str);//&#1102;
                
$str str_replace("&#1057;&#1039;","}",$str);//&#1103;
                
$str str_replace("&#1056;&#1106;","a",$str);
                
$str str_replace("&#1056;&#8216;","b",$str);
                
$str str_replace("&#1056;&#8217;","v",$str);
                
$str str_replace("&#1056;&#8220;","g",$str); 
                
$str str_replace("&#1056;&#8221;","d",$str);
                
$str str_replace("&#1056;&#8226;","e",$str);
                
$str str_replace("&#1056;&#1027;","e",$str);
                
$str str_replace("&#1056;&#8211;","j",$str);
                
$str str_replace("&#1056;&#8212;","z",$str);
                
$str str_replace("&#1056;&#65533;","i",$str); 
                
$str str_replace("&#1056;&#8482;","y",$str);
                
$str str_replace("&#1056;&#1113;","k",$str);
                
$str str_replace("&#1056;&#8250;","l",$str);
                
$str str_replace("&#1056;&#1114;","m",$str);
                
$str str_replace("&#1056;&#1116;","n",$str);
                
$str str_replace("&#1056;&#1115;","o",$str); 
                
$str str_replace("&#1056;&#1119;","p",$str);
                
$str str_replace("&#1056; ","r",$str);
                
$str str_replace("&#1056;&#1038;","s",$str);
                
$str str_replace("&#1056;&#1118;","t",$str);
                
$str str_replace("&#1056;&#1032;","u",$str);
                
$str str_replace("&#1056;¤","f",$str);
                
$str str_replace("&#1056;&#1168;","h",$str);
                
$str str_replace("&#1056;§","c",$str);
                
$str str_replace("&#1056;¦","q",$str);
                
$str str_replace("&#1056;&#1025;","w",$str); 
                
$str str_replace("&#1056;©",">",$str);
                
$str str_replace("&#1056;¬","<",$str);
                
$str str_replace("&#1056;«","x",$str);
                
$str str_replace("&#1056;&#1028;",".",$str);
                
$str str_replace("&#1056;­",":",$str);
                
$str str_replace("&#1056;®",";",$str);
                
$str str_replace("&#1056;&#1031;","}",$str);
                return 
$str;
                }
        
    
$latuser=strtolower($us);
    
$ruser rus_to_k($us);
    if(
$ruser==$us){
   
$result mysql_query ("Select * from chat_users where login = '".$latuser."'"); 
    } else {
   
$result mysql_query ("select * from chat_users where login = '".$ruser."'");
    }
    }     
        
        if (
mysql_affected_rows() == 0) {
header ("Location: foto.php?error=user");
mysql_close ($link);
exit;
}
        
$row mysql_fetch_array ($result);
if (
$ps !== $row["pass"]){
header ("Location: foto.php?error=login");
mysql_close ($link);
exit;
}  
if(!isset(
$id))$id=$row["id"];
$us=$row["user"];

if(isset(
$go))
{
if(!isset(
$file))
{
 
header ("Location: foto.php?id=$id&ps=$ps&ref=$ref&error=file");
 exit;
 }
$size filesize($file);
$par GetImageSize($file); 
if(
$par[2]!==1)
{
 
header ("Location: foto.php?id=$id&ps=$ps&ref=$ref&error=nogif");
 exit;
 }
if(
$size>25600)
{
 
header ("Location: foto.php?id=$id&ps=$ps&ref=$ref&error=size");
 exit;
 }
if((
$par[0]>174)||($par[1]>174))
 {
 
header ("Location: foto.php?id=$id&ps=$ps&ref=$ref&error=pix");
 exit;
 }
$foto=$id.".gif";
if (
file_exists ("img/$foto"))
{
unlink ("img/$foto");
}
Copy($file"img/$foto"); 
@
mysql_query ("Update chat_users set img='".$foto."' where id ='".$id."'");
$msg="<b>&#1042;&#1072;&#1096;&#1072; &#1092;&#1086;&#1090;&#1086;&#1075;&#1088;&#1072;&#1092;&#1080;&#1103; &#1076;&#1086;&#1073;&#1072;&#1074;&#1083;&#1077;&#1085;&#1072;</b><br>";
}
$result mysql_query ("select * from chat_users where id = '".$id."'");
$row mysql_fetch_array ($result);
echo 
"<HTML>n";
echo 
"<HEAD>n";
echo 
"<META HTTP-EQUIV="Content-Type" CONTENT="text/htmlcharset=windows-1251">n";
echo 
"<TITLE>&#1044;&#1086;&#1073;&#1072;&#1074;&#1080;&#1090;&#1100; &#1092;&#1086;&#1090;&#1086;</TITLE>n";
echo 
"<style TYPE="text/css"><!--n";
echo 
".body{ text-align: center; font-family: Arial; font-size: 12pt;}n";
echo 
"A:Link{ Color: #FF4A4A; text-decoration: none;}n";
echo 
"A:Visited{ Color: #FF9BFF; text-decoration: none;}n";
echo 
"A:Active{ Color: #05FA30;}n";
echo 
"A:hover{ Color: #05FA30}n";
echo 
"BODY{Margin-Left: 0; Margin-Right:0; Margin-Top: 0; Margin-Bottom: 10;}n";
echo 
"--></style>n";
echo 
"</HEAD>n";
echo 
"<BODY TEXT="BLACK" BGCOLOR="#F7EDCE" BACKGROUND="07000000.gif">n";
echo "<div class="body">n";
if(@
$error=="file")
{
$msg="<font color="red" size="5"><b>&#1042;&#1099; &#1085;&#1077; &#1091;&#1082;&#1072;&#1079;&#1072;&#1083;&#1080; &#1092;&#1072;&#1081;&#1083;!</b></font><br><br>";}
if(@
$error=="nogif")
{
$msg="<font color="red" size="5"><b>&#1059;&#1082;&#1072;&#1079;&#1072;&#1085;&#1085;&#1099;&#1081; &#1074;&#1072;&#1084;&#1080; &#1092;&#1072;&#1081;&#1083; &#1085;&#1077; &#1103;&#1074;&#1083;&#1103;&#1077;&#1090;&#1089;&#1103; Gif-&#1092;&#1072;&#1081;&#1083;&#1086;&#1084;!</b></font><br><br>";}
if(@
$error=="size")
{
$msg="<font color="red" size="5"><b>&#1057;&#1083;&#1080;&#1096;&#1082;&#1086;&#1084; &#1073;&#1086;&#1083;&#1100;&#1096;&#1086;&#1081; &#1088;&#1072;&#1079;&#1084;&#1077;&#1088; &#1092;&#1072;&#1081;&#1083;&#1072;!</b></font><br><br>";}
if(@
$error=="pix")
{
$msg="<font color="red" size="5"><b>&#1053;&#1077;&#1087;&#1088;&#1072;&#1074;&#1080;&#1083;&#1100;&#1085;&#1086;&#1077; &#1088;&#1072;&#1079;&#1088;&#1077;&#1096;&#1077;&#1085;&#1080;&#1077; &#1092;&#1086;&#1090;&#1086;&#1075;&#1088;&#1072;&#1092;&#1080;&#1080;!</b></font><br><br>";}
echo @
$msg;
$nick=strtr($us,array("&#1056;°"=>"&#1072;","&#1056;±"=>"&#1073;","&#1056;&#1030;"=>"&#1074;","&#1056;&#1110;"=>"&#1075;","&#1056;&#1169;"=>"&#1076;","&#1056;µ"=>"&#1077;","&#1057;&#8216;"=>"&#1105;","&#1056;¶"=>"&#1078;","&#1056;·"=>"&#1079;","&#1056;&#1105;"=>"&#1080;","&#1056;&#8470;"=>"&#1081;","&#1056;&#1108;"=>"&#1082;","&#1056;»"=>"&#1083;","&#1056;&#1112;"=>"&#1084;","&#1056;&#1029;"=>"&#1085;","&#1056;&#1109;"=>"&#1086;","&#1056;&#1111;"=>"&#1087;","&#1057;&#1026;"=>"&#1088;","&#1057;&#1027;"=>"&#1089;","&#1057;&#8218;"=>"&#1090;","&#1057;&#1107;"=>"&#1091;","&#1057;&#8222;"=>"&#1092;","&#1057;&#8230;"=>"&#1093;","&#1057;&#8224;"=>"&#1094;","&#1057;&#8225;"=>"&#1095;","&#1057;&#8364;"=>"&#1096;","&#1057;&#8240;"=>"&#1097;","&#1057;&#1033;"=>"&#1098;","&#1057;&#8249;"=>"&#1099;","&#1057;&#1034;"=>"&#1100;","&#1057;&#1036;"=>"&#1101;","&#1057;&#1035;"=>"&#1102;","&#1057;&#1039;"=>"&#1103;",
"&#1056;&#1106;"=>"&#1040;","&#1056;&#8216;"=>"&#1041;","&#1056;&#8217;"=>"&#1042;","&#1056;&#8220;"=>"&#1043;","&#1056;&#8221;"=>"&#1044;","&#1056;&#8226;"=>"&#1045;","&#1056;&#1027;"=>"&#1025;","&#1056;&#8211;"=>"&#1046;","&#1056;&#8212;"=>"&#1047;","&#1056;&#65533;"=>"&#1048;","&#1056;&#8482;"=>"&#1049;","&#1056;&#1113;"=>"&#1050;","&#1056;&#8250;"=>"&#1051;","&#1056;&#1114;"=>"&#1052;","&#1056;&#1116;"=>"&#1053;","&#1056;&#1115;"=>"&#1054;","&#1056;&#1119;"=>"&#1055;","&#1056; "=>"&#1056;","&#1056;&#1038;"=>"&#1057;","&#1056;&#1118;"=>"&#1058;","&#1056;&#1032;"=>"&#1059;","&#1056;¤"=>"&#1060;","&#1056;&#1168;"=>"&#1061;","&#1056;¦"=>"&#1062;","&#1056;§"=>"&#1063;","&#1056;&#1025;"=>"&#1064;","&#1056;©"=>"&#1065;","&#1056;&#1028;"=>"&#1066;","&#1056;«"=>"&#1067;","&#1056;¬"=>"&#1068;","&#1056;­"=>"&#1069;","&#1056;®"=>"&#1070;","&#1056;&#1031;"=>"&#1071;"));
echo 
"<font color="#D5006A" size="6">$nick</font><br>n";
if($row["img"]!="")
{
echo 
"<img align="left" src="fr.php?id=$id">n";
}
echo 
"<b>&#1047;&#1072;&#1075;&#1088;&#1091;&#1078;&#1072;&#1077;&#1084;&#1072;&#1103; &#1092;&#1086;&#1090;&#1082;&#1072; &#1086;&#1073;&#1103;&#1079;&#1072;&#1090;&#1077;&#1083;&#1100;&#1085;&#1086; &#1076;&#1086;&#1083;&#1078;&#1085;&#1072; &#1073;&#1099;&#1090;&#1100; &#1074; &#1092;&#1086;&#1088;&#1084;&#1072;&#1090;&#1077; Gif, &#1088;&#1072;&#1079;&#1088;&#1077;&#1096;&#1077;&#1085;&#1080;&#1077;&#1084; &#1085;&#1077; &#1073;&#1086;&#1083;&#1077;&#1077; 174&#1093;174 &#1087;&#1080;&#1082;&#1089;&#1077;&#1083;&#1077;&#1081;(&#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1091;&#1077;&#1084;&#1086;&#1077; &#1088;&#1072;&#1079;&#1088;&#1077;&#1096;&#1077;&#1085;&#1080;&#1077; 128&#1093;128) &#1080; &#1088;&#1072;&#1079;&#1084;&#1077;&#1088;&#1086;&#1084; &#1085;&#1077; &#1073;&#1086;&#1083;&#1077;&#1077; 25&#1082;&#1073;. &#1045;&#1089;&#1083;&#1080; &#1074;&#1099; &#1093;&#1086;&#1090;&#1080;&#1090;&#1077; &#1079;&#1072;&#1084;&#1077;&#1085;&#1080;&#1090;&#1100; &#1089;&#1074;&#1086;&#1102; &#1092;&#1086;&#1090;&#1082;&#1091; &#1090;&#1086; &#1087;&#1088;&#1086;&#1089;&#1090;&#1086; &#1079;&#1072;&#1075;&#1088;&#1091;&#1079;&#1080;&#1090;&#1077; &#1085;&#1086;&#1074;&#1091;&#1102;, &#1072; &#1089;&#1090;&#1072;&#1088;&#1072;&#1103; &#1072;&#1074;&#1090;&#1086;&#1084;&#1072;&#1090;&#1080;&#1095;&#1077;&#1089;&#1082;&#1080; &#1091;&#1076;&#1072;&#1083;&#1080;&#1090;&#1089;&#1103;.</b><br>n";
echo 
"<br><br><br><form ENCTYPE="multipart/form-data" action="foto.php?id=$id&amp;ps=$ps&amp;ref=$ref" method="post">n";
echo 
"<b>&#1055;&#1088;&#1080;&#1082;&#1088;&#1077;&#1087;&#1080;&#1090;&#1100; &#1092;&#1086;&#1090;&#1082;&#1091;:</b><br>n";
echo 
"<INPUT NAME="file" TYPE="file" SIZE="20"><br>n";
echo 
"<input type="submit" name="go" value="&#1054;&#1090;&#1087;&#1088;&#1072;&#1074;&#1080;&#1090;&#1100;" onMouseOver="style.color='#00FF40'" onMouseOut="style.color='black'">n";
echo "</form>n";
echo 
"</BODY>n"
echo 
"</HTML>n";
mysql_close ($link);

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