#!/usr/bin/perl # You may need to change the above line to #!/usr/local/bin/perl # Do not edit this file in Windows!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # this file MUST be saved in a UNIX file format!!!!!!!!!!!!!!!! ############################################################### # Hangman 1.3.2 # By J.R. Greer jrg@albedo.net # ftp://ftp.albedo.net/pub/games/html/ # http://www.albedo.net/pub/cgi-games.html # # game based on code by Nik Swoboda nswoboda@cs.indiana.edu # http://blackcat.brynmawr.edu/~nswoboda/prog-html.html # # cgi_receive routine loosely based on code developed at the # National Center for Supercomputing Applications (NCSA) at # the University of Illinois at Urbana-Champaign. # # (c) 1997,1998 all rights reserved # # The program is placed under the GNU Public License (GPL) # You may copy freely or modify the code in anyway as long # as the above information stays intact. # ################################################################# # Configuration # The Directory where the .gif files are ie: /game/hangman/image/ $GIF_DIR = "/games/hangman/"; # The cgi-bin dir and the name of the cgi ie: /cgi-bin/hangman.pl $CGI_BIN = "/games/hangman/hangman.cgi"; # the URL to go back to leave the game ie: http://www.albedo.net/ $HOMEP = "http://www.joehollywood.com/"; # The location of the word file (FULL PATH!) $DATAFILE = "/home/virtual/site9/fst/home/joehollywood/mainwebsite_html/games/hangman/hangman.words"; # If the Clue stays on the screen $CLUE=1; $bgcolour="white"; $textcolour="black"; $linkcolour="blue"; $vlinkcolour="blue"; $alinkcolour="black"; # use background $BG=0; $BGGIF="/games/hangman/bg.gif"; ##################################################################### # The following options require write permission for the html server # You must use FULL PATH NAMES, # Write anticheat file # this writes the IP and guess number of the user to prevent cheating #$wac=1; $wacfile="/home/virtual/site9/fst/home/joehollywood/mainwebsite_html/games/hangman"; $ctlfile="/home/virtual/site9/fst/home/joehollywood/mainwebsite_html/games/hangman"; # # Turn on scoreing $score=1; # # top ten players list; (not working) $ttpl="/home/virtual/site9/fst/home/joehollywood/mainwebsite_html/games/hangman/ttpl.html"; ################################################################## ################################################################### # Do not edit below this line # (Well unless you know what You are doing :) ################################################################### $VER="1.3.2"; ### &cgi_receive; if ($FINPUT{'word'}) { &p_head; $type = $FINPUT{'clue'}; ### un-encrypt word $FINPUT{'word'} =~ y/a-s,t,u,v,w,x,y,z/h-z,b,a,f,e,d,c,g/; # $FINPUT{'word'} =~ y/a,b,c,d,e,f,g,h-z/u,t,y,x,w,v,z,a-s/; $ctlnum=$FINPUT{'control'}; $score=$FINPUT{'score'}; $gn=$FINPUT{'gn'}; if ($wac == 1){ &read_wac; } if ($FINPUT{'done'} eq 'done') ### guessed the word { if ($FINPUT{'word'} eq $FINPUT{'new'}) ### get it right? { print "