diff --git a/incl_external_flag.php b/incl_external_flag.php index 07237aa..f076d19 100644 --- a/incl_external_flag.php +++ b/incl_external_flag.php @@ -47,12 +47,23 @@ if(!array_key_exists($tid, $tid2proj_l)) { $proj=$tid2proj_l[$tid]; +require(__DIR__."/phplib/libvar_gsec.php"); + +if(!array_key_exists($game, $gsecret_l)) { + gen_error_400("game '".$game."' is not found in config file."); + exit; +} + +$ginfo=$gsecret_l[$game]; +unset($gsecret_l); + /* $GLOBALS["game"]=$game; $GLOBALS["action"]=$action; $GLOBALS["cid"]=$cid; $GLOBALS["tid"]=$tid; $GLOBALS["proj"]=$proj; + $GLOBALS["ginfo"]=$ginfo; */ $pf=realpath(__DIR__."/".$proj["path"]."/handle_external_flag.php");