Code Correction

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

    Code Correction

    I am posting here 2 wap games(1.Word Scramble n 2.Hangman). I have downloaded these from our script zone. But these game aren't working. These are here to be bugged out. Our tiger coders let's try to find the bugs and post the correct code...
    Thanks.

    1. Word Scramble:
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    else if($action == "scramble")
    {
    addonline(getuid_sid($sid),"Playing Word Scramble","");
    echo "<card id=\"main\" title=\"Word Scramble\">";
    $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>
    <p align=\"center\"><input type=\"text\" name=\"answ\" size=\"20\"/>
    <anchor> GO!<go href=\"games.php?action=scramble&amp;sid=$sid\" method=\"post\">
    <postfield name=\"answer\" value=\"$(answ)\"/>
    <postfield name=\"correct\" value=\"$word\"/></go></anchor></p>
    <p align=\"center\"><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
    </card>";
    }
    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>

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


    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>

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


    2.Hangman:
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action == "hangman")
    {
    addonline(getuid_sid($sid),"Playing Hangman","");
    echo "<card id=\"main\" title=\"Hangman\">";
    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></card></wml>";
    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></card>";
    }

    else
    {
    addonline(getuid_sid($sid),"Lost in Games lol","");
    echo "<card id=\"main\" title=\"Games(error)\">";
    echo "<p align=\"center\">";
    echo "I don&#39;t know how did you get into here, but there&#39;s nothing to show

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

    #2
    <div class='quotetop'>QUOTE (anderson @ Jan 29 2009, 03:24 PM) <{POST_SNAPBACK}></div>
    I am posting here 2 wap games(1.Word Scramble n 2.Hangman). I have downloaded these from our script zone. But these game aren&#39;t working. These are here to be bugged out. Our tiger coders let&#39;s try to find the bugs and post the correct code...
    Thanks.

    1. Word Scramble:
    <div class='codetop'>CODE
    <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    else if($action == "scramble")
    {
    addonline(getuid_sid($sid),"Playing Word Scramble","");
    echo "<card id=\"main\" title=\"Word Scramble\">";
    $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>
    <p align=\"center\"><input type=\"text\" name=\"answ\" size=\"20\"/>
    <anchor> GO!<go href=\"games.php?action=scramble&amp;sid=$sid\" method=\"post\">
    <postfield name=\"answer\" value=\"$(answ)\"/>
    <postfield name=\"correct\" value=\"$word\"/></go></anchor></p>
    <p align=\"center\"><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
    </card>";
    }
    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>

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


    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>

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


    2.Hangman:
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action == "hangman")
    {
    addonline(getuid_sid($sid),"Playing Hangman","");
    echo "<card id=\"main\" title=\"Hangman\">";
    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></card></wml>";
    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></card>";
    }

    else
    {
    addonline(getuid_sid($sid),"Lost in Games lol","");
    echo "<card id=\"main\" title=\"Games(error)\">";
    echo "<p align=\"center\">";
    echo "I don&#39;t know how did you get into here, but there&#39;s nothing to show

    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p></card>";
    }
    </div>[/b][/quote]
    try this hangman[attachment=1894:hagman.php]
    Attached Files

    Comment


      #3
      register globals or add
      things like
      $correct = $_POST["correct"];
      $cat = $_GET["cat"];
      also if you are using php 4 srand() will not work

      Comment


        #4
        <div class='quotetop'>QUOTE (something else @ Jan 29 2009, 07:35 PM) <{POST_SNAPBACK}></div>
        register globals or add
        things like
        $correct = $_POST["correct"];
        $cat = $_GET["cat"];
        also if you are using php 4 srand() will not work[/b]

        Thanks something else but it is still not working. ;)
        Wait...
        sigpic

        Comment


          #5
          <div class='quotetop'>QUOTE (valentin2br @ Jan 29 2009, 04:18 PM) <{POST_SNAPBACK}></div>
          try this hangman[attachment=1894:hagman.php][/b]

          I will test if your script works or not. Hey try for word scramble. I can&#39;t fix it still. It may be a enjoable game for wap users. Thanks @ valentin
          Wait...
          sigpic

          Comment


            #6
            <div class='quotetop'>QUOTE (anderson @ Jan 29 2009, 03:24 PM) <{POST_SNAPBACK}></div>
            I am posting here 2 wap games(1.Word Scramble n 2.Hangman). I have downloaded these from our script zone. But these game aren&#39;t working. These are here to be bugged out. Our tiger coders let&#39;s try to find the bugs and post the correct code...
            Thanks.

            1. Word Scramble:
            <div class='codetop'>CODE
            <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
            else if($action == "scramble")
            {
            addonline(getuid_sid($sid),"Playing Word Scramble","");
            echo "<card id=\"main\" title=\"Word Scramble\">";
            $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>
            <p align=\"center\"><input type=\"text\" name=\"answ\" size=\"20\"/>
            <anchor> GO!<go href=\"games.php?action=scramble&amp;sid=$sid\" method=\"post\">
            <postfield name=\"answer\" value=\"$(answ)\"/>
            <postfield name=\"correct\" value=\"$word\"/></go></anchor></p>
            <p align=\"center\"><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
            </card>";
            }
            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>

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


            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>

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


            2.Hangman:
            <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action == "hangman")
            {
            addonline(getuid_sid($sid),"Playing Hangman","");
            echo "<card id=\"main\" title=\"Hangman\">";
            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></card></wml>";
            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></card>";
            }

            else
            {
            addonline(getuid_sid($sid),"Lost in Games lol","");
            echo "<card id=\"main\" title=\"Games(error)\">";
            echo "<p align=\"center\">";
            echo "I don&#39;t know how did you get into here, but there&#39;s nothing to show

            ";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
            echo "</p></card>";
            }
            </div>[/b][/quote]
            In both games you can cheat very easy by refreshing the page ;)
            www.inbuzunar.mobi - Your mobile portal pocket

            Comment


              #7
              thats true

              WapCHAT Forum Currenltly changing over to xhtml

              My Dowloads Site

              Comment


                #8
                Hey anyone plz try to fix that game scripts. @ all
                Wait...
                sigpic

                Comment

                Working...
                X