function getFileName($id) {
global $cat;
global $lang;
global $files;
if ($id == "tut_tp") { # tutorials
$lang = "
tp";
$rsite = "tutorials.php";
} elseif ($id == "tut_delphi") {
$lang = "delphi";
$rsite = "tutorials.php";
#----------------------------------------------
} elseif ($id == "inf_tut") { # tipps
$cat = "tuts";
$rsite = "info.php";
} elseif ($id == "inf_tipp") {
$cat = "tipps";
$rsite = "info.php";
#----------------------------------------------
} elseif ($id == "") { # others
$rsite = "home.php";
#----------------------------------------------
} elseif ($id == "tipp_tp") { # tipps
$lang = "
tp";
$rsite = "tipps/list.php";
} elseif ($id == "tipp_delphi") {
$lang = "delphi";
$rsite = "tipps/list.php";
#----------------------------------------------
} elseif ($x = array_search($id, $files)) { # list
$rsite = $files[$x];
#----------------------------------------------
} else { # errorhandling
$rsite = "../errors/404.php";
}
return $rsite;
}