Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Klaidos, klaidos

Parašė Mantuxs09· 2010 Geg. 28 15:05:58
#2

index.php kodas:

<?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\"?>";
echo"<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"" . " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
 ?>
 <wml>
<?php
include("config2.php");
$data = date("Y/m/d H:i");

$id = $_GET['id'];
 $linija = "<img src=\"in/Arme.wbmp\" alt=\"---\"/>";

$arr = @file("zaidimas.on.txt");
$on = count($arr);

  $file = @file("msg/topic2.txt");
for ($a=0; $a<count($file); $a++) { list ($zinutee, $niks) = explode ("\t", $file[$a]);}
include("smailai.php");


if ($id == "")
{
  echo"<card id=\"index\" title=\"DBZ WAP GAME\"><p align=\"center\">
  <a href=\"\"><img src=\"in/banner.gif\" alt=\"baner\"/></a><br/>
  $linija<br/>
<b>Titulinis:</b><br/>
 $zinutee<br/>
..::$niks::..<br/>
  $linija<br/>
  <a href=\"index.php?id=login\"><img src=\"log.gif\" alt=\"Prisijungti\"/></a><br/>
  <a href=\"index.php?id=informacija\"><img src=\"reg.gif\" alt=\"Registracija\"/></a><br/>
  $linija<br/>
  <a href=\"http://brigada.saitas.net\"><img src=\"counter/count.php?\" alt=\"brigada\"/></a><br/>
  $linija<br/>
  Adminas:<b>Magic</b><br/>
 </p>";
}

if ($id == "informacija")
{
echo"<card id=\"index\" title=\"WAP DBZ\">";
if($reg_stop == "taip"){ echo"<p align=\"center\">Registracija laikinai sustabdyta<br/>$linija <a href=\"index.php?id=\">[&#171;&#171; Atgal]</a></p>"; exit('</card></wml>'); }
else{
echo "
<p align=\"center\">
<b>Wap DBZ GT</b><br/>
$linija<br/>
<i>1. Naujas projektas...<br/>
2. Registruodamiesi uzpildykite visus laukialius.<br/>
3. DBZ name - galite deti tarpeli.<br/>
4. Prasome nekenkti sistemai.<br/>
5. Gerbti kitus Wap Game Lankytojus.</i><br/>
$linija<br/>
<a href=\"index.php?id=reg\">..::OK::..</a><br/>
<a href=\"index.php?id=\">...Atgal...</a></p>
"; }
}
if ($id == "login")

{
$nick__ = $_GET['nick__'];
$pass__ = $_GET['pass__'];

echo "<card id=\"index\" title=\"Prisijunk!\"><p align=\"center\">
<b>Prisijunk ir tu</b><br/>$linija<br/>DBZ NAME:<br/><input name=\"nick\" title=\"nick\" value=\"$nick__\" maxlength=\"20\" type=\"text\" emptyok=\"false\"/><br/>Slapta&#382;odis:<br/><input name=\"pass\" value=\"$pass__\" title=\"pass\" maxlength=\"20\" type=\"password\" emptyok=\"false\"/><br/>$linija<br/><anchor title=\"Jungtis\">...GO...<go href=\"$PHP_SELF?id=log&amp;nick=$(nick)&amp;pass=$(pass)\"/></anchor><br/></p>";
}



if ($id == "log")

{
 $nick = $_GET['nick'];
$pass = $_GET['pass'];

 if (!file_exists("$dir/$nick.dat"))
{
   echo "<card id=\"index\" title=\"Klaida!\" ontimer=\"$PHP_SELF?id=\"><timer value=\"2\"/>
   <p align=\"center\">tokio Vartotojo nera musu sistemoje!</p></card>";
}
else
{
$file = "$dir/$nick.dat";
$duom = fopen ($file, "r");
$pass_ = fread ($duom, filesize($file));
fclose ($duom);
list($pass_, $nick_) = explode("|", $pass_);
if (md5($pass) == $pass_)
{
         echo "<card id=\"index\" title=\"Prisijungti\"><onevent type=\"ontimer\"><go href=\"zaidimas.php?id=&amp;nick=$nick&amp;pass=$pass\"/></onevent><timer value=\"1\"/><p align=\"center\">Prisijungei... Laikykis zaidimo taisykliu... Ir sekmes:DDD !</p>";

 $ip =  $_SERVER['REMOTE_ADDR'];



  $narsykle = $_SERVER['HTTP_USER_AGENT'];

  list($telefono_modelis) = explode("/", $narsykle);

  list($xxx, $versija) = explode(" ", $narsykle);

$inn = "info/$nick.txt";

$df = fopen($inn, "r");

$rr = fread($df, filesize($inn));

fclose($df);

list($gfdfsg, $sl) = explode("\n", $rr);

$nars = $telefono_modelis;

$ate = date("G:i");

$iir = "$nars|$ip|$ate";

$inn = "info/$nick.txt";

$dddd = fopen($inn, "w+");

fwrite($dddd, "$iir\n$sl");

fclose($dddd);


}
else
{ echo  "<card id=\"index\" title=\"Klaida\" ontimer=\"index.php\"><timer value=\"1\"/><p align=\"center\">Neteisingas slapta&#382;odis!</p>";
}


}

}


if ($id == "reg")
{
echo "<card id=\"index\" title=\"WAP DBZ\">";
if($reg_stop == "taip"){ echo"<p align=\"center\">Registracija laikinai sustabdyta<br/>$linija <a href=\"index.php?id=\">[&#171;&#171; Atgal]</a></p>"; exit('</card></wml>');}
else { echo"<p align=\"center\">
<b>Registracija</b><br/>
$linija<br/>
DBZ Name:<br/><input name=\"nick\" type=\"text\" maxlength=\"20\" emptyok=\"false\" title=\"Nick\"/><br/>
Slapta&#382;odis:<br/><input name=\"pass1\" type=\"password\" maxlength=\"20\" emptyok=\"false\" title=\"Pass\"/><br/>
Slapta&#382;odis:<br/><input name=\"pass2\" type=\"password\" maxlength=\"20\" emptyok=\"false\" title=\"Pass\"/><br/>
$linija<br/>
<anchor title=\"Reg\">Wap game<go href=\"$PHP_SELF?id=reg_act\" method=\"post\">
<postfield name=\"nick\" value=\"$(nick)\"/>
<postfield name=\"pass1\" value=\"$(pass1)\"/>
<postfield name=\"pass2\" value=\"$(pass2)\"/>
</go></anchor></p>";} echo""; }

if ($id == "reg_act")
{
if($reg_stop == "taip"){ echo"<card id=\"index\" title=\"STOP!\"><p align=\"center\">Registracija laikinai sustabdyta<br/>$linija <a href=\"index.php?id=\">[&#171;&#171; Atgal]</a></p>"; exit('</card></wml>');}
else {
$nick = $_POST['nick'];
$pass1 = $_POST['pass1'];
$pass2 = $_POST['pass2'];
$auto = $_POST['auto'];
$nr = $_POST['nr'];
$speed = 0;

   $aaa = "zaidimo_failai/greitis/$nick.dat";
   $dd = fopen($aaa, "w+");
   fwrite($dd, "$speed");
   fclose($dd);


$nick = str_replace("\n", "", $nick);
$nick = str_replace("/", "", $nick);
$nick = str_replace(".", "", $nick);
$nick = str_replace(" ", "_", $nick);
$nick = str_replace("<", "", $nick);
$nick = str_replace(">", "", $nick);
$nick = str_replace("$", "", $nick);
$nick = str_replace("topic", "", $nick);
$nick = str_replace("Topic", "", $nick);
$nick = str_replace("@", "", $nick);
$nick = str_replace(":", "", $nick);
$nick = str_replace("=", "", $nick);
$nick = str_replace("&", "", $nick);
$nick = str_replace("*", "", $nick);
$nick = str_replace("%", "", $nick);
$nick = str_replace("#", "", $nick);
$nick = str_replace("^", "", $nick);
$nick = str_replace("?", "", $nick);
$nick = str_replace(";", "", $nick);
$nick = str_replace(".xxi.lt", "", $nick);
$nick = str_replace(".ten.lt", "", $nick);
$nick = str_replace("wab.ru", "", $nick);

$nick = str_replace("Neilazz", "", $nick);
$nick = str_replace("neiLazz", "", $nick);
$nick = str_replace("!neilazz", "", $nick);
$nick = str_replace("-neilazz", "", $nick);
$nick = str_replace("?neilazz", "", $nick);
$nick = str_replace("qneilazz", "", $nick);

$nick = str_replace("!", "", $nick);
$nick = str_replace("prv", "", $nick);
$nick = str_replace("privatas", "", $nick);
$nick = str_replace("Xbot", "", $nick);
$nick = str_replace("XBot", "", $nick);
$nick = str_replace("XBOt", "", $nick);
$nick = str_replace("XBOT", "", $nick);
$nick = str_replace("xbOt", "", $nick);
$nick = str_replace("|", "", $nick);
$nick = str_replace("+", "", $nick);


$pass1 = str_replace("<", "", $pass1);
$pass1 = str_replace(">", "", $pass1);
$pass1 = str_replace("$", "", $pass1);
$pass1 = str_replace("&", "", $pass1);
$pass1 = str_replace("|", "", $pass1);
$pass1 = str_replace("^", "", $pass1);
$pass1 = str_replace("*", "", $pass1);
$pass1 = str_replace("/", "", $pass1);

$pass2 = str_replace("<", "", $pass2);
$pass2 = str_replace(">", "", $pass2);
$pass2 = str_replace("$", "", $pass2);
$pass2 = str_replace("&", "", $pass2);
$pass2 = str_replace("|", "", $pass2);
$pass2 = str_replace("^", "", $pass2);
$pass2 = str_replace("*", "", $pass2);
$pass2 = str_replace("/", "", $pass2);



$mail = str_replace("<", "", $mail);
$mail = str_replace(">", "", $mail);
$mail = str_replace("$", "", $mail);
$mail = str_replace("&", "", $mail);
$mail = str_replace("|", "", $mail);
$mail = str_replace(" ", "_", $mail);
$mail = str_replace("*","", $mail);
$mail = str_replace("^","", $mail);
$mail = str_replace("/","", $mail);

$apr = str_replace("<", "", $apr);
$apr = str_replace(">", "", $apr);
$apr = str_replace("$", "", $apr);
$apr = str_replace("&", "", $apr);
$apr = str_replace("*","", $apr);
$apr = str_replace("^","", $apr);
$apr = str_replace("|","", $apr);
$apr = str_replace("/","", $apr);


$me = str_replace("<", "", $me);
$me = str_replace(">", "", $me);
$me = str_replace("$", "", $me);
$me = str_replace("&", "", $me);
$me = str_replace("*","", $me);
$me = str_replace("^","", $me);
$me = str_replace("|","", $me);
$me = str_replace("/","", $me);



$age = str_replace("<", "", $age);
$age = str_replace(">", "", $age);
$age = str_replace("$", "", $age);
$age = str_replace("&", "", $age);
$age = str_replace("*","", $age);
$age = str_replace("^","", $age);
$age = str_replace("|","", $age);
$age = str_replace("/","", $age);

if (empty($nick))
{ $msg = "Neivedete nicko!"; }
if ($nick == "ChatBot" || $nick == "chatbot" || $nick == "Bendras" || $nick == "Extrem" || $nick == "Blevyzgos" || $nick == "Programeriai" || $nick == "IT" || $nick == "GSM" || $nick == "Muzika" || $nick == "Sportas" || $nick == "Pazintys" || $nick == "Anime" || $nick == "Zaidimai" || $nick == "prv") { $msg = "Toks nickas negalimas!"; }
if (strlen($nick)<2) { $msg = "Per trumpas nickas!"; }
if (strlen($nick)>20) { $msg = "Per ilgas nickas!"; }



if (empty($pass1))
{ $msg = "Neived&#279;te slapta&#382;od&#382;io!"; }

if ($pass1 != $pass2)
{ $msg = "Nevienodi slapta&#382;od&#382;iai!";  }
if (strlen($pass1) < 4) { $msg = "Per trumpas slapta&#382;odis!"; }
if (strlen($pass2) < 4) { $msg = "Per trumpas slapta&#382;odis!"; }
if (strlen($pass1) > 20) { $msg = "Per ilgas slapta&#382;odis!"; }
if (strlen($pass2) > 20) { $msg = "Per ilgas slapta&#382;odis!"; }

if (file_exists("$dir/$nick.dat"))
{ $msg = "Toks nickas jau u&#382;registruotas!";  }


if ($msg != "")
{ echo "<card id=\"index\" title=\"Klaida!\" ontimer=\"$PHP_SELF?id=reg\"><timer value=\"3\"/><p align=\"center\">$msg</p>"; exit('</wml>'); }
else
{

$pass1 = md5($pass1);

$reg_file = "$dir/$nick.dat";
$irasas = "$pass1|$auto|$nick|$data|0|";


$duom = fopen($reg_file, "w+");
fwrite($duom, $irasas);
fclose($duom);


$g = fopen("url/$nick.txt", "w+");
fwrite($g, "http://dbzgt.puslapiai.lt/in/ok.gif");
fclose($g);
chmod("url/$nick.txt", 0755);


$g = fopen("msg/$nick.txt", "w+");
fwrite($g, "");
fclose($g);
chmod("msg/$nick.txt", 0755);


$gg = fopen("info/$nick.txt", "w+");
fwrite($gg, "0");
fclose($gg);
chmod("info/$nick.txt", 0755);

$ggg = fopen("pm/privatas_$nick.dat", "w+");
fwrite($ggg, "");
fclose($ggg);
chmod("pm/privatas_$nick.dat", 0755);


$ffile = fopen("zaidimo_failai/riedlente/$nick.dat", "w+");
fwrite($ffile, "0");
fclose($ffile);
chmod("zaidimo_failai/riedlente/$nick.dat", 0755);

 $ip =  $_SERVER['REMOTE_ADDR'];



  $narsykle = $_SERVER['HTTP_USER_AGENT'];

  list($telefono_modelis) = explode("/", $narsykle);

  list($xxx, $versija) = explode(" ", $narsykle);

$inn = "info/$nick.txt";

$df = fopen($inn, "r");

$rr = fread($df, filesize($inn));

fclose($df);

list($gfdfsg, $sl) = explode("\n", $rr);

$nars = $telefono_modelis;

$ate = date("G:i");

$iir = "$nars|$ip|$ate";

$inn = "info/$nick.txt";

$dddd = fopen($inn, "w+");

fwrite($dddd, "$iir\n$sl");

fclose($dddd);



echo "<card id=\"index\" title=\"$nick\"><p align=\"center\">Registracija sekminga!<br/>$linija<br/><b>DBZ Name:</b><br/>$nick<br/><b>Slapta&#382;odis:</b><br/>$pass2<br/>$linija<br/><anchor>GO<go href=\"$PHP_SELF?id=login&amp;pass__=$pass2&amp;nick__=$nick\"/></anchor></p>";

}}



}

?>
</card></wml>