Пример #1
0
} elseif ($url_array[0] == "home") {
    include 'Model/template.php';
} elseif ($url_array[0] == MENU1) {
    $_SESSION['url'] = MENU1;
    include 'Model/Pages/content.php';
} elseif ($url_array[0] == MENU2) {
    $_SESSION['url'] = MENU2;
    include 'Model/Pages/content.php';
} elseif ($url_array[0] == MENU3) {
    $_SESSION['url'] = MENU3;
    include 'Model/Pages/content.php';
} elseif ($url_array[0] == "info") {
    include 'Model/Pages/info.php';
} elseif ($url_array[0] == "process") {
    include 'Controller/director.php';
} elseif ($url_array[0] == "register") {
    include 'Model/Pages/register.php';
} elseif ($url_array[0] == "down") {
    library::download();
    header("location: /info");
} elseif ($url_array[0] == "comment") {
    if (isset($_SESSION['admin']) || isset($_SESSION['user'])) {
        $ID = $_SESSION['ID'];
        library::comment_write($_POST['edit'], $ID);
        header("location:javascript://history.go(-1)");
    } else {
        library::wrong();
    }
} else {
    include 'error.php';
}