X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fcancelgame.php;h=43d32740c93014bded9fed6ef61a3d1626d906e6;hp=fba950ee7a20934306626f44599835ae063ec3e1;hb=12a7da9216b33c12ecc7939be1f6e8a48a273b00;hpb=924f395a39eeccbcd54d540613e440cbedd6ba3d diff --git a/include/cancelgame.php b/include/cancelgame.php index fba950e..43d3274 100644 --- a/include/cancelgame.php +++ b/include/cancelgame.php @@ -10,9 +10,7 @@ output_status(); if(!myisset("me")) { echo "Hmm, you really shouldn't mess with the urls.
\n"; - output_footer(); - DB_close(); - exit(); + return; } $me = $_REQUEST["me"]; @@ -23,9 +21,7 @@ if(!$myid) { echo "Can't find you in the database, please check the url.
\n"; echo "perhaps the game has been canceled, check by login in here."; - output_footer(); - DB_close(); - exit(); + return; } DB_update_user_timestamp($myid); @@ -35,8 +31,7 @@ $gameid = DB_get_gameid_by_hash($me); $myname = DB_get_name('hash',$me); /* check if game really is old enough to be canceled */ -$result = mysql_query("SELECT mod_date from Game WHERE id='$gameid' " ); -$r = mysql_fetch_array($result,MYSQL_NUM); +$r = DB_query_array("SELECT mod_date from Game WHERE id='$gameid' " ); if(time()-strtotime($r[0]) > 60*60*24*30) /* = 1 month */ { $message = "Hello, \n\n".