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

Размер файла: 9.49Kb
<?php
header("Content-type: text/vnd.wap.wml");
header("Cache-control: no-store,no-cache,must-revalidate");
print '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="&#169;bygone.xz.lt">'; include("on.php"); $id=$_GET['id']; $nick=$_GET['nick']; $pass=$_GET['pass']; if(!file_exists("zaidimas/nick/$nick.txt")) { echo"<p align=\"center\">Toks narys neegzistuoja!</p></card></wml>"; exit(); } if(file_get_contents("zaidimas/nick/$nick.txt")!=$pass) {  echo"<p align=\"center\">Neteisingas slaptazodis!</p></card></wml>"; exit(); } if(file_exists("zaidimas/banai/$nick.txt")) { $pimpa=explode("|",@file_get_contents("zaidimas/banai/$nick.txt"));  if($pimpa[1]<time()) { @unlink("zaidimas/banai/$nick.txt"); } else{ $laikas=$pimpa[1]-time(); $laikas=$laikas/60; $laikas=round($laikas); echo"Tu uzbanintas!<br/>-------</p><p align=\"left\">Kiek: <b>$laikas</b> min.<br/>Nuo ko: <b>$pimpa[3]</b><br/>Priezastis: <b>$pimpa[2]</b></p></card></wml>"; exit(); } } if(file_exists("zaidimas/pm/$nick.txt")) { echo"<p align=\"center\"><small><a href=\"zaidimas.php?id=pm&amp;nick=$nick&amp;pass=$pass\">Yra nauju pm</a></small></p>"; }  if($id=="") { $keli="0"; foreach(glob("zaidime/*") as $b) { $q=explode("|",file_get_contents($b)); if($q[2]=="baras" || $q[2]=="baras2" || $q[2]=="baras3" || $q[2]=="baro") { $keli=$keli+1; } } echo"<p align=\"center\"><small><b>Centras</b><br/>----------</small></p><p align=\"left\"><small>&#187;<a href=\"miestas.php?id=istatymai&amp;nick=$nick&amp;pass=$pass\">Garbes kodeksas</a><br/>&#187;<a href=\"miestas.php?id=parduotuve&amp;nick=$nick&amp;pass=$pass\">Parduotuve</a><br/>&#187;<a href=\"miestas.php?id=valdzia&amp;nick=$nick&amp;pass=$pass\">CS valdzia</a><br/>&#187;<a href=\"miestas.php?id=baras&amp;nick=$nick&amp;pass=$pass\">Baras($keli)</a><br/>&#187;<a href=\"miestas.php?nick=$nick&amp;pass=$pass&amp;id=banlist\">Ban listas</a><br/>&#187;<a href=\"ginklai.php?nick=$nick&amp;pass=$pass\">Ginklu pirkimas</a></small></p><p align=\"center\"><small>----------<br/><a href=\"zaidimas.php?nick=$nick&amp;pass=$pass\">I zaidima</a></small>";  } if($id=="valdzia") { echo"<p align=\"center\"><small><b>CS Valdzios atstovai</b><br/>---------<br/>Pagrindinis sio zaidimo adminstratorius yra xmintarasx, bet yra ir moderatoriai:<br/>"; foreach(glob("zaidimas/mod/*") as $b) { $b=str_replace("zaidimas/mod/","",$b); $b=str_replace(".txt","",$b); echo"<a href=\"zaidimas.php?id=apie&amp;ka=$b&amp;nick=$nick&amp;pass=$pass\">$b</a><br/>"; } echo"Vieta valdzioje galima pelnyti geru zaidimu, draugiskumu ir tt. bet zinoma galima ir nusipirkti ;) kaina 5lt labas papildymas, kreiptis i admina xmintarasx, zinoma jei jus busit blogas modas, jus greit neteksit savo pareigu!<br/>----------<br/><a href=\"zaidimas.php?nick=$nick&amp;pass=$pass\">I zaidima</a></small>"; } if($id=="banlist") { echo"<p align=\"center\"><small>Ban listas<br/>----------<br/>";  foreach(glob("zaidimas/banai/*") as $ban) { $rr=explode("|",file_get_contents($ban)); $ban=str_replace(".txt","",$ban); $ban=str_replace("zaidimas/banai/","",$ban); $laikas=$rr[1]-time();  if($rr[1]<time()) { @unlink("zaidimas/banai/$ban.txt"); } $laikas=$laikas/60; $laikas=ceil($laikas); echo"<b>$ban</b><br/>Liko: $laikas min.<br/>Priezastis: $rr[2]($rr[3])<br/>"; } echo"----------<br/><a href=\"zaidimas.php?nick=$nick&amp;pass=$pass\">I zaidima</a></small>"; } if($id=="parduotuve") { $pinigai=@file_get_contents("zaidimas/pinigai/$nick.txt"); echo"<p align=\"center\"><small><b>Parduotuve</b><br/>---------<br/>Pinigai: $pinigai $$<br/>---------<br/></small><select name=\"pirkinys\"><option value=\"1\">Hamburgeris(25$$)</option><option value=\"2\">Pica(50$$)</option><option value=\"4\">Vaistai(100$$)</option></select><br/><anchor>Pirkti<go href=\"miestas.php?id=perkam&amp;pass=$pass&amp;nick=$nick\" method=\"post\"><postfield name=\"pirkinys\" value=\"$(pirkinys)\"/></go></anchor><small><br/>----------<br/><a href=\"zaidimas.php?nick=$nick&amp;pass=$pass\">I zaidima</a></small>"; } if($id=="perkam") {  echo"<p align=\"center\"><small><b>"; $pirkinys=$_POST['pirkinys']; $pirkinys=htmlspecialchars($pirkinys); if($pirkinys!="1" && $pirkinys!="2" && $pirkinys!="4") { echo"Tokio pirkinio nera!</b></small></p></card></wml>"; exit();  } $pinigai=@file_get_contents("zaidimas/pinigai/$nick.txt");  if($pinigai<25*$pirkinys) { echo"Neturi tiek pinigu!"; } else {$pinigai=$pinigai-25*$pirkinys; $gyvybes=@file_get_contents("zaidimas/gyvybes/$nick.txt"); $gyvybes=$gyvybes+25*$pirkinys; if($gyvybes>100) { $gyvybes="100"; }  echo"M.. Suvalgei,dabar turi $gyvybes/100 gyvybiu.";  file_put_contents("zaidimas/pinigai/$nick.txt",$pinigai);
file_put_contents("zaidimas/gyvybes/$nick.txt","$gyvybes"); } echo"</b><br/>---------<br/><a href=\"zaidimas.php?nick=$nick&amp;pass=$pass\">I zaidima</a></small>"; }

if($id=="baras") { $keli="0"; foreach(glob("zaidime/*") as $b) { $q=explode("|",file_get_contents($b)); if($q[2]=="baras" || $q[2]=="baras2" || $q[2]=="baras3" || $q[2]=="baro") { $keli=$keli+1; } } echo"<onevent type=\"ontimer\"><go href=\"miestas.php?id=baras&amp;pass=$pass&amp;nick=$nick\"/></onevent><timer value=\"300\"/><p align=\"center\">"; echo"<small><b>Pokalbiai vyksta cia! ;)</b><br/>----------<br/><a href=\"miestas.php?id=baras2&amp;pass=$pass&amp;nick=$nick\">Rasyti</a> <a href=\"miestas.php?id=baro&amp;pass=$pass&amp;nick=$nick\">Online $keli</a><br/>----------</small></p><p align=\"left\">"; $masyvas=explode("|",file_get_contents("bar.txt")); for($i="0"; $i<count($masyvas)-1; $i++) { $rrr=explode("*****",$masyvas[$i]); echo"<small><b><a href=\"zaidimas.php?id=apie&amp;ka=$rrr[0]&amp;pass=$pass&amp;nick=$nick\">$rrr[0]</a>:</b> $rrr[1]<br/></small>"; } echo"</p><p align=\"center\"><small><a href=\"zaidimas.php?pass=$pass&amp;nick=$nick\">Iseiti</a></small>";  }

if($id=="baras2") { echo"<p align=\"center\"><b>Zinute</b><br/>----------<br/><input name=\"zin\" maxlength=\"200\" type=\"text\"/><br/><anchor>Rasyti<go href=\"miestas.php?id=baras3&amp;pass=$pass&amp;nick=$nick\" method=\"post\"><postfield name=\"zin\" value=\"$(zin)\"/></go></anchor>"; }

if($id=="baras3") { echo"<onevent type=\"ontimer\"><go href=\"miestas.php?id=baras&amp;pass=$pass&amp;nick=$nick\"/></onevent><timer value=\"10\"/><p align=\"center\">";   $zin=$_POST['zin']; $zin1=strlen($zin); $zin=str_replace("?>","",$zin);
$zin=str_replace("$","$$",$zin); 
$zin=str_replace("|","",$zin);  $zin=str_replace("&","&amp;",$zin);
$zin=str_replace("<","&lt;",$zin);
$zin=str_replace(">","&gt;",$zin); $zin=str_replace(';)','<img src="veidai/mirksi.gif" alt="Veidas"/>',$zin); $zin=str_replace('=D','<img src="veidai/sypsena.gif" alt="Veidas"/>',$zin); $zin=str_replace(':)','<img src="veidai/linksmas.gif" alt="Veidas"/>',$zin);
$zin=str_replace(':N','<img src="veidai/t.gif" alt="Veidas"/>',$zin);
$zin=str_replace('=)','<img src="veidai/linksmas.gif" alt="Veidas"/>',$zin);
$zin=str_replace(':(','<img src="veidai/liudnas.gif" alt="Veidas"/>',$zin);
$zin=str_replace('=(','<img src="veidai/liudnas.gif" alt="Veidas"/>',$zin);
$zin=str_replace('=P','<img src="veidai/liezuvis.gif" alt="Veidas"/>',$zin);
$zin=str_replace(':P','<img src="veidai/liezuvis.gif" alt="Veidas"/>',$zin); 
$zin=str_replace('=(','<img src="veidai/liudnas.gif" alt="Veidas"/>',$zin);
$zin=str_replace(':(','<img src="veidai/liudnas.gif" alt="Veidas"/>',$zin);
$zin=str_replace('=O','<img src="veidai/nustebes.gif" alt="Veidas"/>',$zin);
$zin=str_replace(':O','<img src="veidai/nustebes.gif" alt="Veidas"/>',$zin);
$zin=str_replace(':D','<img src="veidai/sypsena.gif" alt="Veidas"/>',$zin); $zin=str_replace("А","&#260;",$zin);
$zin=str_replace("а","&#261;",$zin); 
$zin=str_replace("И","&#268;",$zin);
$zin=str_replace("и","&#269;",$zin);
$zin=str_replace("Л","&#278;",$zin); 
$zin=str_replace("л","&#279;",$zin); 
$zin=str_replace("Ж","&#280;",$zin); 
$zin=str_replace("ж","&#281;",$zin);
$zin=str_replace("Б","&#302;",$zin);
$zin=str_replace("б","&#303;",$zin); 
$zin=str_replace("Р","&#352;",$zin);  
$zin=str_replace("р","&#353;",$zin);
$zin=str_replace("Ы","&#362;",$zin); 
$zin=str_replace("ы","&#363;",$zin); 
$zin=str_replace("Ш","&#370;",$zin);  
$zin=str_replace("ш","&#371;",$zin); 
$zin=str_replace("Ю","&#381;",$zin); 
$zin=str_replace("ю","&#382;",$zin); if($zin1>200) { echo"Per ilga zinute!"; } else { echo"Sekmingai yrasyta!"; $baras=@file_get_contents("bar.txt"); @file_put_contents("bar.txt","$nick*****$zin|$baras"); $masyvas=explode("|",file_get_contents("bar.txt")); if(count($masyvas)>15) { unset($masyvas[15]); $masyvas=implode("|",$masyvas); @file_put_contents("bar.txt",$masyvas); } } echo"<br/>----------<br/>"; }

if($id=="baro") { echo"<p align=\"center\"><small>Bare:<br/>"; $keli="0"; foreach(glob("zaidime/*") as $b) { $q=explode("|",file_get_contents($b)); if($q[2]=="baras" || $q[2]=="baras2" || $q[2]=="baras3" || $q[2]=="baro") { $keli=$keli+1; $b=str_replace("zaidime/","",$b); $b=str_replace(".txt","",$b); echo"<a href=\"zaidimas.php?id=apie&amp;ka=$b&amp;pass=$pass&amp;nick=$nick\">$b</a><br/>"; } } echo"----------<br/><a href=\"zaidimas.php?id=baras&amp;pass=$pass&amp;nick=$nick\">I bara</a></small>"; } if($id=="istatymai") { echo"<p align=\"center\"><small><b>CS nario garbes kodeksas</b><br/>----------<br/>1.Nepuldineti daznai silpnesniu kovotoju ;)<br/>2.Nereklamuoti savo svetainiu ar dar kokiu dalyku!<br/>3.Nesitycioti is silpnesniusio zaidimo nariu!<br/>4.Nesikeikti per daug!<br/>5.Buti aktyviam CS nariui ;)<br/>----------<br/><a href=\"zaidimas.php?nick=$nick&amp;pass=$pass\">I zaidima</a></small>"; }



 ?></p></card></wml>