Ashed
New Member
PHP:
<?php
if (!isset($_GET['p'])) {
header("Location: index.php?p=news");
exit;
}
else {
if (isset($_GET['s'])) {
if (!file_exists("templates/".$_GET['p']."/".$_GET['s'].".ash")) {
header("Location: index.php?p=404_error");
exit;
}
else {
include("templates/header.ash");
include("templates/".$_GET['p']."/".$_GET['s'].".ash");
include("templates/footer.ash");
}
}
else {
if (!file_exists("templates/".$_GET['p']."/index.ash")) {
header("Location: index.php?p=404_error");
exit;
}
else {
include("templates/header.ash");
include("templates/".$_GET['p']."/index.ash");
include("templates/footer.ash");
}
}
}
?>