示例#1
0
 * @name director Přesměrování na INDEX z pole [1] přez /process/ ... 
 * @param home Description pokud se v poli nachází /home: odkaž zpět na Index
 */
if ($url_array[1] == "home") {
    header("location: /");
} elseif ($url_array[1] == "register") {
    if ($_POST['password'] == $_POST['password_2']) {
        library::register($_POST['username'], $_POST['password'], $_POST['email']);
    } else {
        header("location: /register");
    }
} elseif ($url_array[1] == "login") {
    library::login($_POST['username'], $_POST['password']);
} elseif ($url_array[1] == "logout") {
    library::logout();
    header('location: /');
} elseif ($url_array[1] == "edit") {
    library::content_write($_POST['edit'], $_SESSION['url']);
    include 'Model/CMS.php';
} elseif ($url_array[1] == MENU1) {
    $_SESSION['url'] = MENU1;
    header("location:javascript://history.go(-1)");
} elseif ($url_array[1] == MENU2) {
    $_SESSION['url'] = MENU2;
    header("location:javascript://history.go(-1)");
} elseif ($url_array[1] == MENU3) {
    $_SESSION['url'] = MENU3;
    header("location:javascript://history.go(-1)");
} else {
    include 'error.php';
}