Esempio n. 1
0
<?php 
if (AuthenticationService::can_write_article()) {
    ?>
    <a href = "/articles/new" class="btn" > Write a new article </a >
<?php 
}
?>

<?php 
while (list($art_key, $art) = each($articles)) {
    ?>

    <article>
        <header>
            <span class="article-date"><?php 
    echo date('F d, Y', $art->get_creation_date());
    ?>
</span>

            <div class="title"><a href="/articles/<?php 
    echo $art->get_id();
    ?>
"><?php 
    echo $art->get_title();
    ?>
</a></div>
            <div class="subtitle">
                <span class="author"><?php 
    echo $art->get_author();
    ?>