1&&strlen($action[1])>0) { require(__DIR__."/phplib/libvar_alias2cid.php"); $alias2cid=[]; if(array_key_exists($game, $alias2cid_l)) { $alias2cid=$alias2cid_l[$game]; } unset($alias2cid_l); if(array_key_exists($action[1], $alias2cid)) { $action[1]=$alias2cid[$action[1]]; } unset($alias2cid); } $cid=$action[1]; require(__DIR__."/phplib/libvar_cid2tid.php"); if(!array_key_exists($game, $cid2tid_l)) { gen_error_404("the game ".$game." does not exist"); exit; } $gtid_l=$cid2tid_l[$game]; unset($cid2tid_l); if(!array_key_exists($cid, $gtid_l)) { gen_error_404("the cid ".$cid." in game ".$game." does not exist"); exit; } $tid=$gtid_l[$cid]; require(__DIR__."/phplib/libvar_tid2proj.php"); if(!array_key_exists($tid, $tid2proj_l)) { gen_error_500("the tid ".$tid." does not exist"); exit; } $proj=$tid2proj_l[$tid]; /* $GLOBALS["game"]=$game; $GLOBALS["action"]=$action; $GLOBALS["cid"]=$cid; $GLOBALS["tid"]=$tid; $GLOBALS["proj"]=$proj; */ $pf=realpath(__DIR__."/".$proj["path"]."/handle_external_flag.php"); if(!is_readable($pf)) { gen_error_500("challange ".$proj["name"]." has been found, but the entry handle_external_flag.php does not exist."); exit; } require($pf); exit;