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); } //require files depends on the request //$action, $game, $ginfo, $team_id, $team_token is set if($action[0]=="user-panel") { require(__DIR__."/incl_user_panel.php"); exit; } if($action[0]=="team-info") { require(__DIR__."/incl_get_team_info.php"); exit; } if($action[0]=="challenge-list") { require(__DIR__."/incl_challenge_list.php"); exit; } if($action[0]=="attachment-dl") { require(__DIR__."/incl_attachment_dl.php"); exit; } if($action[0]=="help") { echo "notice: use comma(',') to split args\n"; echo "all available commands:\n"; echo " user-panel: display a interactive content for user\n"; echo " team-info: show your team info as json\n"; echo " challenge-list: list all challenges as json which are defined internally\n"; echo " attachment-dl : download attachment for challenge , or interact with it\n"; exit; } gen_error_400("unknown action '".$action[0]."'. use 'help' to view help"); exit;