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"); ?> "; foreach ($peb_headings as $t) { print ""; ?>

Pacific Economic Bulletin, Volume $peb_details->volume Number $peb_details->number ($peb_details->year)
Contents:

"; foreach ($peb_headings as $t) { if ($t->type == 'Policy dialogue') { // If it does contain policy dialogues then don't make it plural! print " type"."s\">$t->type"."
"; } else { print " type"."s\">$t->type"."s
"; } } print "

"; print ""; print ""; } else { print "

$t->type"."s

"; } print ""; print "
"; print "type"."s\">"; if ($t->type == 'Policy dialogue') { //Again if it is a Policy Dialogue then don't make plural print "

$t->type"."

"; $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 "
(Order individual articles from Asia Pacific Press, 'policy dialogue' papers are free to download)