Lavalair Hangman (with Plusses)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Lavalair Hangman (with Plusses)

    Code:
    <?php
    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\">";
    ?>
    //////////////////
    ///Hype Type/////
    //htportal.net//
    ///////////////
    <wml>
    <?php
    include("config.php");
    include("core.php");
    connectdb();
    $action = $_GET[&#39;action&#39;];
    $sid = $_GET[&#39;sid&#39;];
    $page = $_GET[&#39;page&#39;];
    $who = $_GET[&#39;who&#39;];
    $pmid = $_GET[&#39;pmid&#39;];
    if(islogged($sid)==false)
    {
        echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "You are not logged in
    ";
          echo "Or Your session has been expired
    
    ";
          echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
    }
    $uid = getuid_sid($sid);
    if(isbanned($uid))
        {
            echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>
    ";
          echo "You are [b]Banned[/b]
    ";
          $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39;"));
          $remain = $banto[0]- time();
          $rmsg = gettimemsg($remain);
          echo "Time to finish your penalty: $rmsg
    
    ";
          //echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
    
    
    else if($action=="main")
    {
    addonline(getuid_sid($sid),"Playing Hang Man :)","");
    echo "<card id=\"main\" title=\"Hang Man\">";
    echo "<p align=\"center\">";
    // words
    $list = "
    ht portal
    hypetype
    energy
    game over
    earth
    google
    anmial
    food
    i love you
    flowers
    monster
    globe
    heaven
    computer
    love
    hate
    rainbow
    sunshine
    master
    ugly
    wallpaper
    ";
    
    
    // letters to choose from
    $alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    $additional_letters = " -.,;!?%&amp;0123456789";
    $len_alpha = strlen($alpha);
    
    if(isset($_GET["n"])) $n=$_GET["n"];
    if(isset($_GET["letters"])) $letters=$_GET["letters"];
    if(!isset($letters)) $letters="";
    
    if(isset($PHP_SELF)) $self=$PHP_SELF;
    else $self=$_SERVER["PHP_SELF"];
    
    $links="";
    
    // Numar maxim de greseli
    $max=6;
    # error_reporting(0);
    $list = strtoupper($list);
    $words = explode("\n",$list);
    srand ((double)microtime()*1000000);
    $all_letters=$letters.$additional_letters;
    $wrong = 0;
    
    if (!isset($n)) { $n = rand(1,count($words)) - 1; }
    $word_line="";
    $word = trim($words[$n]);
    $done = 1;
    for ($x=0; $x < strlen($word); $x++)
    {
      if (strstr($all_letters, $word[$x]))
      {
        if ($word[$x]==" ") $word_line.="
    "; else $word_line.=$word[$x];
      } 
      else { $word_line.="_ "; $done = 0; }
    }
    
    if (!$done)
    {
    
      for ($c=0; $c<$len_alpha; $c++)
      {
        if (strstr($letters, $alpha[$c]))
        {
          if (strstr($words[$n], $alpha[$c])) {$links .= "[b]$alpha[$c][/b] "; }
          else { $links .= "$alpha[$c]"; $wrong++; }
        }
        else
        { $links .= "<a href=\"hang.php?action=main&amp;sid=$sid&amp;letters=$alpha[$c]$letters&amp;n=$n\">$alpha[$c]</a>"; }
      }
    
      if (strstr($word, " ")) $term="word"; else $term="word";
        echo "[size="1"]Guess The $term:[/size]
    ";
       echo $word_line;
      $nwrong=$wrong; if ($nwrong>6) $nwrong=6;
      echo "
    [size="1"]<img src=\"/sp_$nwrong.gif\" alt=\"*\"/>[/size]
    ";
    
        if ($wrong >= $max)
      {
        $n++;
        if ($n>(count($words)-1)) $n=0;
    
    ////////////////////////if lose u then u have lost some plusses :(
            $usts = mysql_fetch_array(mysql_query("SELECT gplus, plusses FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
            $gups = $usts[0]-10;
            $upl = $usts[1]-10;
            mysql_query("UPDATE ibwf_users SET gplus=&#39;".$gups."&#39;, plusses=&#39;".$upl."&#39; WHERE id=&#39;".$uid."&#39;");
    
       // echo "
    [size="1"]$word_line[/size]
    ";
        echo "
    [size="1"]LOSER![/size]
    ";
        if (strstr($word, " ")) $term="the"; else $term="the";
        echo "[size="1"]$term word is: [b]$word[/b]
    You lost [b]10 game plusses[/b] and [b]10 plusses[/b][/size]
    ";
        echo "[size="1"]<a href=\"hang.php?action=main&amp;sid=$sid\">Play Again?</a>[/size]";
      }
      else
      {
        echo "[size="1"]Choose a letter:[/size]
    ";
        echo $links;     
        echo "
    [size="1"]Chances Left: $wrong wrong of $max[/size]";
       // echo "
    [size="1"]Greseli ramase:".($max-$wrong)."[/size]
    ";
        
      }
    }
    else
    {
      $n++;    
      if ($n>(count($words)-1)) $n=0;
    
    ////////////////////////if win u get free plusses and game plusses :)
            $usts = mysql_fetch_array(mysql_query("SELECT gplus, plusses FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
            $gups = $usts[0]+10;
            $upl = $usts[1]+1;
            mysql_query("UPDATE ibwf_users SET gplus=&#39;".$gups."&#39;, plusses=&#39;".$upl."&#39; WHERE id=&#39;".$uid."&#39;");
      echo "The word is:";
      echo $word_line;
      $nick = getnick_sid($sid); 
      echo "
    [size="1"]CONGRATULATIONS!!!
    $nick you WIN!!!
    You get [b]10 game plusses[/b] and [b]1 extra plusses[/b][/size]
    ";
      echo "[size="1"]<a href=\"hang.php?action=main&amp;sid=$sid\">Play Again?</a>[/size]";
    }
    
    
    //echo "
    
    [size="1"]<a href=\"hangman.php?nick=$nick&amp;pass=$pass\">Choose another category</a>[/size]";
    //echo "
    [size="1"]<a href=\"index.php?nick=$nick&amp;pass=$pass\">Sistem index</a>[/size]";
    //echo "
    
    ";
    //echo "[size="1"]© <a href=\"index.php?nick=$nick&amp;pass=$pass\">HT Portal</a>[/size]
    ";
    
    
    echo "
    ---
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    }
    echo "</p>";
    echo "</card>";
    ?>
    </wml>

    #2
    was so easy to edit with plusses for users.

    Comment


      #3
      Owh! dats great! Thank hypetype!

      Comment


        #4
        Intresting... thnx !!!

        Comment


          #5
          good coding thanks
          http://img235.imageshack.us/my.php?i...sc00464af9.jpg



          http://matthewdowd.bebo.com

          Comment


            #6
            old news
            sigpiceeeeerrr....

            Comment


              #7
              it wont work how do i lnk to it
              http://img235.imageshack.us/my.php?i...sc00464af9.jpg



              http://matthewdowd.bebo.com

              Comment


                #8
                LoL ... link ?!
                Code:
                echo "<a href=\"hang.php?action=main&amp;sid=$sid\">HangMan</a>";

                Do u realy didnt now that ?? :DDD

                Comment


                  #9
                  yeah but dont work
                  http://img235.imageshack.us/my.php?i...sc00464af9.jpg



                  http://matthewdowd.bebo.com

                  Comment


                    #10
                    what ?? link or script ??

                    Comment


                      #11
                      that was like 2 min job 4 me lol heres all my lavalair script games i hav done

                      <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
                      header("Cache-Control: no-cache, must-revalidate");
                      header("Pragma: no-cache");
                      header(&#39;Content-type: application/vnd.wap.xhtml+xml&#39;);
                      echo "<?xml version=\"1.0\"?>";
                      echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
                      ?>
                      <html xmlns="http://www.w3.org/1999/xhtml">
                      <?php
                      include("config.php");
                      include("core.php");
                      $bcon = connectdb();

                      if (!$bcon)
                      {
                      echo "<head>";
                      echo "<title>Error!!!</title>";
                      echo "<head>";
                      echo "<body>";
                      echo "<p align=\"center\">";
                      echo "<img src=\"../images/notok.gif\" alt=\"!\"/>
                      ";
                      echo "Error! Cannot Connect To Database...

                      ";
                      echo "This error happens usually when backing up the database, please be patient...";
                      echo "</p>";
                      echo "</body>";
                      echo "</html>";
                      exit();
                      }

                      $action = $_GET["action"];
                      $sid = $_GET["sid"];
                      $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name=&#39;sitename&#39;"));
                      $sitename = $sitename[0];
                      $uid = getuid_sid($sid);
                      $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));

                      if((islogged($sid)==false)||($uid==0))
                      {
                      echo "<head>";
                      echo "<title>Error!!!</title>";
                      echo "</head>";
                      echo "<body>";
                      echo "<p align=\"center\">";
                      echo "You are not logged in
                      ";
                      echo "Or Your session has been expired

                      ";
                      echo "<a href=\"index.php\">Login</a>";
                      echo "</p>";
                      echo "</body>";
                      echo "</html>";
                      exit();
                      }
                      if(isbanned($uid))
                      {
                      echo "<head>";
                      echo "<title>Error!!!</title>";
                      echo "</head>";
                      echo "<body>";
                      echo "<p align=\"center\">";
                      echo "<img src=\"../images/notok.gif\" alt=\"x\"/>
                      ";
                      echo "You are Banned

                      ";
                      $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39; OR uid=&#39;".$uid."&#39; AND penalty=&#39;2&#39;"));
                      $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                      $remain = $banto[0]- time();
                      $rmsg = gettimemsg($remain);
                      echo "Time Left: $rmsg
                      ";
                      $nick = getnick_uid($banto[2]);
                      echo "By: $nick
                      ";
                      echo "Reason: $banto[1]";
                      //echo "<a href=\"index.php\">Login</a>";
                      echo "</p>";
                      echo "</body>";
                      echo "</html>";
                      exit();
                      }
                      if($action=="guessgm")
                      {
                      addonline(getuid_sid($sid),"Playing Gtn","");
                      echo "<head>";
                      echo "<title>Guess The Number</title>";
                      echo "</head>";
                      echo "<body>";
                      echo "<p align=\"center\">";
                      $gid = $_POST["gid"];
                      $un = $_POST["un"];

                      if($gid=="")
                      {
                      mysql_query("DELETE FROM ibwf_games WHERE uid=&#39;".$uid."&#39;");
                      mt_srand((double)microtime()*1000000);
                      $rn = mt_rand(1,100);
                      mysql_query("INSERT INTO ibwf_games SET uid=&#39;".$uid."&#39;, gvar1=&#39;8&#39;, gvar2=&#39;".$rn."&#39;");
                      $tries = 8;
                      $gameid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_games WHERE uid=&#39;".$uid."&#39;"));
                      $gid=$gameid[0];
                      }else{
                      $ginfo = mysql_fetch_array(mysql_query("SELECT gvar1,gvar2 FROM ibwf_games WHERE id=&#39;".$gid."&#39; AND uid=&#39;".$uid."&#39;"));
                      $tries = $ginfo[0]-1;
                      mysql_query("UPDATE ibwf_games SET gvar1=&#39;".$tries."&#39; WHERE id=&#39;".$gid."&#39;");
                      $rn = $ginfo[1];
                      }
                      if ($tries>0)
                      {
                      $gmsg = "Just try to guess the number before you have no more tries, the number is between 1-100

                      ";
                      echo $gmsg;
                      $tries = $tries-1;
                      $gpl = $tries*3;
                      echo "Tries:$tries, Plusses:$gpl

                      ";
                      if ($un==$rn){
                      $gpl = $gpl+3;
                      $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                      $ugpl = $gpl + $ugpl[0];
                      mysql_query("UPDATE ibwf_users SET gplus=&#39;".$ugpl."&#39; WHERE id=&#39;".$uid."&#39;");
                      echo "Congrats! the number was $rn, $gpl Plusses has been added to your Game Plusses, 1 <a accesskey=\"1\" href=\"games.php?action=guessgm&amp;sid=$sid\">New Game</a>

                      ";
                      }else{
                      if($un <$rn)
                      {
                      echo "Try bigger number than $un !

                      ";
                      }else{
                      echo "Try smaller number than $un !

                      ";
                      }
                      echo "<form action=\"games.php?action=guessgm&amp;sid=$sid\" method=\"post\">";
                      echo "Your Guess: <input type=\"text\" name=\"un\" style=\"-wap-input-format: &#39;*N&#39;\" size=\"3\" value=\"$un\"/>";
                      echo "<input type=\"hidden\" name=\"gid\" value=\"$gid\"/>";
                      echo "<input type=\"Submit\" name=\"try\" value=\"TRY\"></form>
                      ";
                      }


                      }else{
                      $gmsg = "GAME OVER, 1 <a accesskey=\"1\" href=\"games.php?action=guessgm&amp;sid=$sid\">New Game</a>

                      ";
                      echo $gmsg;
                      }
                      echo "

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

                      else if($action == "scramble")
                      {
                      addonline(getuid_sid($sid),"playing word scramble","");
                      echo "<head>";
                      echo "<title>Word Scramble</title>";
                      echo "</head>";
                      echo "<body>";
                      echo "<p align=\"center\">";
                      $answer = $_POST["answer"];
                      if (empty($_POST["answer"])) {

                      srand((float) microtime() * 10000000);
                      $input = array(
                      "dictionary",
                      "recognize",
                      "example",
                      "entertainment",
                      "experiment",
                      "appreciation",
                      "information",
                      "pronunciation",
                      "language",
                      "government",
                      "psychic",
                      "blueberry",
                      "selection",
                      "automatic",
                      "strawberry",
                      "bakery",
                      "shopping",
                      "eggplant",
                      "chicken",
                      "organic ",
                      "angel",
                      "season",
                      "market",
                      "information",
                      "complete",
                      "sunset",
                      "unique",
                      "customer"
                      );
                      $rand_keys = array_rand($input, 2);
                      $word = $input[$rand_keys[0]];
                      $Sword = str_shuffle($word);
                      echo "<p align=\"center\">$Sword</p>
                      <p align=\"center\">In the
                      text box below type the correct word that is scrambled above.</p>
                      <form method=\"POST\" action=\"games.php?action=scramble&amp;sid=$sid\">
                      <center><input type=\"text\" name=\"answer\" size=\"20\">
                      <input type=\"hidden\" name=\"correct\" value=\"$word\">
                      <input type=\"submit\" value=\"GO!\" name=\"B1\"></center>
                      </form>
                      <p align=\"center\">0 <a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
                      </body>";
                      }
                      else {
                      $answer = strtolower($answer);
                      if($answer == $correct){
                      $result = "Correct! $answer";
                      $uid = getuid_sid($sid);
                      $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                      $ugpl = "25" + $ugpl[0];
                      mysql_query("UPDATE ibwf_users SET gplus=&#39;".$ugpl."&#39; WHERE id=&#39;".$uid."&#39;");

                      echo "<p align=\"center\">$result
                      You Have Had 25 game Plusses Added For Winning.
                      </p>
                      <p align=\"center\"><a href=\"games.php?action=scramble&amp;sid=$sid\">Tr y Another Word?</a>

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


                      else { $result = "Sorry! The Correct Answer Was $correct.";
                      $uid = getuid_sid($sid);
                      $ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                      $ugpl = $ugpl[0] - "25";
                      mysql_query("UPDATE ibwf_users SET gplus=&#39;".$ugpl."&#39; WHERE id=&#39;".$uid."&#39;");

                      echo "<p align=\"center\">$result
                      You Have Had 25 game Plusses Deducted For Losing.
                      </p>
                      <p align=\"center\"><a href=\"games.php?action=scramble&amp;sid=$sid\">Tr y Another Word?</a>

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

                      else if($action == "hangman")
                      {
                      addonline(getuid_sid($sid),"Playing Hangman","");
                      echo "<head>";
                      echo "<title>Hangman</title>";
                      echo "</head>";
                      echo "<body>";
                      if ($cat==""){
                      echo "<p align=\"center\">
                      <img src=\"../images/hang_6.gif\" alt=\"Hangman\"/>

                      Select a category:
                      ";
                      echo "<a href=\"$PHP_SELF?action=hangman&amp;cat=anmls&amp; sid=$sid\">Animals</a>
                      ";
                      echo "<a href=\"$PHP_SELF?action=hangman&amp;cat=clrs&amp;s id=$sid\">Colours</a>
                      ";
                      echo "<a href=\"$PHP_SELF?action=hangman&amp;cat=comp&amp;s id=$sid\">Computers</a>
                      ";
                      echo "<a href=\"$PHP_SELF?action=hangman&amp;cat=frt&amp;si d=$sid\">Fruit</a>
                      ";
                      echo "<a href=\"$PHP_SELF?action=hangman&amp;cat=big&amp;si d=$sid\">Big Words</a>
                      ";
                      echo "<a href=\"$PHP_SELF?action=hangman&amp;cat=lotr&amp;s id=$sid\">Lord Of The Rings</a>
                      ";
                      echo "<a href=\"$PHP_SELF?action=hangman&amp;cat=mths&amp;s id=$sid\">Months</a>
                      ";
                      echo "<a href=\"$PHP_SELF?action=hangman&amp;cat=web&amp;si d=$sid\">Web / Wap coding</a>
                      ";

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

                      echo "</p></body></html>";
                      exit();
                      }
                      if ($cat==anmls){
                      $category="ANIMALS";
                      $list = "ANIMALS
                      BABOON
                      BEAR
                      BULL
                      CAMEL
                      CAT
                      COW
                      CROW
                      DOG
                      DONKEY
                      DUCKBILL PLATYPUS
                      EAGLE
                      ELEPHANT
                      FISH
                      FOX
                      GIRAFFE
                      GOAT
                      GOLDFISH
                      HAWK
                      HEDGEHOG
                      HORSE
                      KANGAROO
                      KITTEN
                      MOLE
                      MONKEY
                      MOUSE
                      MULE
                      OWL
                      PARROT
                      PIG
                      PINK ELEPHANT
                      POLAR BEAR
                      PORCUPINE
                      POSSUM
                      PUPPY
                      RABBIT
                      RACCOON
                      RAT
                      ROBIN
                      SEAL
                      SHARK
                      SKUNK
                      SQUIRREL
                      STOAT
                      WALRUS
                      WEASEL
                      WHALE
                      ZEBRA";}



                      if ($cat==clrs){
                      $category="COLOURS";
                      $list = "BLACK
                      BLUE
                      BROWN
                      BUBBLEGUM PINK
                      COLORS
                      CYAN
                      FUCHSIA
                      GOLD
                      GREEN
                      GREY
                      INDIGO
                      LAVENDER
                      LIME GREEN
                      MAROON
                      OLIVE
                      ORANGE
                      PERIWINKLE
                      PINK
                      PURPLE
                      RED
                      ROYAL BLUE
                      SCARLET
                      TEAL
                      TURQUOISE
                      VIOLET
                      WHITE
                      YELLOW"; }


                      if ($cat==comp){
                      $category="COMPUTERS";
                      $list = "ACCESS
                      ANTI-VIRUS SOFTWARE
                      BASIC
                      CD-ROM DRIVE
                      CHAT
                      COMPUTER
                      CPU
                      DATABASE
                      DOS
                      EMAIL
                      EXCEL
                      FIREWALL
                      FLOPPY DRIVE
                      FORUMS
                      FRONTPAGE
                      GAMES
                      HACKER
                      HARD DRIVE
                      HTML
                      ICQ
                      INTERNET
                      JUNK MAIL
                      KEYBOARD
                      LINUX
                      LOTUS
                      MICROSOFT
                      MONITOR
                      MOTHER BOARD
                      MOUSEPAD
                      OPERATING SYSTEM
                      PARALLEL PORT
                      PHP
                      PRINTER
                      PUBLISHING
                      RAM
                      SERIAL PORT
                      SOLITARE
                      SPEAKERS
                      TECHNOLOGY
                      UNIX
                      URL
                      VIRUS
                      VISUAL BASIC
                      WINDOWS
                      WORD
                      WORD PROCESSING
                      WORLD WIDE WEB
                      ZIP"; }


                      if ($cat==frt){
                      $category="FRUIT";
                      $list = "APPLE
                      BANANA
                      BLACKBERRY
                      BLUEBERRY
                      FRUIT
                      GRAPE
                      GRAPEFRUIT
                      KIWI
                      MANGO
                      ORANGE
                      PEACH
                      PEAR
                      RASBERRY
                      STRAWBERRY
                      TANGERINE
                      TOMATO
                      UGLY FRUIT"; }



                      if ($cat==big){
                      $category="BIG WORDS";
                      $list = "AUSTRALOPITHECINE
                      DEOXYRIBONUCLEIC ACID
                      LARGE WORDS
                      MITOCHONDRIA"; }

                      if ($cat==lotr){
                      $category="LORD OF THE RINGS";
                      $list = "AGORNATH
                      ARAGORN
                      ARWEN
                      BAG END
                      BALIN
                      BALROG
                      BARROW DOWNS
                      BARROW WRIGHT
                      BEREN
                      BILBO BAGGINS
                      BLACK RIDERS
                      BOROMIR
                      BREE
                      BUCKLAND
                      CELEBORN
                      DEAD MARSHES
                      DWARVES
                      EDORAS
                      ELENDIL
                      ELFSTONE
                      ELROND
                      ELVES
                      ENTS
                      EOWYN
                      FANGORN FOREST
                      FARAMIR
                      FRODO BAGGINS
                      GALADRIEL
                      GANDALF
                      GILGALAD
                      GLAMDRING
                      GLORFINDEL
                      GOLDBERRY
                      GOLLUM
                      GONDOR
                      HALDIR
                      HELMS DEEP
                      HOBBITON
                      HOBBITS
                      ISENGARD
                      ISILDUR
                      LEGOLAS
                      LEMBAS BREAD
                      LONELY MOUNTAIN
                      LONELY MOUNTIAN
                      LORD OF THE RINGS
                      LOTHLORIEN
                      LUTHIEN
                      MELKOR
                      MEN
                      MERRY
                      MIDDLE EARTH
                      MINAS MORGUL
                      MINAS TIRITH
                      MIRKWOOD
                      MITHRANDIR
                      MITHRIL
                      MORDOR
                      MORIA
                      MT. DOOM
                      MY PRECIOUSSS
                      NAZGUL
                      NUMENOR
                      OLD FOREST
                      OLD MAN WILLOW
                      ORCS
                      ORTHANC
                      PIPE WEED
                      PIPPIN
                      PLAINTIR
                      RANGERS
                      RINGWRAITHS
                      RIVENDELL
                      ROHAN
                      SAMWISE GAMGEE
                      SARUMAN
                      SAURON
                      SHADOWFAX
                      SHAGRAT
                      SHELOB
                      SHIRE
                      SILMARILLIAN
                      SMAUG
                      SMEAGOL
                      STEWARD OF GONDOR
                      STING
                      STRIDER
                      THE FELLOWSHIP OF THE RING
                      THE RETURN OF THE KING
                      THE RING
                      THE TWO TOWERS
                      THEODIN
                      TOM BOMBADIL
                      TREEBEARD
                      TROLLS
                      UNDYING LANDS
                      URUK-HAI
                      VALINOR
                      WARG RIDERS
                      WEATHERTOP
                      WIZARDS
                      WORMTONGUE";}


                      if ($cat==mths){
                      $category="MONTHS";
                      $list = "APRIL
                      AUGUST
                      DECEMBER
                      FEBRUARY
                      JANUARY
                      JULY
                      JUNE
                      MARCH
                      MAY
                      MONTHS
                      NOVEMBER
                      OCTOBER
                      SEPTEMBER"; }

                      if ($cat==web){
                      $category="WEB / WAP CODING";
                      $list = "JAVA BEANS
                      PHP SCRIPTS
                      SOURCE CODE
                      JAVASCRIPT GAMES
                      SSI IS SERVER SIDE INCLUDES
                      BILL GATES
                      COOKIES
                      HTTP AUTHENTICATION
                      ERROR HANDLING
                      MANIPULATING IMAGES
                      FILE UPLOADS
                      DATABASE / CONNECTION
                      APACHE SERVER
                      ZIP FILE
                      TAR COMPRESSION
                      FUNCTIONS
                      ENCRYPTION
                      MYSQL DATABASE
                      INITIALIZATION
                      FAQ - FREQUENTLY ASKED QUESTIONS
                      DEBUGGING
                      VERIFICATION
                      HTML VALIDATION
                      CASCADING STYLE SHEETS";}

                      # below ($alpha) is the alphabet letters to guess from.
                      # you can add international (non-English) letters, in any order, such as in:
                      # $alpha = "????????????????????????????ABCDEFGHIJKLMNOPQRSTU VWXYZ";
                      $alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

                      # below ($additional_letters) are extra characters given in words; &#39;?&#39; does not work
                      # these characters are automatically filled in if in the word/phrase to guess
                      $additional_letters = " -.,;!?%& 0123456789/";

                      #========= do not edit below here ================================================== ====

                      $sid = $_GET["sid"];
                      $uid = getuid_sid($sid);
                      $len_alpha = strlen($alpha);

                      if(isset($_GET["n"])) $n=$_GET["n"];
                      if(isset($_GET["letters"])) $letters=$_GET["letters"];
                      if(!isset($letters)) $letters="";

                      if(isset($PHP_SELF)) $self=$PHP_SELF;
                      else $self=$_SERVER["PHP_SELF"];

                      $links="";
                      $max=6;
                      # error_reporting(0);
                      $list = strtoupper($list);
                      $words = explode("\n",$list);
                      srand ((double)microtime()*1000000);
                      $all_letters=$letters.$additional_letters;
                      $wrong = 0;

                      echo "<p align=\"center\">";
                      if (!isset($n)) { $n = rand(1,count($words)) - 1; }
                      $word_line="";
                      $word = trim($words[$n]);
                      $done = 1;
                      for ($x=0; $x < strlen($word); $x++)
                      {
                      if (strstr($all_letters, $word[$x]))
                      {
                      if ($word[$x]==" ") $word_line.=" / "; else $word_line.=$word[$x];
                      }
                      else { $word_line.="_ "; $done = 0; }
                      }

                      if (!$done)
                      {

                      for ($c=0; $c<$len_alpha; $c++)
                      {
                      if (strstr($letters, $alpha[$c]))
                      {
                      if (strstr($words[$n], $alpha[$c])) {$links .= "$alpha[$c] "; }
                      else { $links .= " $alpha[$c] "; $wrong++; }
                      }
                      else
                      { $links .= " <a href=\"$self?action=hangman&amp;cat=$cat&amp;lette rs=$alpha[$c]$letters&amp;n=$n&amp;sid=$sid\">$alpha[$c]</a> "; }
                      }
                      $nwrong=$wrong; if ($nwrong>6) $nwrong=6;
                      echo "
                      <img src=\"../images/hang_$nwrong.gif\" alt=\"Wrong: $wrong out of $max\"/>
                      ";

                      if ($wrong >= $max)
                      {
                      $n++;
                      if ($n>(count($words)-1)) $n=0;
                      echo "

                      $word_line";
                      echo "

                      <big>SORRY, YOU ARE HANGED!!!</big>

                      ";
                      if (strstr($word, " ")) $term="answer"; else $term="word";
                      echo "The $term was \"$word\"

                      ";
                      $sqlfetch=mysql_query("SELECT gplus FROM ibwf_users WHERE id=&#39;".$uid."&#39;");
                      $sqlfet=mysql_fetch_array($sqlfetch);
                      $gplusnew=$sqlfet[0] - "25";
                      $sql="UPDATE ibwf_users SET gplus=&#39;".$gplusnew."&#39; WHERE id=&#39;".$uid."&#39;";
                      $res=mysql_query($sql);
                      echo "You Have Had 25 game Plusses Deducted For Losing.
                      ";
                      echo "<a href=\"$self?action=hangman&amp;cat=$cat&amp;n=$n& amp;sid=$sid\">Play again</a>
                      ";
                      echo "<a href=\"$self?action=hangman&amp;sid=$sid\">Change category</a>";
                      }else{
                      echo " Wrong Guesses Left: ".($max-$wrong)."

                      ";
                      echo "$word_line";
                      echo "

                      Choose a letter:
                      ";
                      echo "$links";
                      }
                      }else{
                      $n++; # get next word
                      if ($n>(count($words)-1)) $n=0;
                      echo "

                      \n$word_line";
                      echo "

                      Congratulations!!! You win!!!


                      ";
                      $sqlfetch=mysql_query("SELECT gplus FROM ibwf_users WHERE id=&#39;".$uid."&#39;");
                      $sqlfet=mysql_fetch_array($sqlfetch);
                      $gplusnew=$sqlfet[0] + "25";
                      $sql="UPDATE ibwf_users SET gplus=&#39;".$gplusnew."&#39; WHERE id=&#39;".$uid."&#39;";
                      $res=mysql_query($sql);
                      echo "You Have Had 25 game Plusses Added For Winning.
                      ";
                      echo "<a href=\"$self?action=hangman&amp;cat=$cat&amp;n=$n& amp;sid=$sid\">Play again</a>
                      ";
                      echo "<a href=\"$self?action=hangman&amp;sid=$sid\">Change category</a>";
                      }
                      echo "

                      <a href=\"index.php?action=main&amp;sid=$sid\">Back</a>";
                      echo "</p></body>";
                      }
                      else{
                      addonline(getuid_sid($sid),"Lost in Games lol","");
                      echo "<head>";
                      echo "<title>Error!!!</title>";
                      echo "</head>";
                      echo "<body>";
                      echo "<p align=\"center\">";
                      echo "I don&#39;t know how did you get into here, but there&#39;s nothing to show

                      ";
                      echo "0 <a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                      echo "</p></body>";
                      }
                      ?>
                      </html></div>

                      Comment


                        #12
                        what ?? link or script ??[/b]


                        echo "<a href=\"hang.php?action=main&amp;sid=$sid\">»</a>Hangman
                        ";

                        Comment


                          #13
                          else if($action=="main")
                          {
                          addonline(getuid_sid($sid),"Playing Hang Man ","");
                          echo "<card id=\"main\" title=\"Hang Man\">";
                          echo "<p align=\"center\">";
                          // words
                          $list = "
                          ht portal
                          hypetype
                          energy
                          game over
                          earth
                          google
                          anmial
                          food
                          i love you
                          flowers
                          monster
                          globe
                          heaven
                          computer
                          love
                          hate
                          rainbow
                          sunshine
                          master
                          ugly
                          wallpaper
                          ";


                          // letters to choose from
                          $alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
                          $additional_letters = " -.,;!?%&amp;0123456789";
                          $len_alpha = strlen($alpha);

                          if(isset($_GET["n"])) $n=$_GET["n"];
                          if(isset($_GET["letters"])) $letters=$_GET["letters"];
                          if(!isset($letters)) $letters="";

                          if(isset($PHP_SELF)) $self=$PHP_SELF;
                          else $self=$_SERVER["PHP_SELF"];

                          $links="";

                          // Numar maxim de greseli
                          $max=6;
                          # error_reporting(0);
                          $list = strtoupper($list);
                          $words = explode("\n",$list);
                          srand ((double)microtime()*1000000);
                          $all_letters=$letters.$additional_letters;
                          $wrong = 0;

                          if (!isset($n)) { $n = rand(1,count($words)) - 1; }
                          $word_line="";
                          $word = trim($words[$n]);
                          $done = 1;
                          for ($x=0; $x < strlen($word); $x++)
                          {
                          if (strstr($all_letters, $word[$x]))
                          {
                          if ($word[$x]==" ") $word_line.="
                          "; else $word_line.=$word[$x];
                          }
                          else { $word_line.="_ "; $done = 0; }
                          }

                          if (!$done)
                          {

                          for ($c=0; $c<$len_alpha; $c++)
                          {
                          if (strstr($letters, $alpha[$c]))
                          {
                          if (strstr($words[$n], $alpha[$c])) {$links .= "$alpha[$c] "; }
                          else { $links .= "$alpha[$c]"; $wrong++; }
                          }
                          else
                          { $links .= "<a href=\"hang.php?action=main&amp;sid=$sid&amp;lette rs=$alpha[$c]$letters&amp;n=$n\">$alpha[$c]</a>"; }
                          }

                          if (strstr($word, " ")) $term="word"; else $term="word";
                          echo "Guess The $term:
                          ";
                          echo $word_line;
                          $nwrong=$wrong; if ($nwrong>6) $nwrong=6;
                          echo "
                          <img src=\"/sp_$nwrong.gif\" alt=\"*\"/>
                          ";

                          if ($wrong >= $max)
                          {
                          $n++;
                          if ($n>(count($words)-1)) $n=0;

                          ////////////////////////if lose u then u have lost some plusses
                          $usts = mysql_fetch_array(mysql_query("SELECT gplus, plusses FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                          $gups = $usts[0]-10;
                          $upl = $usts[1]-10;
                          mysql_query("UPDATE ibwf_users SET gplus=&#39;".$gups."&#39;, plusses=&#39;".$upl."&#39; WHERE id=&#39;".$uid."&#39;");

                          // echo "
                          $word_line
                          ";
                          echo "
                          LOSER!
                          ";
                          if (strstr($word, " ")) $term="the"; else $term="the";
                          echo "$term word is: $word
                          You lost 10 game plusses and 10 plusses

                          ";
                          echo "<a href=\"hang.php?action=main&amp;sid=$sid\">Play Again?</a>";
                          }
                          else
                          {
                          echo "Choose a letter:
                          ";
                          echo $links;
                          echo "
                          Chances Left: $wrong wrong of $max";
                          // echo "
                          Greseli ramase:".($max-$wrong)."
                          ";

                          }
                          }
                          else
                          {
                          $n++;
                          if ($n>(count($words)-1)) $n=0;

                          ////////////////////////if win u get free plusses and game plusses
                          $usts = mysql_fetch_array(mysql_query("SELECT gplus, plusses FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
                          $gups = $usts[0]+10;
                          $upl = $usts[1]+1;
                          mysql_query("UPDATE ibwf_users SET gplus=&#39;".$gups."&#39;, plusses=&#39;".$upl."&#39; WHERE id=&#39;".$uid."&#39;");
                          echo "The word is:";
                          echo $word_line;
                          $nick = getnick_sid($sid);
                          echo "
                          CONGRATULATIONS!!!
                          $nick you WIN!!!
                          You get 10 game plusses and 1 extra plusses

                          ";
                          echo "<a href=\"hang.php?action=main&amp;sid=$sid\">Play Again?</a>";
                          }


                          //echo "

                          <a href=\"hangman.php?nick=$nick&amp;pass=$pass\">Cho ose another category</a>";
                          //echo "
                          <a href=\"index.php?nick=$nick&amp;pass=$pass\">Siste m index</a>";
                          //echo "

                          ";
                          //echo "© <a href=\"index.php?nick=$nick&amp;pass=$pass\">HT Portal</a>
                          ";


                          echo "
                          ---
                          <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
                          }
                          echo "</p>";
                          echo "</card>";
                          ?>
                          </wml>
                          -------------------------------------------------------
                          echo "
                          CONGRATULATIONS!!!
                          $nick you WIN!!!
                          You get 10 game plusses and 1 extra plusses

                          ";
                          HOW CAN I PREVENT TO NOT RECHARGE POINT BY REFERESH?BECAUSE IF I SET OPERA TO REFERSH AT 1sec I WILL GET LOTS POINTS AND THE SAME QUESTION IT FROM SCRAMBLE TO AND OTHER GAMES LIKE THAT?????
                          www.inbuzunar.mobi - Your mobile portal pocket

                          Comment


                            #14
                            i updated my hangman version it has tools now i can edit add and del categories as a tool can even turn the game on n off lol

                            Comment


                              #15
                              I need answer to kiss&#39;s question too!!! how to prevent increase of points by refreshing the success page???
                              someone help. please.......

                              Comment

                              Working...
                              X