 |
if (empty($_GET['r'])&&empty($_GET['d'])) {
if (!empty($_GET['m'])) echo ' Your search did not match any records. ';
}
else if (!empty($_GET['r'])) {
if (!empty($_POST['bykeyword'])) while ($res2=mysql_fetch_assoc($res)) {
echo '
',substr($res2['abstract'],0,255),'...
View Full Record • ';
if (file_exists('bios/'.$res2['last'].'_'.$res2['first'].'.pdf')) echo 'Download biography (in PDF format)';
echo '
';
};
}
else if (!empty($_GET['d'])) {
echo '';
$thedir='photos/'.preg_replace('/[^a-zA-Z0-9_]/','',$_GET['first'].$_GET['last']);
if (is_dir($thedir)) {
echo ' ';
$dir=opendir($thedir);
while ($item=readdir($dir)) if ($item{0}!='.') if (substr($item,-3,3)!='txt') {
echo ' | ';
$caption=str_replace('jpg','txt',$thedir.'/'.$item);
if (file_exists($caption)) echo '| '.file_get_contents($caption).' | ';
echo '';
};
echo ' ';
};
echo '
',$res2['abstract'],' ';
if (file_exists('maps/'.$_GET['last'].'_'.$_GET['first'].'.jpg')) echo 'View Map ';
echo 'Author of biography: ',$res2['author'],'
Includes bibliography? ';
echo ($res2['biblio']) ? 'Yes' : 'No';
echo ' ';
if (file_exists('bios/'.$_GET['last'].'_'.$_GET['first'].'.pdf')) echo 'Download biography (in PDF format) ';
echo 'Keywords: ',$res2['keywords'],' ';
};
?>
|