<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Evolutionary Infrastructure: Images: Art</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="" name=description>
<META content="" name=keywords>
<META content="" name=author>
<META content=all name=robots>
<META content="14 days" name=revisit-after>
<META content=Global name=distribution>
<META content=General name=rating>
<META http-equiv=Window-target content=_top>
</HEAD>
<BODY class=bg2 bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<?php 
//connect to server
$conn = pg_connect("host=localhost port=5432 dbname=backbay user=postgres password=4databas");
if (!$conn) {
                             echo "An error occured.\n";
                             exit;
                         }
//get stuff from the table
$a=$chunk;
$num=$remaining;
                        while ($a<$num) {
$result1 = pg_exec ($conn, "select manifestation_id from subject_manifestation where (subject_id='7694') limit 10,$a");
//7694 is the id assigned to 'art' in the subject table of the backbay db.  To clone this page for other subjects, just change that number in both places above, and in the caption text below.
echo "<table width=\"100\%\" border=0><caption><h3>Art Images</h3></caption>";
if (!$result1) {
                             echo "<table width=\"100\%\" border=0><tr><td bgcolor=#f0f0f0 valign=top>No items matching that category can be found</td></tr>"; 
echo "</table>";
                             exit;
                         }
$num1 = pg_numrows($result1);
$i=0;
                        while ($i<$num1) {
                        $r1 = pg_fetch_row($result1, $i);
$result2 = pg_exec ($conn, "select u.urn_url, m.manifestation_id, m.form, m.pub_year, m.content_note, u.manifestation_id from manifestation m, urn_url u where (m.manifestation_id='$r1[0]') and (m.manifestation_id=u.manifestation_id) and (manifestation.form != 'book') and (manifestation.form != 'journal article') and (manifestation.form != 'report') and (manifestation.form != 'pamphlet') and (manifestation.form != 'pamphlet/bulletin') and (manifestation.form != 'newspaper article') and (manifestation.form != 'transcript')"); 
if (!$result2) {      
                      echo "<tr><td bgcolor=#f0f0f0 valign=top>A database error has occurred.</td></tr>"; 
echo "</table>";
                             exit;
                         }
		$num2 = pg_numrows($result2); 
		$r2 = pg_fetch_row($result2, $b);
echo "<tr><td bgcolor=#f0f0f0 valign=top><td bgcolor=#f0f0f0 valign=top><a target=images href=http://jefferson.village.virginia.edu:8090/fedora/servlet/edu.virginia.village.busa.fedora.FedoraServlet?action=diss&doid=$r2[0]&signature_name=web_image_display&method_name=get_large><img src=http://jefferson.village.virginia.edu:8090/fedora/servlet/edu.virginia.village.busa.fedora.FedoraServlet?action=diss&doid=$r2[0]&signature_name=web_image_display&method_name=get_thumb></a></td><td bgcolor=#f0f0f0 valign=top>ID: $r2[1]</td><td bgcolor=#f0f0f0 valign=top>
<a target=records href=http://jefferson.village.virginia.edu:8090/fens-base2/servlet/edu.virginia.village.busa.backbayquery.WorkManResultServlet?work_man_id=$r2[1]>$r2[3] $r2[2]<br>$r2[4]</td></tr>";
$b++;
$i++;
}
echo "</table>";
$a=$a+10;
echo "Chunk: $chunk<br>Remaining: $remaining<br>";
echo "<table width=\"100\%\" border=0><tr>";
//no previous results
if ($chunk-10<0) { 
echo "<td bgcolor=#f0f0f0 align=left><i>No previous results</i></td>";
echo "<td bgcolor=#f0f0f0 align=right>";
echo "<form action=fens.art.php method=post>";
echo "<input type=\"hidden\" name=\"chunk\" value=\"$a\">";
echo "<input type=\"hidden\" name=\"remaining\" value=\"$num\">";
echo "<input type=\"submit\" name=\"button\" value=\"Next\">";
echo "</form>";
echo "</tr></table>";
echo "</p>";
echo "</BODY></HTML>";
exit;
}
//previous and next results
elseif ($chunk>0 && $chunk+10<$remaining) { 
$c=$a-20;
echo "<td bgcolor=#f0f0f0 align=left>";
echo "<form action=fens.art.php method=post>";
echo "<input type=\"hidden\" name=\"chunk\" value=\"$c\">";
echo "<input type=\"hidden\" name=\"remaining\" value=\"$num\">";
echo "<input type=\"submit\" name=\"button\" value=\"Previous\">";
echo "</form>";
echo "</td>";
echo "<td bgcolor=#f0f0f0 align=right>";
echo "<form action=fens.art.php method=post>";
echo "<input type=\"hidden\" name=\"chunk\" value=\"$a\">";
echo "<input type=\"hidden\" name=\"remaining\" value=\"$num\">";
echo "<input type=\"submit\" name=\"button\" value=\"Next\">";
echo "</form>";
echo "</tr></table>";
echo "</p>";
echo "</BODY></HTML>";
exit;
}
//no next results
elseif ($chunk+10>$remaining) { 
$c=$a-20;
echo "<td bgcolor=#f0f0f0 align=left>";
echo "<form action=fens.art.php method=post>";
echo "<input type=\"hidden\" name=\"chunk\" value=\"$c\">";
echo "<input type=\"hidden\" name=\"remaining\" value=\"$num\">";
echo "<input type=\"submit\" name=\"button\" value=\"Previous\">";
echo "</td>";
echo "<td bgcolor=#f0f0f0 align=right><i>No next results</i></td>";
echo "</form>";
echo "</tr></table>";
echo "</p>";
echo "</BODY></HTML>";
exit;
}
else { 
exit;
}
}
?>

