X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=index.php;h=58afe8d95136fe8cb476ab51238214e9e3c3072c;hp=db219d1da73ebbd019b02fa86f87be0dd975f2d9;hb=97dc3b828845ca92c4eab2b0df38afdbc167b423;hpb=a85c98f05cdf22065914272eb21e97cb8a344036
diff --git a/index.php b/index.php
index db219d1..58afe8d 100644
--- a/index.php
+++ b/index.php
@@ -49,6 +49,7 @@ if(myisset("new"))
if($EmailA=="" || $EmailB=="" || $EmailC=="" || $EmailD=="")
{
echo "couldn't find one of the names, please start a new game";
+ output_footer();
exit();
}
@@ -66,6 +67,7 @@ if(myisset("new"))
if($ruleset <0)
{
echo "Error defining ruleset: $ruleset";
+ output_footer();
exit();
};
@@ -157,6 +159,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();
exit();
}
@@ -203,6 +206,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();
exit();
}
@@ -214,19 +218,33 @@ else if(myisset("me"))
$mystatus = DB_get_status_by_hash($me);
$mypos = DB_get_pos_by_hash($me);
- /* display the game number */
- echo "
$name | ".date("Y-m-d H:i:s")." |
these are the games you are playing in:
\n";
- $result = mysql_query("SELECT Hand.hash,Hand.game_id,Game.mod_date from Hand".
- " LEFT JOIN Game On Hand.game_id=Game.id".
- " WHERE Hand.user_id='$uid' AND Game.status<>'gameover'" );
- while( $r = mysql_fetch_array($result,MYSQL_NUM))
+ if($ok)
{
- echo "game #".$r[1]." ";
- if(time()-strtotime($r[2]) > 60*60*24*30)
- echo " The game has been running for over a month.".
- " Do you want to cancel it? yes".
- " (clicking here is final and can't be restored)";
- echo "
";
+ echo "Hmm, you forgot your passwort...nothing I can do at the moment:( ";
+ echo " you need to email Arun for now... in the future it will be all automated and an ";
+ echo "email with a new password will go to $email.";
}
- echo "
and these are your games that are already done:
Game: \n";
- $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 "
registered players:
\n";
- foreach ($names as $name)
- echo "$name, \n";
- echo "
Want to start a new game? Visit this page.
"; - } - else - { - echo "sorry email and password don't matchthese are the games you are playing in:
\n";
+ $result = mysql_query("SELECT Hand.hash,Hand.game_id,Game.mod_date from Hand".
+ " LEFT JOIN Game On Hand.game_id=Game.id".
+ " WHERE Hand.user_id='$uid' AND Game.status<>'gameover'" );
+ while( $r = mysql_fetch_array($result,MYSQL_NUM))
+ {
+ echo "game #".$r[1]." ";
+ if(time()-strtotime($r[2]) > 60*60*24*30)
+ echo " The game has been running for over a month.".
+ " Do you want to cancel it? yes".
+ " (clicking here is final and can't be restored)";
+ echo "
";
+ }
+ echo "
and these are your games that are already done:
Game: \n";
+ $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 "
registered players:
\n";
+ foreach ($names as $name)
+ echo "$name, \n";
+ echo "
Want to start a new game? Visit this page.
"; + } + else + { + echo "sorry email and password don't match