From: arun Date: Mon, 4 Jun 2007 12:51:02 +0000 (+0000) Subject: small fixes, typo, etc X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=223b9a88ef79e40f039f215e0a0ef51c1023d9b5;hp=65d3845752e76b9f1895cd9e2bf1a4fa6021f0af small fixes, typo, etc --- diff --git a/index.php b/index.php index 0bb04d4..8b91b69 100644 --- a/index.php +++ b/index.php @@ -62,6 +62,7 @@ if(myisset("new")) { echo "couldn't find one of the names, please start a new game"; output_footer(); + DB_close(); exit(); } @@ -80,6 +81,7 @@ if(myisset("new")) { echo "Error defining ruleset: $ruleset"; output_footer(); + DB_close(); exit(); }; @@ -172,6 +174,7 @@ else if(myisset("cancle","me")) echo "Can't find you in the database, please check the url.
\n"; echo "perhaps the game has been cancled, check by login in here."; output_footer(); + DB_close(); exit(); } @@ -217,6 +220,7 @@ else if(myisset("me")) echo "Can't find you in the database, please check the url.
\n"; echo "perhaps the game has been cancled, check by login in here."; output_footer(); + DB_close(); exit(); } @@ -531,6 +535,7 @@ else if(myisset("me")) echo "The game has been canceled because ".DB_get_name_by_userid($nines). " has five or more nines and nobody is playing solo.\n"; output_footer(); + DB_close(); exit(); } else if($poverty==1) @@ -900,6 +905,7 @@ else if(myisset("me")) echo "

Game $gameid has been cancled.

"; output_footer(); + DB_close(); exit(); } @@ -1539,6 +1545,7 @@ else if(myisset("me")) echo "error in testing the status"; } output_footer(); + DB_close(); exit(); } /* user status page */ @@ -1667,15 +1674,15 @@ else if(myisset("me")) echo "

and these are your games that are already done:
Game: \n"; + $output=array(); $result = mysql_query("SELECT hash,game_id from Hand WHERE user_id='$uid' AND status='gameover'" ); while( $r = mysql_fetch_array($result,MYSQL_NUM)) - echo "#".$r[1]." , "; - echo "

\n"; + $output[]= "#".$r[1]." "; + echo implode(", ",$output)."

\n"; $names = DB_get_all_names(); echo "

registered players:
\n"; - foreach ($names as $name) - echo "$name, \n"; + echo implode(", ",$names)."\n"; echo "

\n"; echo "

Want to start a new game? Visit this page.

"; @@ -1687,6 +1694,7 @@ else if(myisset("me")) } }; output_footer(); + DB_close(); exit(); } /* page for registration */ diff --git a/output.php b/output.php index 0871bcc..9cadcb0 100644 --- a/output.php +++ b/output.php @@ -64,8 +64,7 @@ function output_user_settings($email,$password) function output_register() { echo "IMPORTANT: passwords are going over the net as clear text, so pick an easy password. No need to pick anything complicated here ;)

"; - echo "TODO: convert timezone into a menu
\n"; - echo "TODO: figure out a way to handle passwords
\n"; + echo "TODO: figure out a better way to handle passwords
\n"; ?>
@@ -83,7 +82,12 @@ function output_register() - + + (If your timezone is not listed, just select whatever you want and email the admin your correct time zone.)