<?php $dbcon = AMP_Registry::getDbcon(); $article_where_clause = 'publish = 1 AND date >= CURRENT_DATE'; $article_sql = "SELECT id FROM articles WHERE {$article_where_clause} ORDER BY date LIMIT 4"; $rows = $dbcon->Execute($article_sql); $html = ''; $articles = $rows->GetArray(); foreach ($events as $event) { $e = new Article(AMP_Registry::getDbcon(), $article['id']); $date = date('m/d/Y', strtotime($e->getAssignedDate())); if ($date) { $date = '<b>' . $date . ':</b> '; } $html .= '<a class="update-title" href="' . $e->getURL() . '">' . $e->getTitle() . '</a>'; $html .= '<br />'; $html .= '<div class="update-desc">'; $html .= $date . cutOff($a->getBlurb(), 200); $html .= '</div>'; } echo $html; ?>