Truble Numbers

Started on the old forum in May 2009 · view the original in the archive · old links redirect here

No replies · 389 views · started 17 years ago · 1 min read

i0nutzxp Developer · 150 posts #1

Because my work whit valentinbr (he payed the host i made the script(add new options) and now he want to take the merits) now i share one of my game an simple game but is in RO because i dont have time| translate.google.ro | make a file xp_game.php CODE:

<?php
/*
made by ionutxp
*/

header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo("<?xml version=\"1.0\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>

<wml>
<?php
include("config.php");
include("core.php");
$bcon = connectdb();
if (!$bcon)
{
    echo "<card id=\"main\" title=\"$site (ERROR!)\">";
    echo "<p align=\"center\">";
    echo "<img src=\"http://coding-talk.com/images/exit.gif\" alt=\"*\"/><br/>";
    echo "Eroare, nu se poate conecta la baza d date!<br/><br/>";
    echo "Aceasta eroare apare de obicei cand care serverul isi va reveni in cateva secunde!Daca problema persista va rugam sa luati legatura cat mai curand posibil cu ionutxp<br/><br/>";
    echo "<b>Va multumim foarte mult pentru intelegere!</b>";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    exit();
}
$brws = explode(" / ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];

$uid = getuid_sid($sid);

cleardata();
if(islogged($sid)==false)
{
    echo "<card id=\"main\" title=\"$site\">";
      echo "<p align=\"center\">";
      echo "Nu esti autentificat<br/>";
      echo "Sau sesiunea ta a expirat<br/><br/>";
      echo "<a href=\"index.php\">Autentificare</a>";
      echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
}
if(isipbanned($uip,$ubr))
    {
      if(!isshield(getuid_sid($sid)))
      {
        echo "<card id=\"main\" title=\"$site\">";
      echo "<p align=\"center\">";
      echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/><br/>";
      echo "Acest IP este blocat!<br/>";
      echo "<br/>";
      echo "Acest browser a fost banat!Daca ai scutul actiat incearca sa te loghezi!<br/><br/>";
      $banto = mysql_fetch_array(mysql_query("SELECT  timeto FROM lib3rtymrc_penalties WHERE  penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
      //echo mysql_error();
      $remain =  $banto[0] - time();
      $rmsg = gettimemsg($remain);
      echo "Timp ramas pana la debanarea IP-ului: $rmsg<br/><br/>";
      
      echo "</p>";
      echo "<p>";
  echo "Numele: <input name=\"loguid\" format=\"*x\" maxlength=\"15\"/><br/>";
  echo "Parola: <input type=\"password\" name=\"logpwd\"  maxlength=\"30\"/><br/>";
  echo "<anchor>Autentificare<go href=\"login.php\" method=\"get\">";
  echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";
  echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";
  echo "</go></anchor>";
  echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
      }
    }

if ($action == "meniu"){
addonline(getuid_sid($sid),"Joaca ghiceste numerele!","");
echo "<card id=\"Ice game\" title=\"Ice game\">";
      echo "<p align=\"center\">";
      echo "<small>";
      $idmew = getuid_sid($sid);
      echo "".nume_id($idmew,$sid)." joca numerele buclucase!<br/><br/>";
	$pluspari = getplusses(getuid_sid($sid));
	if ($pluspari < 250)
	{
		echo "<b>Nu ai 250 de plusuri pentru a putea participa la joc!</b><br/>";
	}
	else{
	echo "Alege trei numere!<br/>";
echo "<input name=\"nr1\" maxlength=\"2\" size=\"2\"/> - ";
echo "<input name=\"nr2\" maxlength=\"2\" size=\"2\"/> - ";
echo "<input name=\"nr3\" maxlength=\"2\" size=\"2\"/><br/>";
echo "Da cat pariezi pe norocul tau?<br/>";
echo "<input name=\"pariu\" maxlength=\"4\" size=\"4\"/><br/>";
echo "<anchor>Joaca<go href=\"xp_game.php?action=joaca&sid=$sid\" method=\"post\">";
  echo "<postfield name=\"nr1\" value=\"$(nr1)\"/>";
  echo "<postfield name=\"nr2\" value=\"$(nr2)\"/>";
  echo "<postfield name=\"nr3\" value=\"$(nr3)\"/>";
  echo "<postfield name=\"pariu\" value=\"$(pariu)\"/>";
  echo "</go></anchor><br/>";

	}
	  echo "</small></p>";
	  echo "<p align=\"center\">";
	echo "<small>";
	echo "<a href=\"xp_game.php?action=info&sid=$sid\">Informatii Joc</a><br/><br/>";
	echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Acasa</a><br/>";
echo "<br/><br/> Facut in totalitate de <b>IonutXp</b>";
echo "</small></p>";
    echo "</card>";
    
}else if($action=="joaca")
{
    addonline(getuid_sid($sid),"Joaca Numerele Bucuclase","");
    echo "<card id=\"main\" title=\"Ma joc\">";
  echo "<p align=\"center\"><small>";
  $nr1 = $_POST["nr1"];
$nr3 = $_POST["nr2"];
$nr3 = $_POST["nr3"];
$pariu = $_POST["pariu"];

if((empty($nr1) OR (empty($nr2)) OR (empty($nr3)) OR (empty($pariu))) OR(($pariu=="0") OR ($nr1=="0") OR ($nr2=="0") OR ($nr3=="0"))){
echo "Toate campurile sunt obligatorii! Sau nu introdu' valori nule!<br/>";
echo "<a href=\"xp_game.php?action=meniu&sid=$sid\">Inapoi</a><br/><br/>";
}else{

 $num1 = rand(1, 10);
$num2 = rand(1, 10);
$num3 = rand(1, 10);
echo "Numerele castigatoare: ";
echo "<b>[$num1][$num2][$num3]</b><br/>";
if($nr1 == $num1){
$unu = "<b>$nr1</b>";
}else{
$unu = "$nr1";
} 
if($nr2 == $num2){
$doi = "<b>$nr2</b>";
}else{
$doi = "$nr2";
}if($nr3 == $num3){
$trei = "<b>$nr3</b>";
}else{
$trei = "$nr3";
}
echo "Numerele mele: [$unu][$doi][$trei]<br/><br/>";
if($nr1 == $num1 && ($nr2 == $num2) && ($nr3== $num3)){
echo "<b>Felicitari!</b> Ai ghicit toate numerele!<br/><br/>";
$idmew = getuid_sid($sid);
	$plusuri = mysql_fetch_array(mysql_query("SELECT plusses FROM lib3rtymrc_users WHERE id='".$idmew."'"));
	$pariu2 = $pariu * 2;
	$pariu3 = $pariu2 + $plusuri[0];
	$res = mysql_query("UPDATE lib3rtymrc_users SET plusses='".$pariu3."' WHERE id='".$idmew."'");
	echo "Ai castigat <b><u>$pariu3</u></b>+<br/><br/>";
}else if(($nr1 == $num1 && ($nr2 == $num2) && ($nr3 !== $num3)) OR ($nr1 == $num1 && ($nr2 !== $num2) && ($nr3== $num3)) OR ($nr1 !== $num1 && ($nr2 == $num2) && ($nr3== $num3))){
echo "<b>Felicitari!</b> Ai ghicit 2 numere!<br/><br/>";
$idmew = getuid_sid($sid);
	$plusuri = mysql_fetch_array(mysql_query("SELECT plusses FROM lib3rtymrc_users WHERE id='".$idmew."'"));
	$pariu2 = $pariu + 300;
	$pariu3 = $pariu2 + $plusuri[0];
	$res = mysql_query("UPDATE lib3rtymrc_users SET plusses='".$pariu3."' WHERE id='".$idmew."'");
	echo "Ai castigat <b><u>$pariu2</u></b>+<br/><br/>";
}else if(($nr1 == $num1 && ($nr2 !== $num2) && ($nr3 !== $num3)) OR ($nr1 !== $num1 && ($nr2 !== $num2) && ($nr3== $num3)) OR ($nr1 !== $num1 && ($nr2 == $num2) && ($nr3 !== $num3))){
echo "<b>Felicitari!</b> Ai ghicit un numar!<br/><br/>";
$idmew = getuid_sid($sid);
	$plusuri = mysql_fetch_array(mysql_query("SELECT plusses FROM lib3rtymrc_users WHERE id='".$idmew."'"));
	$pariu2 = $pariu + 200;
	$pariu3 = $pariu2 + $plusuri[0];
	$res = mysql_query("UPDATE lib3rtymrc_users SET plusses='".$pariu3."' WHERE id='".$idmew."'");
	echo "Ai castigat <b><u>$pariu2</u></b>+<br/><br/>";
}else if($nr1 !== $num1 && ($nr2 !== $num2) && ($nr3 !== $num3)){
echo "<b>Ahh!</b> Ai pierdut!<br/><br/>";
$idmew = getuid_sid($sid);
	$plusuri = mysql_fetch_array(mysql_query("SELECT plusses FROM lib3rtymrc_users WHERE id='".$idmew."'"));
	$pariu3 = $plusuri[0] - $pariu;
	$res = mysql_query("UPDATE lib3rtymrc_users SET plusses='".$pariu3."' WHERE id='".$idmew."'");
	echo "Ai pierdut <b><u>$pariu</u></b>+<br/><br/>";
}

echo "<a href=\"xp_game.php?action=meniu&sid=$sid\">Joaca Iar</a><br/>";
echo "<a href=\"xp_game.php?action=info&sid=$sid\">Informatii Joc</a><br/><br/>";

}
  echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Acasa</a>";
echo "</small>";
  echo "</p></card>";
}if($action == "info"){
addonline(getuid_sid($sid),"Info Xp Joc","");
echo "<card id=\"Info Xp Joc\" title=\"Info Xp Joc\">";
      echo "<p align=\"center\">";
      echo "<small>";
 echo "Informatii<br/>";
 echo "</small></p>";
 echo "<p align=\"left\"><small>";
 echo "<img src=\"http://coding-talk.com/images/bill.gif\" alt=\"*\"/>Premii:<br/>
 *3 numere -> <b>suma pariata +500</b><br/>
 *2 numere -> <b>suma pariata + 300</b><br/>
 *2 numere -> <b>suma pariata + 200</b><br/>
 
 ";
 echo "<img src=\"http://coding-talk.com/images/bill.gif\" alt=\"*\"/>Restrictii:<br/>
 *Nu se introduc valori nule!<br/>
 ";
 echo "</small></p>";
 echo "<p align=\"center\"><small>";
 echo "<a href=\"xp_game.php?action=meniu&sid=$sid\">Meniu Joc</a><br/>";
 echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Acasa</a>";
echo "</small></p>";
    echo "</card>";
}

?>
</wml>

usage : xp_game.php?action=meniu&sid=$sid

<?php unlink('World/Europe/Romania.country'); ?>

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close