$holdurl='';
$exstr="SELECT exh_ndx, exh_yr, exh_title, exh_venue, exh_url FROM exhibition;";
foreach($db->query($exstr) as $exrow) {
if ($exrow["exh_ndx"] == $dbtype) {
printf("%s at %s (%s)", $exrow["exh_title"], $exrow["exh_venue"], $exrow["exh_yr"]);
if ($exrow["exh_url"]>'') $holdurl=$exrow["exh_url"];
};
}
printf('');
$descsource="exh" . $dbtype . ".inc";
if (file_exists($descsource)) {
printf('');
$intxt= file_get_contents($descsource);
$intxt=str_replace('', '
', $intxt);
echo $intxt;
$moresource="exh" . $dbtype . "more.inc";
if (file_exists($moresource)) {
printf(' More...', $dbtype);
};
printf('
');
$imgname='img/exh' . $dbtype . '.jpg';
if (file_exists($imgname)) {
$sizestat = getimagesize($imgname);
if ($sizestat[0]>300) {
$newwidth=300;
$newheight=$sizestat[1] * $newwidth / $sizestat[0];
}
else
{
$newheight=$sizestat[1];
$newwidth=$sizestat[0];
};
printf('');
printf('
', stripadd($imgname), $newheight, $newwidth);
};
if ($holdurl>'') printf('',$holdurl);
$presscov="exh" . $dbtype . "press.inc";
if (file_exists($presscov)) {
printf('Comments
');
$intxt= file_get_contents($presscov);
$intxt=str_replace('', '
', $intxt);
echo $intxt;
printf('
');
};
printf('');
};
printf('Selected works
');
$existr="SELECT exi_ndx, exi_img FROM exhibitionimage WHERE exi_exh=". $dbtype . " ORDER BY exi_ndx ASC LIMIT 19;";
$tc="A";
foreach($db->query($existr) as $eximg) {
$sqlstr="SELECT ksw_ndx, ksw_yr, ksw_title, ksw_add, ksw_size, ksw_medium, ksw_where FROM ksworks WHERE ksw_ndx=". $eximg["exi_img"] . " ORDER BY ksw_ndx DESC LIMIT 19;";
foreach($db->query($sqlstr) as $wmyrow) {
?>
printf('', $wmyrow["ksw_yr"]);
printf('
', $wmyrow["ksw_add"], stripadd($wmyrow["ksw_add"]));
$gall = $wmyrow["ksw_where"];
if ($gall >"") {
if (substr($gall,0,7) == 'http://') {
$theirsite = substr($gall,7,strlen($gall));
if (substr($theirsite,0,4) == 'www.') {$theirsite = substr($theirsite,4,strlen($theirsite));};
$finddot = strpos($theirsite,'.');
if ($finddot >0) {
$theirsite = substr($theirsite,0,$finddot);
}
$gall = '' . $theirsite . '';
};
};
printf('%s
%s
%s
%s', $wmyrow["ksw_title"], $wmyrow["ksw_medium"], $wmyrow["ksw_size"], $gall);
//printf("Thumb=%s from %s",$tryth, $imgpos);
?>
 
$tc="C";
if ($tc>"B") {
printf("");
$tc="A";
?>
}
else if ($tc>"A") {$tc="C";}
else $tc="B";
}
}
?>
', '
', $intxt); echo $intxt; $moresource="exh" . $dbtype . "more.inc"; if (file_exists($moresource)) { printf(' More...', $dbtype); }; printf('
'); $intxt= file_get_contents($presscov); $intxt=str_replace('
', '
', $intxt); echo $intxt; printf('
Selected works
', $wmyrow["ksw_add"], stripadd($wmyrow["ksw_add"]));
$gall = $wmyrow["ksw_where"];
if ($gall >"") {
if (substr($gall,0,7) == 'http://') {
$theirsite = substr($gall,7,strlen($gall));
if (substr($theirsite,0,4) == 'www.') {$theirsite = substr($theirsite,4,strlen($theirsite));};
$finddot = strpos($theirsite,'.');
if ($finddot >0) {
$theirsite = substr($theirsite,0,$finddot);
}
$gall = '' . $theirsite . '';
};
};
printf('%s
%s
%s
%s', $wmyrow["ksw_title"], $wmyrow["ksw_medium"], $wmyrow["ksw_size"], $gall);
//printf("Thumb=%s from %s",$tryth, $imgpos);
?>
 
