if ((!isset($peb_id)) || $peb_id=="latest") {
// Assume they want the latest!
$latest_peb_row = $db->get_row("SELECT * FROM peb_bulletins WHERE year=$latest_peb_year AND number=$latest_peb_number");
$peb_id = $latest_peb_row->peb_id;
}
// Display a pretty page showing the selected PEB
$query = new sqlQuery; // Make a new query... Sven made this sqlQeury object.
$query->addSELECT("DISTINCT type FROM peb_articles");
$query->addWHERE("peb_id=".$peb_id);
// Order how the entries are displayed... this is done to reflect the contents of the actual bulletins (rather than alphabetical)
$query->addORDERBY("type='Economic Survey' DESC, type='Article' DESC, type='Comment' DESC, type='Policy dialogue' DESC");
if ($peb_headings = $db->get_results($query->sqlToString())) {
// There are articles to show
$peb_details = $db->get_row("SELECT * FROM peb_bulletins WHERE peb_id=$peb_id");
?>
} else {
// No articles to show
print "There are no articles to show.";
}
?>