X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fcancelgame.php;h=5b855347bab0794f65e220de04579e9e214fef58;hp=9f86142d66c0ec9b99227afd0e1fba70610fc57e;hb=880dfb2e715a3770de56fb525f5c90d28a6ccb4c;hpb=09515348107d9aab7823a12d31b082a2ebb75555 diff --git a/include/cancelgame.php b/include/cancelgame.php index 9f86142..5b85534 100644 --- a/include/cancelgame.php +++ b/include/cancelgame.php @@ -7,6 +7,14 @@ if(!isset($HOST)) output_status(); +if(!myisset("me")) + { + echo "Hmm, you really shouldn't mess with the urls.
\n"; + output_footer(); + DB_close(); + exit(); + } + $me = $_REQUEST["me"]; /* test for valid ID */ @@ -27,8 +35,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".