"submitted", "Published" => "published" ); echo "

Article Availability

\n"; $i=-1; foreach ($a_artTypes as $k => $v) { $i++; echo "

" . $k . " Articles

\n"; echo "

\n"; echo "

\n"; $sql = "SELECT article_id, title, date_".$v. " FROM cms_articles " . "WHERE is_published=" . $i . " ORDER BY title"; $result = mysql_query($sql,$conn) or die('Could not get list of pending articles; ' . mysql_error()); if (mysql_num_rows($result) == 0) { echo " No " . $k . " articles available"; } else { while ($row = mysql_fetch_array($result)) { echo ' ' . htmlspecialchars($row['title']) . " ($v " . date("F j, Y",strtotime($row['date_'.$v])) . ")
\n"; } } echo "
\n"; echo "

\n"; } require_once 'footer.php'; ?>