EOS; # the center table code starts here print <<
EOS; # if ($show_wimpy_player) { # print << # # if ($show_wimpy_player) { print <<
You need to upgrade your Flash Player

Clear Playlist

EOS; } function print_login_info_area() { global $user_id; global $name; if (!$user_id) { # if not logged in print <<
Create new account Forgot your password


EOS ; } else { # if logged in print <<

welcome: $name

EOS ; } } function get_subdir ($id) { $dir_num = substr("$id",strlen($id)-1); return $dir_num; } function build_style_form() { global $add_sql; global $dbh; $sql = "SELECT DISTINCT ON (styles.title) styles.title, styles_titles_xref.styles_id, styles_titles_xref.title_id, titles.date, titles.title_id FROM styles_titles_xref, styles, titles WHERE styles_titles_xref.styles_id = styles.styles_id AND titles.title_id = styles_titles_xref.title_id $add_sql ORDER BY styles.title"; $result = pg_exec($dbh, $sql); if (!$result) { $err = pg_errormessage(); print $err; die; } $rows = pg_numrows($result); if ($rows) { for ($cnt=0; $cnt < $rows; $cnt++) { if ( $cnt % 2 == 0) { $myrow = pg_fetch_array($result, $cnt); $styles_id = $myrow['styles_id']; $title = $myrow['title']; print << $title EOS; } } } } function build_style_form_odd() { global $add_sql; global $dbh; $sql = "SELECT DISTINCT ON (styles.title) styles.title, styles_titles_xref.styles_id, styles_titles_xref.title_id, titles.date, titles.title_id FROM styles_titles_xref, styles, titles WHERE styles_titles_xref.styles_id = styles.styles_id AND titles.title_id = styles_titles_xref.title_id $add_sql ORDER BY styles.title"; $result = pg_exec($dbh, $sql); if (!$result) { $err = pg_errormessage(); print $err; die; } $rows = pg_numrows($result); if ($rows) { for ($cnt=0; $cnt < $rows; $cnt++) { if ( $cnt % 2 == 1) { $myrow = pg_fetch_array($result, $cnt); $styles_id = $myrow['styles_id']; $title = $myrow['title']; print << $title EOS; } } } } function build_type_form() { global $add_sql; global $dbh; $sql = "SELECT DISTINCT ON (types.title) types_titles_xref.types_id, types_titles_xref.title_id, types.title, titles.date, titles.title_id FROM types_titles_xref, types, titles WHERE types_titles_xref.types_id = types.types_id AND titles.title_id = types_titles_xref.title_id $add_sql ORDER BY types.title"; $result = pg_exec($dbh, $sql); if (!$result) { $err = pg_errormessage(); print $err; die; } $rows = pg_numrows($result); if ($rows) { for ($cnt=0; $cnt < $rows; $cnt++) { $myrow = pg_fetch_array($result, $cnt); $types_id = $myrow['types_id']; $title = $myrow['title']; print << $title EOS; } } } function build_event_form() { global $add_sql; global $dbh; $sql = "SELECT DISTINCT ON (events.title) events_titles_xref.events_id, events_titles_xref.title_id, events.title, titles.date, titles.title_id FROM events_titles_xref, events, titles WHERE events_titles_xref.events_id = events.events_id AND titles.title_id = events_titles_xref.title_id $add_sql ORDER BY events.title"; $result = pg_exec($dbh, $sql); if (!$result) { $err = pg_errormessage(); print $err; die; } $rows = pg_numrows($result); if ($rows) { for ($cnt=0; $cnt < $rows; $cnt++) { $myrow = pg_fetch_array($result, $cnt); $events_id = $myrow['events_id']; $title = $myrow['title']; print << $title EOS; } } } function build_artist_form() { global $add_sql; global $dbh; $sql = "SELECT DISTINCT ON (artists.title) artists_titles_xref.artists_id, artists_titles_xref.title_id, artists.title, titles.date, titles.title_id FROM artists_titles_xref, artists, titles WHERE artists_titles_xref.artists_id = artists.artists_id AND titles.title_id = artists_titles_xref.title_id $add_sql ORDER BY artists.title"; $result = pg_exec($dbh, $sql); if (!$result) { $err = pg_errormessage(); print $err; die; } $rows = pg_numrows($result); if ($rows) { for ($cnt=0; $cnt < $rows; $cnt++) { $myrow = pg_fetch_array($result, $cnt); $artists_id = $myrow['artists_id']; $title = $myrow['title']; print <<$title EOS; } } } function load_style_title($style_num) { global $dbh; $sql = "SELECT title from styles WHERE styles_id = $style_num"; $result = pg_exec($dbh, $sql) or die ("Can not get style title" . pg_last_error()); $myrow = pg_fetch_array($result, 0); $title = $myrow['title']; # $ret_str = "Showing All Tracks for Style $title"; # return $ret_str; return $title; } function load_type_title($type_num) { global $dbh; $sql = "SELECT title from types WHERE types_id = $type_num"; $result = pg_exec($dbh, $sql) or die ("Can not get type title" . pg_last_error()); $myrow = pg_fetch_array($result, 0); $title = $myrow['title']; # $ret_str = "Showing All Tracks of Type $title"; # return $ret_str; return $title; } function load_event_title($event_num) { global $dbh; $sql = "SELECT title from events WHERE events_id = $event_num"; $result = pg_exec($dbh, $sql) or die ("Can not get event title" . pg_last_error()); $myrow = pg_fetch_array($result, 0); $title = $myrow['title']; $ret_str = "Showing All Tracks for $title"; return $ret_str; } function load_artist_title($artist_num) { global $dbh; $sql = "SELECT title from artists WHERE artists_id = $artist_num"; $result = pg_exec($dbh, $sql) or die ("Can not get artist title" . pg_last_error()); $myrow = pg_fetch_array($result, 0); $title = $myrow['title']; $ret_str = "Showing All Tracks for $title"; return $ret_str; } ?>