if($id=="pasiulymai") { echo"<b>Pasiulymai cia ;)</b><br/>----------<br/>Pasiulymas:<br/><input type=\"text\" name=\"zin\" maxlength=\"250\"/><br/><anchor>Rasyti<go href=\"zaidimas.php?id=pasiulymai2&pass=$pass&nick=$nick\" method=\"post\"><postfield name=\"zin\" value=\"$(zin)\"/></go></anchor></p><p align=\"left\">"; $zinute=explode("|",file_get_contents("baze/pas.txt"));
$dir=explode("|",file_get_contents("baze/pasn.txt"));
$page=$_GET["page"];
$link="downloadai/pav/"; /*direktorija, kurioje yra downloadai*/
$zin=10; /*viename puslapyje downloadu*/
$eil=count($dir)-1;
if(!$page){$page=1;}
if($page==1){$nuo=0; $iki=$zin;}
else{$nuo=$page*$zin-$zin; $iki=$page*$zin;}
if($eil<=$page*$zin){$iki=$eil;}
$psl=ceil($eil/$zin);
for($i=$nuo; $i<$iki; $i++){
$dr=str_replace($link,"",$dir[$i]); if($dir[$i]=="Vidzas") {
echo"»<b><a href=\"zaidimas.php?id=apie&ka=$dir[$i]&pass=$pass&nick=$nick\">$dir[$i]:</a></b> $zinute[$i]<br/>---------<br/>"; } else { echo"»<a href=\"zaidimas.php?id=apie&ka=$dir[$i]&pass=$pass&nick=$nick\">$dir[$i]:</a> $zinute[$i]"; echo"<br/>---------<br/>"; } }
for($st=1; $st<$psl+1; $st++){
if($page==$st){echo"<$st>";}else{
echo"<a href=\"zaidimas.php?page=$st&pass=$pass&nick=$nick&id=pasiulymai\">($st)</a>";}}
echo"</p><p align=\"center\">----------<br/><a href=\"zaidimas.php?nick=$nick&pass=$pass\">I zaidima</a>"; }
if($id=="pasiulymai2") { echo"<p align=\"center\">"; if(count(explode("|",file_get_contents("baze/pasn.txt")))>100) { file_put_contents("baze/pasn.txt",""); file_put_contents("baze/pas.txt",""); } $zin=$_POST['zin']; $replecina = array("<",">","&","^","%","\n","|","$","?php"); $zin=str_ireplace($replecina,"",$zin); $zin1=strlen($zin); $zin = str_replace(":)","<img src=\"smiles/1.gif\" alt=\":)\"/>",$zin);
$zin = str_replace(":D","<img src=\"smiles/2.gif\" alt=\":D\"/>",$zin);
$zin = str_replace("=)","<img src=\"smiles/3.gif\" alt=\"=)\"/>",$zin);
$zin = str_replace(":P","<img src=\"smiles/4.gif\" alt=\":P\"/>",$zin);
$zin = str_replace(":(","<img src=\"smiles/5.gif\" alt=\":(\"/>",$zin);
$zin = str_replace(":*","<img src=\"smiles/6.gif\" alt=\":*\"/>",$zin);
$zin = str_replace(":@","<img src=\"smiles/7.gif\" alt=\":@\"/>",$zin);
$zin = str_replace(":fuck","<img src=\"smiles/8.gif\" alt=\":fuck\"/>",$zin);
$zin = str_replace(":ne","<img src=\"smiles/9.gif\" alt=\":ne\"/>",$zin);
$zin = str_replace(":lol","<img src=\"smiles/10.gif\" alt=\":lol\"/>",$zin);
$zin = str_replace(":A","<img src=\"smiles/11.gif\" alt=\":A\"/>",$zin);
$zin = str_replace(":B","<img src=\"smiles/12.gif\" alt=\":B\"/>",$zin);
$zin = str_replace(":O","<img src=\"smiles/13.gif\" alt=\":O\"/>",$zin);
$zin = str_replace(";)","<img src=\"smiles/14.gif\" alt=\";)\"/>",$zin);
$zin = str_replace("=D","<img src=\"smiles/15.gif\" alt=\"=D\"/>",$zin);
$zin = str_replace("=D","<img src=\"smiles/22.gif\" alt=\";(\"/>",$zin);
$zin = str_replace(":good","<img src=\"smiles/16.gif\" alt=\":good\"/>",$zin);
$zin = str_replace(":rofl","<img src=\"smiles/17.gif\" alt=\":rolf\"/>",$zin);
$zin = str_replace(":xi","<img src=\"smiles/18.gif\" alt=\":xi\"/>",$zin);
$zin = str_replace(":piktas","<img src=\"smiles/19.gif\" alt=\":piktas\"/>",$zin);
$zin = str_replace(":N","<img src=\"smiles/24.gif\" alt=\":tw\"/>",$zin);
$zin = str_replace(":N","<img src=\"smiles/23.gif\" alt=\":N\"/>",$zin);
$zin = str_replace("=D","<img src=\"smiles/15.gif\" alt=\":ops\"/>",$zin);
$zin = str_replace(":box","<img src=\"smiles/21.gif\" alt=\":box\"/>",$zin); $fl=@file_get_contents("baze/pas1.txt"); if($fl>time()) { echo"Antiflood! Palukite keleta sekundziu."; } else if(empty($zin)) { echo"Tuscia zinute!"; } else if($zin1>250) { echo"Per ilgas pasiulymas!"; } else { echo"Irasyta!"; $pas=@file_get_contents("baze/pas.txt");
$pasn=@file_get_contents("baze/pasn.txt"); @file_put_contents("baze/pas.txt","$zin|$pas");
@file_put_contents("baze/pasn.txt","$nick|$pasn"); $time=time()+30; @file_put_contents("baze/pas1.txt",$time); } echo"<br/>----------<br/><a href=\"zaidimas.php?nick=$nick&pass=$pass\">I zaidima</a>"; }