Exemplo n.º 1
0
} else {
    if ($cmd == 'create') {
        $user = get_logged_in_user();
        check_tokens($user->authenticator);
        require_founder_login($user, $team);
        create_forum($user, $team);
    } else {
        if ($cmd == 'edit_action') {
            $user = get_logged_in_user();
            require_founder_login($user, $team);
            check_tokens($user->authenticator);
            $forum = BoincForum::lookup("parent_type=1 and category={$teamid}");
            if (!$forum) {
                error_page("No forum");
            }
            edit_action($forum);
        } else {
            if ($cmd == "remove_confirm") {
                $user = get_logged_in_user();
                require_founder_login($user, $team);
                remove_confirm($user, $team);
            } else {
                if ($cmd == "remove") {
                    $user = get_logged_in_user();
                    require_founder_login($user, $team);
                    remove($team);
                } else {
                    if ($cmd != "") {
                        error_page("unknown command {$cmd}");
                    } else {
                        show_forum($team);
Exemplo n.º 2
0
/**
*	точка входа в программу
*	подгружение model,controller.
*/
echo $_SERVER["REQUEST_URI"];
$uri = $_SERVER["REQUEST_URI"];
$u = explode('?', $uri);
$uri = $u[0];
echo "<br>newUri=" . $uri;
if ($uri == "/2ktvrp/subbotin/" or $uri == "/2ktvrp/subbotin/index.php") {
    $response = list_action();
} elseif ($uri == "/2ktvrp/subbotin/index.php/admin") {
    $response = admin_action();
} elseif ($uri == "/2ktvrp/subbotin/index.php/autor") {
    $response = autor_action();
} elseif ($uri == "/2ktvrp/subbotin/index.php/about") {
    $response = about_action();
} elseif ($uri == "/2ktvrp/subbotin/index.php/show") {
    $response = show_action($_REQUEST['id']);
} elseif ($uri == "/2ktvrp/subbotin/index.php/edit") {
    $response = edit_action($_REQUEST['id']);
} elseif ($uri == "/2ktvrp/subbotin/index.php/edit_submit") {
    $response = admin_action();
} elseif ($uri == "/2ktvrp/subbotin/index.php/delete") {
    $response = delete_action($_REQUEST['id']);
} elseif ($uri == "/2ktvrp/subbotin/index.php/add") {
    $response = add_action();
} elseif ($uri == "/2ktvrp/subbotin/index.php/users") {
    $response = users_action();
}
Exemplo n.º 3
0
	<?php 
/** подгружает model i Controller */
echo $_SERVER['REQUEST_URI'];
//выводит URI (идентификатор)
$uri = $_SERVER['REQUEST_URI'];
$u = explode('?', $uri);
$uri = $u[0];
$uri = rtrim($uri, '/');
echo "<br>newUri=" . $uri;
if ('/luik' == $uri or '/luik/index.php' == $uri) {
    $response = list_action();
} elseif ('/luik/index.php/admin' == $uri) {
    $response = admin_action();
} elseif ('/luik/index.php/show' == $uri) {
    $response = show_action($_REQUEST['id']);
} elseif ('/luik/index.php/about' == $uri) {
    // если в адресной строке появилась запись
    $response = about_action();
    // вызываем функцию about_action
} elseif ('/luik/index.php/edit' == $uri) {
    $id = $_REQUEST['id'];
    $response = edit_action($id);
}