Просмотр файла add.php

Размер файла: 9.89Kb
<?
///////////////////////////////////////////////////////////////////////////////////////////
/////	
/////	                   Made by   :  АХХХУЕННЫЙ ЧУВАК VANTUZ
/////	                     E-mail  :  [email protected]	
/////                           ICQ  :  36-44-66
/////                          Site  :  http://pizdec.ru
/////                       Skripts  :  http://wapstop.ru
/////                       	
//////////////////////////////////////////////////////////////////////////////////////////////
	error_reporting (ERROR | WARNING);
function myErrorHandler ($errno, $errstr, $errfile, $errline) {}
set_error_handler("myErrorHandler");	


$login = htmlspecialchars(stripslashes($login));
$mail = htmlspecialchars(stripslashes($mail));
$mess = htmlspecialchars(stripslashes($mess));
$obr = htmlspecialchars(stripslashes($obr));
$login = strip_tags($login);
$login = trim($login);
  $mess=str_replace("$","",$mess);
 $login=str_replace("quot;","",$login);
            $login=str_replace("$","",$login);
            $login=str_replace("&lt;","",$login);
            $login=str_replace("<","",$login);
            $login=str_replace(">","",$login);
            $login=str_replace("&gt;","",$login);
            $login=str_replace("\"","",$login);
            $login=str_replace("'","",$login);
            $login=str_replace("\\","",$login);
            $login=str_replace("&","",$login);
             $login=str_replace("%","",$login);
              $login=str_replace(" ","",$login);
              
            $login=str_replace("@","",$login);
            $login=str_replace("^","",$login);
            $login=str_replace("*","",$login);
            $login=str_replace(")","",$login);
            $login=str_replace("(","",$login);
            $login=str_replace("|","",$login);
            $login=str_replace("!","",$login);
            $login=str_replace("№","",$login);
            $login=str_replace(";","",$login);
            $login=str_replace("/","",$login);
            $login=str_replace("{","",$login);
            $login=str_replace("}","",$login);
            $login=str_replace("[","",$login);
            $login=str_replace("]","",$login);

if ($login == "") {  header("Content-type:text/html; charset=utf-8");
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<meta http-equiv=\"refresh\" content=\"1;URL=obr.php\"/><title>PIZDEC.RU</title>
<style type=\"text/css\">
body { font-weight: normal; font-size: normal; font-family: georgia; color: #FFFF00; background-color: #000033 }
a:link { text-decoration: underline; color : #FF00FF }
a:active { text-decoration: underline; color : #FFFF00 }
a:visited { text-decoration: underline; color : #00FFFF }
a:hover { text-decoration: none; color : #FFFF00 }
div { margin: 1px 0px 1px 0px; padding: 5px 5px 5px 5px; font-weight: bold;}
div.black{ background-color: #33CCFF; padding-top: 3px; padding-bottom: 3px; padding-left: 4px;  border: 1px solid;  text-align: center;}
div.blue{ background-color: #000066;    text-align: left;}
a {font-weight: bold;}</style></head>
<body bgcolor=\"#000033\">"; 
echo"<div>ВЫ не написали свое имя !
<br/><br/>
<a href=\"obr.php?nom=$nom\">Еще раз!</a>
</div>
</body>
</html>"; exit;}


if ($login == '"') {  header("Content-type:text/html; charset=utf-8");
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<meta http-equiv=\"refresh\" content=\"1;URL=obr.php\"/><title>PIZDEC.RU</title>
<style type=\"text/css\">
body { font-weight: normal; font-size: normal; font-family: georgia; color: #FFFF00; background-color: #000033 }
a:link { text-decoration: underline; color : #FF00FF }
a:active { text-decoration: underline; color : #FFFF00 }
a:visited { text-decoration: underline; color : #00FFFF }
a:hover { text-decoration: none; color : #FFFF00 }
div { margin: 1px 0px 1px 0px; padding: 5px 5px 5px 5px; font-weight: bold;}
div.black{ background-color: #33CCFF; padding-top: 3px; padding-bottom: 3px; padding-left: 4px;  border: 1px solid;  text-align: center;}
div.blue{ background-color: #000066;    text-align: left;}
a {font-weight: bold;}</style></head>
<body bgcolor=\"#000033\">"; 
echo"<div>ВЫ не написали свое имя !
<br/><br/>
<a href=\"obr.php?nom=$nom\">Еще раз!</a>
</div>
</body>
</html>"; exit;}

if ($mess == "") {  header("Content-type:text/html; charset=utf-8");
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<meta http-equiv=\"refresh\" content=\"1;URL=obr.php\"/><title>PIZDEC.RU</title>
<style type=\"text/css\">
body { font-weight: normal; font-size: normal; font-family: georgia; color: #FFFF00; background-color: #000033 }
a:link { text-decoration: underline; color : #FF00FF }
a:active { text-decoration: underline; color : #FFFF00 }
a:visited { text-decoration: underline; color : #00FFFF }
a:hover { text-decoration: none; color : #FFFF00 }
div { margin: 1px 0px 1px 0px; padding: 5px 5px 5px 5px; font-weight: bold;}
div.black{ background-color: #33CCFF; padding-top: 3px; padding-bottom: 3px; padding-left: 4px;  border: 1px solid;  text-align: center;}
div.blue{ background-color: #000066;    text-align: left;}
a {font-weight: bold;}</style></head>
<body bgcolor=\"#000033\">"; 
echo"<div>ВЫ не написали комментарий !
<br/><br/>
<a href=\"obr.php?nom=$nom\">Еще раз!</a>
</div>
</body>
</html>"; exit;} 










if ($tr==5) {
        
$trans1= array("E","F","CH","SH","IU","IA","A","B","V","G","D","ZH","Z","I","K","L","M","N","O","R","S","T","U","H","C","Y","ch","sh","iu","ia","a","b","v","g","d","e","zh","z","i","k","l","m","n","o","p","r","s","t","u","f","h","c","'","y","J","j","P"    
                );
        
        
$trans2= array("&#x0415;","&#x0424;","&#x0427;","&#x0428;","&#x042E;","&#x042F;","&#x0410;","&#x0411;","&#x0412;","&#x0413;","&#x0414;","&#x0416;","&#x0417;","&#x0418;","&#x041A;","&#x041B;","M","&#x041D;","&#x041E;","&#x0420;","&#x0421;","&#x0422;","&#x0423;","&#x0425;","&#x0426;","&#x042B;","&#x0447;","&#x0448;","&#x044E;","&#x044F;","&#x0430;","&#x0431;","&#x0432;","&#x0433;","&#x0434;","&#x0435;","&#x0436;","&#x0437;","&#x0438;","&#x043A;","&#x043B;","&#x043C;","&#x043D;","&#x043E;","&#x043F;","&#x0440;","&#x0441;","&#x0442;","&#x0443;","&#x0444;","&#x0445;","&#x0446;","&#x044C;","&#x044B;","&#x0419;","&#x0439;","&#x041F;"
                );

$mess=str_replace($trans1,$trans2,$mess);               
        };









$currHour=date("H",time());
        $currDate=date("d.F.Y", time());
        $currTime=date("$currHour:i", time());

$currDate = str_replace("January","01",$currDate);
$currDate = str_replace("February","02",$currDate);
$currDate = str_replace("March","03",$currDate);
$currDate = str_replace("April","04",$currDate);
$currDate = str_replace("May","05",$currDate);
$currDate = str_replace("June","06",$currDate);
$currDate = str_replace("July","07",$currDate);
$currDate = str_replace("August","08",$currDate);
$currDate = str_replace("September","09",$currDate);
$currDate = str_replace("October","10",$currDate);
$currDate = str_replace("November","11",$currDate);
$currDate = str_replace("December","12",$currDate);

$currDate = str_replace("2006","06",$currDate);
$currDate = str_replace("2007","07",$currDate);
$currDate = str_replace("2008","08",$currDate);
$currDate = str_replace("2009","09",$currDate);
$currDate = str_replace("2010","10",$currDate);

$yv=$obr;
$obr=$login;
$af = @implode("",@file("af/$nom.txt"));   
if ($yv!="") {$yv="$yv, ";};
$text = "<font color=\"#FF00FF\">$currDate | $currTime</font><br/>
<b><font color=\"#FF0000\">$login</font></b><br/>
<font color=\"#FFFF00\">$yv $mess</font><br/><hr/>";

$mess= trim($mess);
$af = trim($af);



if ($mess == $af) {  header("Content-type:text/html; charset=utf-8");
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<meta http-equiv=\"refresh\" content=\"1;URL=obr.php\"/><title>PIZDEC.RU</title>
<style type=\"text/css\">
body { font-weight: normal; font-size: normal; font-family: georgia; color: #FFFF00; background-color: #000033 }
a:link { text-decoration: underline; color : #FF00FF }
a:active { text-decoration: underline; color : #FFFF00 }
a:visited { text-decoration: underline; color : #00FFFF }
a:hover { text-decoration: none; color : #FFFF00 }
div { margin: 1px 0px 1px 0px; padding: 5px 5px 5px 5px; font-weight: bold;}
div.black{ background-color: #33CCFF; padding-top: 3px; padding-bottom: 3px; padding-left: 4px;  border: 1px solid;  text-align: center;}
div.blue{ background-color: #000066;    text-align: left;}
a {font-weight: bold;}</style></head>
<body bgcolor=\"#000033\">"; 
echo"<div>Такой комментарий уже есть !
<br/><br/>
<a href=\"obr.php?nom=$nom\">Еще раз!</a>
</div>
</body>
</html>"; exit;} 





  

 {



$counter_array = file("cont/$nom.dat");
$id = $counter_array[0]+1;
$fp = @fopen("cont/$nom.dat","wb");
@fputs($fp,$id);
@fclose($fp);



$fp=mkdir("rek/$nom",0770);


$fp=fopen("rek/$nom/$id.txt","w");                                                                  
fputs($fp,"$text \r\n");
fclose($fp);  
chmod ("rek/$nom/$id.txt", 0777);                                                                               

$fp=fopen("af/$nom.txt","w");
fputs($fp,"$mess \r\n");
fclose($fp); 


$delfile = $id - 30;
   if ($id>31)    { unlink ("rek/$nom/$delfile.txt"); };  



 };

    

  header("Content-type:text/html; charset=utf-8");
  header ("Location: index.php?nom=$nom ");
?>