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");
?>
print "Pacific Economic Bulletin, Volume $peb_details->volume Number $peb_details->number ($peb_details->year) Contents: | ";
foreach ($peb_headings as $t) {
print "";
print "";
print "";
print "$t->type"."s | ";
print "| ";
$query = new sqlQuery; // Make a new query... Sven made this sqlQeury object.
$query->addSELECT("* FROM peb_articles");
$query->addWHERE("peb_id=".$peb_id);
$query->addWHERE("type='".$t->type."'");
$sqlString = $query->sqlToString();
printArticleTable2($db->get_results($sqlString));
print " | ";
print " ";
}
print " | ";
?>
| (Order individual articles from Asia
Pacific Press, 'policy dialogue' papers are free to download) |
} else {
// No articles to show
print "There are no articles to show.";
}
?>
|