/*
T. Dokshizer db
Laget med PHP/MySQL
(c) Ole J. Utnes, 2004.
- show record
*/
?>
include 'header.inc';
require("config.inc.php");
require("functions.inc");
if (!$id) {
echo "
No record ID given!";
include "footer.inc";
exit;
}
mysql_connect($hostname,$user,$pass);
mysql_select_db($dbname);
$query = "select * from doks_album where id = '$id'";
$result = mysql_db_query($dbname, $query);
if ($result) {
$num_rows = @mysql_num_rows($result);
if ($num_rows < 1) {
echo "
No record found!";
include "footer.inc";
exit;
}
echo "
\n";
// get image if exist:
$img_file = "image/doks_" .$id .".jpg";
$img_file_b = "image/doks_" .$id ."_b.jpg";
$big_img_file = "image/doks_" .$id ."_l.jpg";
$big_img_file_b = "image/doks_" .$id ."_l_b.jpg";
$no_img_file = "image/doks_0.jpg";
if (file_exists($img_file)) {
if (file_exists($big_img_file)) {
echo "";
echo " | \n";
if (file_exists($big_img_file_b)) {
echo "";
echo " | \n";
}
echo "
\n";
$titl = $row['title'];
echo " Record title: "; echo $titl ." "; $lbl_name=""; $lbl_id = $row['label_id']; $sql = "SELECT name FROM doks_label where id ='$lbl_id'"; $res = mysql_db_query($dbname,$sql); if ($res) { $rw = mysql_fetch_row($res); $lbl_name=$rw[0]; } echo "Record label: "; echo $lbl_name; $lbl_num = $row['label_number']; echo " / "; echo $lbl_num ." "; $medium = $row['medium']; if ($medium == '1') { $medium_txt = 'CD'; } elseif ($medium == '2') { $medium_txt = 'LP'; } elseif ($medium == '3') { $medium_txt = 'MC'; } elseif ($medium == '4') { $medium_txt = 'DVD'; } else { $medium_txt = ''; } echo "Medium: "; echo $medium_txt ." "; $year = $row['year']; echo "Year recorded: "; echo $year ." "; $perf = $row['performer']; $perf = html_filter_out($perf); echo " Additional performer(s): "; echo $perf ." "; $cond = $row['conductor']; $cond = html_filter_out($cond); echo "Conductor(s): "; echo $cond ." "; $orch = $row['orchestra']; $orch = html_filter_out($orch); echo "Orchestra(s): "; echo $orch ." "; $comp = $row['composer']; $comp = html_filter_out($comp); echo "Composer(s): "; echo $comp ." "; $tl = $row['track_listing']; $tl = html_filter_out($tl); echo "Track listing: "; echo " " .$tl ." "; $comm = $row['comment']; $comm = html_filter_out($comm); echo "Comment: "; echo " " .$comm ." "; echo " | ";
echo "