Example #1
0
function show_page($id)
{
    echo '<div class="poems">';
    echo '<p class="poet_name">';
    // Show poet username as a link.
    echo '<a href="rss.php?poet_id=' . $id . '">';
    echo '<img src="graphics/rss.gif" class="rss"></a>&nbsp;&nbsp;&nbsp;';
    echo '<a href="show_poet_info.php?id=' . $id . '">';
    echo get_poet_username($id);
    echo '</a>';
    echo '</p>';
    // Show poet poems.
    show_poems($id);
    echo '</div>';
}
Example #2
0
function create_own_page($db)
{
    echo '<div class="ownpage">';
    // If there is some message in session variable, then we
    // should show it to user and after that unset that variable,
    // so same message will not be shown many times.
    show_message();
    // Show form where we can add poem.
    create_poem_adding_form();
    echo '<hr>';
    // Show own info here, eg. Real name, number of poems etc.
    show_poet_info($db, $_SESSION['id']);
    echo '<hr>';
    // Get poems.
    echo '<div class="poem">';
    show_poems($_SESSION['id']);
    echo '</div>';
    echo '</div>';
}