----
<?php
/* my simple script control structures.
i'm also use this script to build a web
because this script can reduce any error,
if there is user input wrong link. Thank you*/
$link=$_GET[link];
?>
<?php
if (!$link) {
?>
<?php include('module/home.php'); ?>
<?php
}
else if ($link==$link) {
?>
<?php
$file = 'module/'.$link.'.php';
if (file_exists($file)) { // check file exists
include('module/'.$link.'.php');
}
else {
echo not_found();
}
?>
<?php
}
else {
?>
<?php echo not_found(); ?>
<?php
}
?>