Topic: kas gaileti padek su php

<?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>';
$time = date("H:i Y-m-d");
echo "<card id=\"index\" title=\"wap.lie.lt\">";

$id = $_GET['id'];
$kdp = $_GET['kd'];
$k = $_GET['k'];
$lin = "--=====--";

$online = count(glob("iiinnnfffooo/online/*"));
$tim = @time() + 15;
$floo = @file_get_contents("txt/reg_apsauga.txt");
$pask_reg = @file_get_contents("txt/pask_reg.txt");

$ip = $_SERVER['REMOTE_ADDR'];
$iskur = $k;
if ($iskur != "" && file_exists("wapasinfoorda/$iskur.txt")){
$a = @file("txt/atv.txt");
for ($i = 0; $i < count($a); $i++){
$b = @explode("|", $a[$i]);
if ($b[0] == $ip){$l = "yra";break;}}
if ($l != "yra"){
$f = @fopen("txt/atv.txt", "a");
@fwrite($f, "$ip|\n");
@fclose($f);
if (!file_exists("kronoss/$iskur.txt")){$kronu = 0;}
else{
$kronu = @file_get_contents("kronoss/$iskur.txt");}
$fop = @fopen("kronoss/$iskur.txt", "w+");
@fwrite($fop, $kronu + 0.2);
@fclose($fop);
@chmod("kronoss/$iskur.txt", 0777);
$penrt1 = @fopen("atvesti/$iskur.txt", "a+");
@fwrite($penrt1, "$ip|\n");
@fclose($penrt1);
@chmod("atvesti/$iskur.txt", 0777);
}}

if ($id == ""){
echo "<p align=\"center\"><small>
<img src=\"http://lie.lt/lie.png\" alt=\"Logo\"/><br/>
$lin<br/>
<b>Zaidzia: $online</b><br/>
$lin<br/>
</small></p><p align=\"left\"><small>
<b>
» <a href=\"http://wap.lie.lt\">WAP.LIE.LT</a><br/>
» <a href=\"index.php?id=log\">Prisijungti</a><br/>
» <a href=\"index.php?id=reg\">Registruotis</a><br/>
</b>
</small></p><p align=\"center\"><small>
$lin<br/>
<img src=\"http://wtop.us/count.php?id=rol\" alt=\"WAP TOP\"/><br/>
$lin<br/>
Kurejas: <b><a href=\"http://xem.lt\">©GeneraL</a></b><br/>
</small></p>";
}

if ($id == "log"){
echo "<p align=\"center\"><small><b>Prisijungimas</b><br/>
$lin<br/>
</small></p><p align=\"left\"><small>
<b>Slapyvardis:</b><br/>
<input name=\"nick\" type=\"text\" maxlength=\"15\" title=\"Nikas\"/><br/>
<b>Slaptazodis:</b><br/>
<input name=\"pass\" type=\"password\" maxlength=\"20\" title=\"Slaptazodis\"/><br/>
</small></p><p align=\"center\"><small>
$lin<br/>
» <anchor>Jungtis<go href=\"login.php\" method=\"post\">
<postfield name=\"pass\" value=\"$(pass)\"/>
<postfield name=\"nick\" value=\"$(nick)\"/>
</go></anchor><br/>
$lin<br/>
« <a href=\"index.php\">Atgal</a><br/></small></p>";}

if ($id == "reg")
{
$m1 = rand(0,9); $m2 = rand(0,9); $m3 = rand(0,9); 
$m4 = rand(0,9); $m5 = rand(0,9); $m6 = rand(0,9); 
$kodasz = "$m1$m2$m3$m4$m5$m6";
$kodas = @fopen("txt/reg_kodasz.txt","w");
fwrite($ko,"$kodasz");
fclose($ko);
if (!file_exists("regai/$kodasz.txt")){
$ko = @fopen("regai/$kodasz.txt","w");
fwrite($ko,"$kodasz");
fclose($ko);}
echo "<p align=\"center\"><small>
<b>Registracija</b><br/>
$lin<br/>
</small></p><p align=\"left\"><small>
<b>Slapyvardis:</b><br/>
<input name=\"nick\" maxlength=\"15\" title=\"Nikas\"/><br/>
<b>Slaptazodis:</b><br/>
<input name=\"pass\" type=\"password\" maxlength=\"20\" title=\"Slaptazodis\"/><br/>
<b>Slaptazodis:</b><br/>
<input name=\"pass2\" type=\"password\" maxlength=\"20\" title=\"Slaptazodis\"/><br/>
<small><b>Herojus</b></small><br/>
<select name=\"valdovas\" title=\"Valdovas\">
<option value=\"Igoris\">Igoris (+10% aukso)</option>
<option value=\"Olegas\">Olegas (+10% medienos)</option>
<option value=\"Erikas\">Erikas (+10% gelezies)</option></select><br/>
<img src=\"kodas.php\" alt=\"123456\"/><br/>
<input name=\"kodas\" type=\"*N\" maxlength=\"6\" format=\"*N\" title=\"kodas\" size=\"6\"/><br/>
</small></p><p align=\"center\"><small>
$lin<br/>
» <anchor>Toliau<go method=\"post\" href=\"index.php?id=reg2\">
<postfield name=\"nick\" value=\"$(nick)\"/>
<postfield name=\"pass\" value=\"$(pass)\"/>
<postfield name=\"pass2\" value=\"$(pass2)\"/>
<postfield name=\"valdovas\" value=\"$(valdovas)\"/>
<postfield name=\"kodas\" value=\"$(kodas)\"/></go></anchor><br/>
$lin<br/>
« <a href=\"index.php\">Atgal</a><br/></small></p>";}




if ($id == "reg2"){
$pask = time();
$lik = $floo - time();
$nick = $_POST['nick'];
$nickp = strtolower($_POST['nick']);
$pass = $_POST['pass'];
$pass2 = $_POST['pass2'];
$valdovas = $_POST['valdovas'];
$kodas = $_POST['kodas'];
$nick = @ereg_replace("[^A-Za-z0-9]", "", $nick);
$pass = @ereg_replace("[^A-Za-z0-9]", "", $pass);
$pass2 = @ereg_replace("[^A-Za-z0-9]", "", $pass2);
if (file_exists("regai/$kodas.txt")){$kod = file_get_contents("regai/$kodas.txt");}
if (!file_exists("regai/$kodas.txt")){$kod = file_get_contents("txt/reg_kodasz.txt");}
if ($kodas != $kod){$klaida = "Kodas nesutampa!";}
if ($kodas == ""){$klaida = "Neivestas kodas!";}
if ($pass == ""){$klaida = "Neivestas slaptazodis!";}
if ($pass2 == ""){$klaida = "Nepakartojai slaptazodzio!";}
if ($pass != $pass2){$klaida = "Slaptazodziai nesutampa!";}
if (strlen($pass) < 8){$klaida = "Slaptazodis per trumpas!";}
if (strlen($pass) > 20){$klaida = "Slaptazodis per ilgas!";}
if ($pass == $nick){$klaida = "Slaptazodis nesaugus, nedaryk slaptazodzio tokio, kaip slapyvardis!";}
if ($nick == ""){$klaida = "Neivestas nickas!";}
if (file_exists("wapasinfoorda/$nick.txt")){$klaida = "Toks slapyvardis jau uzregistruotas!";}
if (file_exists("usersxs_2/$nickp.txt")){$klaida = "Toks slapyvardis jau uzregistruotas, skiriasi tik mazosios ir dedeles raides!";}
if (strlen($nick) < 4){$klaida = "Nickas per trumpas!";}
if (strlen($nick) > 20){$klaida = "Nickas per ilgas!";}
if ($valdovas == "Igoris"){$a = "+";}
if ($valdovas == "Olegas"){$a = "+";}
if ($valdovas == "Erikas"){$a = "+";}
if ($a != "+"){$klaida = "Blogas valdovas!";}
if (time() < $floo){$klaida = "Registruotis galesite po $lik s.";}
if ($klaida != ""){        
echo "<p align=\"center\"><small><b>Klaida</b><br/>
$lin<br/>
<b>$klaida</b><br/>
$lin<br/>
<a href=\"index.php?id=reg\">Registruotis</a><br/></small></p>";}
else{
echo"<p align=\"center\"><small><b>Registracija Pavyko!</b><br/>
$lin<br/>
Uzsiregistravote sekmingai!<br/>
Jusu slapyvardis: <b>$nick</b>, o slaptazodis: <b>$pass</b><br/>
Jau galite prisijungti<br/>
$lin<br/>
<b><a href=\"index.php?id=log\">Prisijungti</a></b><br/></small></p>";

            $pass = md5(sha1(md5($pass)));

            $atidarymas = @fopen("wapasinfoorda/$nick.txt", "w+");
            @fwrite($atidarymas, "$pass|$nick|$valdovas|\n");
            @fclose($atidarymas);
            @chmod("wapasinfoorda/$nick.txt", 0777);

            $atidarymas = @fopen("usersxs_2/$nickp.txt", "w+");
            @fwrite($atidarymas, "+");
            @fclose($atidarymas);
            @chmod("usersxs_2/$nickp.txt", 0777);
            
            $pmi = "priv_zin";
            $atidaryma = @fopen("$pmi/$nick.txt", "w+");
            @fwrite($atidaryma, "@blade|Orda.Wu.LT game, zaiskit!!! ;)||\n");
            @fclose($atidaryma);
            @chmod("$pmi/$nick.txt", 0777);

            $fopy = @fopen("txt/reg_apsauga.txt", "w");
            @fwrite($fopy, "$tim");
            @fclose($fopy);
            @chmod("txt/reg_apsauga.txt", 0777);

            $fopy = @fopen("kronoss/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kronoss/$nick.txt", 0777);

            $fopy = @fopen("pastatai/sachtos/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("pastatai/sachtos/$nick.txt", 0777);

            $fopy = @fopen("pastatai/lentpjuves/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("pastatai/lentpjuves/$nick.txt", 0777);

            $fopy = @fopen("pastatai/kareivines/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("pastatai/kareivines/$nick.txt", 0777);

            $fopy = @fopen("pastatai/fermos/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("pastatai/fermos/$nick.txt", 0777);

            $fopy = @fopen("pastatai/auksas/$nick.txt", "w");
            @fwrite($fopy, "400");
            @fclose($fopy);
            @chmod("pastatai/auksas/$nick.txt", 0777);

            $fopy = @fopen("pastatai/mediena/$nick.txt", "w");
            @fwrite($fopy, "300");
            @fclose($fopy);
            @chmod("pastatai/mediena/$nick.txt", 0777);

            $fopy = @fopen("pastatai/gelezis/$nick.txt", "w");
            @fwrite($fopy, "300");
            @fclose($fopy);
            @chmod("pastatai/gelezis/$nick.txt", 0777);

            $fopy = @fopen("pastatai/xp/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("pastatai/xp/$nick.txt", 0777);

            $fopy = @fopen("ejimai/$nick.txt", "w");
            @fwrite($fopy, "20");
            @fclose($fopy);
            @chmod("ejimai/$nick.txt", 0777);

            $fopy = @fopen("kariai/fermeriai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/fermeriai/$nick.txt", 0777);

            $fopy = @fopen("kariai/darbininkai/$nick.txt", "w");
            @fwrite($fopy, "70");
            @fclose($fopy);
            @chmod("kariai/darbininkai/$nick.txt", 0777);

            $fopy = @fopen("kariai/lankininkai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/lankininkai/$nick.txt", 0777);

            $fopy = @fopen("kariai/riteriai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/riteriai/$nick.txt", 0777);

            $fopy = @fopen("kariai/padegejai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/padegejai/$nick.txtt", 0777);

            $fopy = @fopen("kariai/sunkiejiriteriai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/sunkiejiriteriai/$nick.txt", 0777);

            $fopy = @fopen("kariai/ietininkai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/ietininkai/$nick.txt", 0777);

            $fopy = @fopen("kariai/lankininkaisukardais/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/lankininkaisukardais/$nick.txt", 0777);

            $fopy = @fopen("kariai/raiteliai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/raiteliai/$nick.txt", 0777);

            $fopy = @fopen("kariai/sakalininkai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/sakalininkai/$nick.tx", 0777);

            $fopy = @fopen("kariai/kariaisuarbaletais/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/kariaisuarbaletais/$nick.txt", 0777);

            $fopy = @fopen("kariai/negrai/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/negrai/$nick.txt", 0777);

            $fopy = @fopen("kariai/kariaisukuokomis/$nick.txt", "w");
            @fwrite($fopy, "0");
            @fclose($fopy);
            @chmod("kariai/kariaisukuokomis/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/pm/$nick.txt", "w");
            fwrite($fopy, "");
            fclose($fopy);
            @chmod("iiinnnfffooo/pm/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/pm_skait/$nick.txt", "w");
            fwrite($fopy, "0");
            fclose($fopy);
            @chmod("iiinnnfffooo/pm_skait/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/technika/balistos/$nick.txt", "w");
            fwrite($fopy, "");
            fclose($fopy);
            @chmod("iiinnnfffooo/technika/balistos/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/technika/katapultos/$nick.txt", "w");
            fwrite($fopy, "0");
            fclose($fopy);
            @chmod("iiinnnfffooo/technika/katapultos/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/pilis/$nick.txt", "w");
            fwrite($fopy, "0");
            fclose($fopy);
            @chmod("iiinnnfffooo/pilis/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/pastatai/apsaugos_boksteliai/$nick.txt", "w");
            fwrite($fopy, "0");
            fclose($fopy);
            @chmod("iiinnnfffooo/pastatai/apsaugos_boksteliai/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/pastatai/tvoros_atkarpos/$nick.txt", "w");
            fwrite($fopy, "0");
            fclose($fopy);
            @chmod("iiinnnfffooo/pastatai/tvoros_atkarpos/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/pralaimejimai/$nick.txt", "w");
            fwrite($fopy, "0");
            fclose($fopy);
            @chmod("iiinnnfffooo/pralaimejimai/$nick.txt", 0777);

            $fopy = fopen("iiinnnfffooo/pergales/$nick.txt", "w");
            fwrite($fopy, "0");
            fclose($fopy);
            @chmod("iiinnnfffooo/pergales/$nick.txt", 0777);

            $fopy = fopen("bals/$nick.txt", "w");
            fwrite($fopy, "+");
            fclose($fopy);
            @chmod("bals/$nick.txt", 0777);
/*
$now_mm = date("m");
$now_dd = date("d");
$now_time = time();
$now_busi_vipu = $now_time+60*60*3;
if($now_mm=="08"){if($now_dd=="26"){
$fopy = @fopen("iiinnnfffooo/vips/$nick.txt", "w");
@fwrite($fopy, "$now_busi_vipu");
@fclose($fopy);
@chmod("iiinnnfffooo/vips/$nick.txt", 0777);}}
*/
}}

print '</card></wml>';

?>

Re: kas gaileti padek su php

kur cia klaida

Re: kas gaileti padek su php

nerodo kodas negail past net ieik kodel?

Re: kas gaileti padek su php

Niekas net nežiūrės. Sukonkretink klausimą, o ne nukopink krūvą kreivo kodo.

MongoDB Certified Developer
MongoDB Certified DBA
Zend Certified Engineer

Re: kas gaileti padek su php

o ka daryti? :D

Re: kas gaileti padek su php

nuimk visus "@", įjunk pilną klaidų/pranešimų rodymą (error_reporting) ir žiūrėk ką rašo klaidos pranešimai. Taip galėsi sužinot kur sintaksės/sisteminės klaidos.

Jeigu klaidų pranešimų nėra, vadinasi gali būti loginės klaidos, apie kurias niekas tau nepasakys, nežinodami kaip turi veikti sistema.

Taip pat, reikia pasimokyti naudoti bent jau funkcijom, kad nerašyti pasikartojančio kodo...

Re: kas gaileti padek su php

nu jau veikia admin viskas tik negail niekas uzreg i game :(

Re: kas gaileti padek su php

o gal reik sesijos_nr.txt

Re: kas gaileti padek su php

Gal šitas padės http://bit.ly/Mvaodo ?

Re: kas gaileti padek su php

Lukas wrote:

Gal šitas padės http://bit.ly/Mvaodo ?

Pradžiai tikrai neblogai būtų :)

MongoDB Certified Developer
MongoDB Certified DBA
Zend Certified Engineer

Re: kas gaileti padek su php

šiaip temos autoriui, pagalbos kreiptis reiktu į tą asmenį, iš kurio tą žaidimą pirko.

Re: kas gaileti padek su php

as suskurtau savo sc

Re: kas gaileti padek su php

Tada klausimas visiškai absurdiškas. Pastatei namą, bet nežinai kaip įeiti...

MongoDB Certified Developer
MongoDB Certified DBA
Zend Certified Engineer

Re: kas gaileti padek su php

jo

Re: kas gaileti padek su php

neveikia niekas,

Re: kas gaileti padek su php

if ($kodas != $kod){$klaida = "Kodas nesutampa!";} o cia neklaida

Re: kas gaileti padek su php

jau pats pasidariau.

Re: kas gaileti padek su php

Nu matai, forume pšneki monologu ir pačios bėdos išnyksta. Pasirodo tik noro tereikėjo taip?

Re: kas gaileti padek su php

:d