include("functions.php");
include("../levels.php");
if ( isset( $_GET['level'] ) && !empty( $_GET['level'] ) && is_numeric( $_GET['level'] )){
$level = $_GET['level'];
}
else{
// echo("level value invalid
");
$level = 1;
}
$level_description = "level_" . $level . "_description"; //build function name, see http://php.net/manual/de/functions.variable-functions.php
// echo("Function name: \"$level_description\"
");
if(is_callable($level_description)) { // The function exists
$parameters_valid = true;
list($title, $description, $example, $criteria, $passcode) = $level_description();
}
else{
$parameters_valid = false;
$passcode = "";
}
?>
Programm-Code Editor |
Formatierter Programm-CodeLade Programm...
|