コード例 #1
0
ファイル: create_post.php プロジェクト: afalina/Tubogram
            $errors[] = "Неможливо розпізнати посилання.";
        }
    }
    if (!$errors) {
        $post_id = create_post(get_current_user_id(), $video_link);
        redirect(APP_URL . '/view_post.php?id=' . $post_id);
    }
}
?>

<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>Tubogram</title>
    <?php 
echo js_and_css();
?>
</head>

<?php 
if (get_current_user_id()) {
    page_header('logged', 'create_post');
} else {
    page_header('not_logged', 'create_post');
}
?>

<div class="container">
    <div class="page-header">
        <h1>Додати відео</h1>
    </div>
コード例 #2
0
ファイル: init.php プロジェクト: afalina/Tubogram
function display_not_found_page()
{
    header('HTTP/1.0 404 Not Found');
    ?>
    <!DOCTYPE html>
    <head>
        <meta charset="utf-8">
        <title>Tubogram</title>
        <?php 
    echo js_and_css();
    ?>
    </head>
    <?php 
    if (get_current_user_id()) {
        page_header('logged');
    } else {
        page_header('not_logged');
    }
    ?>
    <div class="container">
        <div class="jumbotron page-not-found">
            <h1>404</h1>
            <p>
                Такої сторінки не існує :(
            </p>
        </div>
    </div>
    <?php 
    page_footer();
    exit;
}