View file wapirate/A1/kingdom.php

File size: 22.79Kb
<?php





include("core.php");

include("config.php");





header("Content-type: text/html; charset=ISO-8859-1");

echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";

echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";

echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";





$addy = "wapirate.net";

$bcon = connectdb();

if (!$bcon)

{

  echo "<head>";

  echo "<title>Error!!!</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";

  echo "</head>";

  echo "<body>";  

    echo "<div><br/>Doh!<br/></div>";

    echo "<p align=\"center\">";

    echo "<img src=\"images/exit.gif\" alt=\"*\"/><br/>";

    echo "ERROR! cannot connect to database<br/><br/>";

    echo "This error usually happens when backing up the database, please be patient, The site will be up as soon as possible<br/><br/>";

    echo "You can temporary use our other <a href=\"http://wapirate.madpage.com/chat/index.php\">chatroom</a> while wapirate is offline<br/>";

    echo "<b>THANK YOU VERY MUCH</b>";

    echo "</p>";

    echo "<div>$addy</div>";

  echo "</body>";

  echo "</html>";

  exit();

}

$brws = explode(" ",$HTTP_USER_AGENT);

$ubr = $brws[0];

$uip = getip();

$action = $_GET["action"];

$sid = $_GET["sid"];

$page = $_GET["page"];

$who = $_GET["who"];

$wnick = getnick_uid($who);

$uid = getuid_sid($sid);

$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));

cleardata();

if(isipbanned($uip,$ubr))

    {

      if(!isshield(getuid_sid($sid)))

      {

  echo "<head>";

  echo "<title>Error!!!</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";

  echo "</head>";

  echo "<body>";   

         echo "<div><br/>Doh!<br/></div>";

      echo "<p align=\"center\">";

      echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";

      echo "This IP address is blocked<br/>";

      echo "<br/>";

      echo "However we grant a shield against IP-Ban for our best users, you can try to see if you are shielded by trying to login, if you keep coming to this page that means you are not shielded, so come back when the ip-ban period is over<br/><br/>";

      $banto = mysql_fetch_array(mysql_query("SELECT  timeto FROM ibwf_penalties WHERE  penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));

      //echo mysql_error();

      $remain =  $banto[0] - time();

      $rmsg = gettimemsg($remain);

      echo " IP: $rmsg<br/><br/>";

      

      echo "</p>";

      echo "<p>";

  echo "<form action=\"login.php\" method=\"get\">";

  echo "username:<br/> <input name=\"loguid\" format=\"*x\" size=\"8\" maxlength=\"30\"/><br/>";

  echo "password:<br/> <input type=\"password\" name=\"logpwd\" size=\"8\" maxlength=\"30\"/><br/>";

echo "<input type=\"submit\" value=\"login &#187;\"/>";

echo "</form>"; 

  echo "</p>";

  echo "<div>$addy</div>";

  echo "</body>";

  echo "</html>";

  exit();

      }

    }

if(($action != "") && ($action!="terms"))

{

    $uid = getuid_sid($sid);

    if((islogged($sid)==false)||($uid==0))

    {

   echo "<head>";

  echo "<title>Error!!!</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";

  echo "</head>";

  echo "<body>"; 

          echo "<div><br/>Doh!<br/></div>";

      echo "<p align=\"center\">";

      echo "You are not logged in<br/>";

      echo "Or Your session has been expired<br/><br/>";

      echo "<a href=\"index.php\">Login</a>";

      echo "</p>";

  echo "</body>";

  echo "</html>";

  exit();

    }

    

    

    

}

//echo isbanned($uid);

if(isbanned($uid))

    {

   echo "<head>";

  echo "<title>Error!!!</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";

  echo "</head>";

  echo "<body>"; 

    echo "<div><br/>Doh!<br/></div>";

      echo "<p align=\"center\">";

      echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";

      echo "You are <b>Banned</b><br/>";

      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));

	  $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));

	  

      $remain = $banto[0]- time();

      $rmsg = gettimemsg($remain);

      echo "Time to finish your penalty: $rmsg<br/><br/>";

	  echo "Ban Reason: $banres[0]";

      //echo "<a href=\"index.php\">Login</a>";

      echo "</p>";

    echo "<div>$addy</div>";

  echo "</body>";

  echo "</html>";

  exit();

    }

$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");



////////////////////////////////////////MAIN PAGE

if($action=="main")

{

addonline(getuid_sid($sid),"Playing Kingdom War","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

   echo "<div><br/>Kingdom War!<br/></div>";

echo "<p align=\"center\">";

echo "<br/>";

echo "Now lets see your power to get the power of the WAR !<br/>";

echo "</p>";

echo "<p>";

echo "<i>Choose your dungeon:</i>";

echo "<br/><br/>";

echo "<a href=\"kingdom.php?action=a&amp;sid=$sid\">Kirupa Island</a>";

echo "<br/>";

echo "<a href=\"kingdom.php?action=b&amp;sid=$sid\">Kiran Island</a>";

echo "<br/>";

echo "<a href=\"kingdom.php?action=c&amp;sid=$sid\">Fire Dungeon</a>";

echo "<br/><br/>";

echo "</p>";

echo "<p align=\"center\">";

echo "<a href=\"index.php?action=funm&amp;sid=$sid\">Fun Menu</a>";

echo "<br/>";

echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

  echo "</p>";

    echo "<div>$addy</div>";

  echo "</body>";

  exit();

}





else if($action=="a")

{

addonline(getuid_sid($sid),"Playing Kingdom War","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

   echo "<div><br/>Kingdom War!<br/></div>";

echo "<p align=\"center\">";

echo "<br/>";

echo "Now your character have a armored and magical tactics. Try kill your enemy and earn game plusess<br/>";

echo "</p>";

echo "<p align=\"left\">";





$num1 = rand(1, 5);



$uid = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_ses WHERE id='".$sid."'"));

$uid = $uid[0];

$usrid = $uid;

$time = time();





echo "<a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Axe</a> , <a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Bash</a> , <a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Thunder Bolt</a>";

echo "<br/>";



  $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

  $ugpl = $ugpl[0];

  echo "Game Plusses: <b>$ugpl</b><br/>";

  $power = rand(50,100);

  echo "Power: <b>$power</b> <br/>";

echo "<br/>";

  $damage = rand(0,50);

  $evil = Kirupa;

  $gold = rand(30,50);



if ($num1 == 1) {

$num = rand(1, 3);

echo "You hit $evil with damage $damage. You've Won $gold Game Plusses!";

$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

$ugpl = $ugpl[0];

$ugpl2 = $ugpl + "$gold";

mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num1 == 2) {

$num = rand(1, 3);

echo "You hit $evil with damage $damage,but he return 2 kick for you with damage $gold. You've been attacked and Lost $gold Game Plusses!";

$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

$ugpl = $ugpl[0];

$ugpl2 = $ugpl - "$gold";

mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num1 == 3) {

$num = rand(1, 3);

echo "You hit $evil damaging him $damage %. Then $evil return magic attack to you, damaging you $damage %. You draw! Minus 10 Game Plusses for that attack";

$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

$ugpl = $ugpl[0];

$ugpl2 = $ugpl - "10";

mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num1 == 4) {

$num = rand(1, 3);

echo "You hit $evil with a damage of $damage %. Then $evil return a scratch attack to you $gold %. You draw! Minus $gold Game Plusses for that attack";

$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

$ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "$gold";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num1 == 5) {

$num = rand(1, 3);

echo "You hit $evil damaging him 0%. Miss... Miss! Miss! Minus 10 Game Plusses for that attack";

$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

$ugpl = $ugpl[0];

$ugpl2 = $ugpl - "10";

mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}





echo "</p>";

echo "<p align=\"center\">";

echo "<a href=\"kingdom.php?action=main&amp;sid=$sid\">Kingdom WAR</a>";

echo "<br/>";

echo "<a href=\"index.php?action=funm&amp;sid=$sid\">Fun Menu</a>";

echo "<br/>";

echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

  echo "</p>";

    echo "<div>$addy</div>";

  echo "</body>";

  exit();

}





else if($action=="b")

{

addonline(getuid_sid($sid),"Playing Kingdom War","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

   echo "<div><br/>Kingdom War!<br/></div>";

echo "<p align=\"center\">";



echo "<br/>";

echo "Now your character have a armored and magical tactics. Try kill your enemy and earn game plusess<br/>";

echo "</p>";

echo "<p align=\"left\">";





$num2 = rand(1, 9);



$uid = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_ses WHERE id='".$sid."'"));

$uid = $uid[0];

$usrid = $uid;

$time = time();





echo "<a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Bow</a> , <a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Deviling</a> , <a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Fire Storm</a>";

echo "<br/>";



  $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

  $ugpl = $ugpl[0];

  echo "Game Plusses: <b>$ugpl</b><br/>";

  $power = rand(50,100);

  echo "Power: <b>$power</b><br/>";

echo "<br/>";

  $damage = rand(0,100);

  $evil2 = Darklord;

  $gold = rand(30,100);

  $magic = rand(60,93);

  $level = 2;

  $level2 = 3;

  $low = 1;

if ($num2 == 1) {

  $num = rand(1, 3);

  echo "You hit $evil2 with damage $damage. You've Won $gold Game Plusses!";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl + "$gold";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num2 == 2) {

  $num = rand(1, 3);

  echo "You hit $evil2 with damage $damage,but he return 2 body and $low high kick for you with damage $gold. You've been attacked and Lost $gold Game Plusses!";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "$gold";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num2 == 3) {

  $num = rand(1, 3);

    echo "You cast magic $magic % with a hit to $evil2 damaging him $damage %. Then $evil2 return magic attack to you, damaging you $damage %. You draw! Minus 10 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "10";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num2 == 4) {

  $num = rand(1, 3);

    echo "You hit $evil2 with a damage of $damage %. Then $evil2 return <b>dark spell attack</b> to you $gold %. You draw! Minus $gold Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "$gold";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num2 == 5) {

  $num = rand(1, 3);

    echo "You hit $evil2 damaging him 0%. Miss... Miss! Miss! Minus 10 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "10";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num2 == 6) {

  $num = rand(1, 3);

    echo "You hit $evil2 damaging him  100%. level up $level2. You are a GODLIKE! Plus 90 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl + "90";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num2 == 7) {

  $num = rand(1, 3);

    echo "You hit $evil2 damaging him 40%. Level up to $level You win 50 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl + "50";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num2 == 8) {

  $num = rand(1, 3);

    echo "You did not hit $evil2 . He jump faster than your attack! <b>Miss... Miss! Miss!</b> Minus 10 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "10";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num2 == 9) {

  $num = rand(1, 3);

    echo "You hit $evil2 $damage % damage, but he hit you 99 % damage. Minus 99 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "99";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}





echo "</p>";

echo "<p align=\"center\">";

echo "<a href=\"kingdom.php?action=main&amp;sid=$sid\">Kingdom WAR</a>";

echo "<br/>";

echo "<a href=\"index.php?action=funm&amp;sid=$sid\">Fun Menu</a>";

echo "<br/>";

echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

  echo "</p>";

    echo "<div>$addy</div>";

  echo "</body>";

  exit();

}





else if($action=="c")

{

addonline(getuid_sid($sid),"Playing Kingdom War","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

    echo "<div><br/>Kingdom War!<br/></div>";

echo "<p align=\"center\">";



echo "<br/>";

echo "Now your character have a armored and magical tactics. Try kill your enemy and earn game plusess<br/>";

echo "</p>";

echo "<p align=\"left\">";





$num3 = rand(1, 9);



$uid = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_ses WHERE id='".$sid."'"));

$uid = $uid[0];

$usrid = $uid;



$time = time();





echo "<a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Golden Sword</a> , <a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Double Bash</a> , <a href=\"kingdom.php?action=$action&amp;sid=$sid&amp;time=$time\">Meteor</a>";

echo "<br/>";



  $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

  $ugpl = $ugpl[0];

  echo "Game Plusses: <b>$ugpl</b><br/>";

  $power = rand(50,100);

  echo "Power: <b>$power</b><br/>";

echo "<br/>";

  $damage = rand(0,100);

  $evil3 = HeadDragon;

  $gold = rand(30,100);

  $magic = rand(60,93);

  $level = 2;

  $level2 = 3;

  $low = 1;

if ($num3 == 1) {

  $num = rand(1, 3);

  echo "You hit $evil3 with damage $damage. You've Won $gold Game Plusses!";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl + "$gold";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num3 == 2) {

  $num = rand(1, 3);

  echo "You hit $evil3 with damage $damage,but he return 2 kick for you with damage $magic . You've been attacked and Lost $gold Game Plusses!";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "$gold";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num3 == 3) {

  $num = rand(1, 3);

    echo "You cast magic $magic % with a hit to $evil3 damaging him $damage %. Then $evi3 return magic attack to you, damaging you $damage %. You draw! Minus 10 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "10";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num3 == 4) {

  $num = rand(1, 3);

    echo "You hit $evil3 with a damage of $damage %. Then $evil2 return <b>hold spell attack</b> to you $gold %. You draw! Minus $gold Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "$gold";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num3 == 5) {

  $num = rand(1, 3);

    echo "You hit $evil3 damaging him 0%. Miss... Miss! Miss! Minus 10 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "10";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num3 == 6) {

  $num = rand(1, 3);

    echo "You hit $evil3 damaging him  100%. You are a GODLIKE! Plus 98 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl + "98";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num3 == 7) {

  $num = rand(1, 3);

    echo "You hit $evil3 damaging him 70%. Level up to $level2 You win 50 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl + "50";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num3 == 8) {

  $num = rand(1, 3);

    echo "You did not hit $evil3 . He ran faster than your attack! <b>Miss... Miss! Miss!</b> Minus 10 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "10";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}

if ($num3 == 9) {

  $num = rand(1, 3);

    echo "You hit $evil3 $damage % damage, but he hit you 100 % damage. Minus 100 Game Plusses for that attack";

                        $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));

                        $ugpl = $ugpl[0];

                        $ugpl2 = $ugpl - "100";

                        mysql_query("UPDATE ibwf_users SET gplus='".$ugpl2."' WHERE id='".$uid."'");



echo "<br/>";

}



echo "</p>";

echo "<p align=\"center\">";

echo "<a href=\"kingdom.php?action=main&amp;sid=$sid\">Kingdom WAR</a>";

echo "<br/>";

echo "<a href=\"index.php?action=funm&amp;sid=$sid\">Fun Menu</a>";

echo "<br/>";

echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

  echo "</p>";

    echo "<div>$addy</div>";

  echo "</body>";

  exit();

}

else{

  addonline(getuid_sid($sid),"Lost in kingdom","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

    echo "<div><br/>Doh!<br/></div>";

  echo "<p align=\"center\">";

  echo "I don't know how did you get into here, but there's nothing to show<br/>";

echo "<a href=\"index.php?action=main&amp;sid=$sid\">Kingdom WAR</a>";

echo "<br/>";

  echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

    echo "<div>$addy</div>";

  echo "</body>";

  exit();

}

	echo "</html>";

?>