Pconnect($coldb_host,$coldb_user,$coldb_pass,$coldb_db) === false) { print "Error on Database connection
"; exit; } } function debug_print($errormsg) { // comment this out to take out debugging print $errormsg; } function build_menu() { global $dbconn; global $script_name; $depth= 0; $parent = 0; $sql = "SELECT * FROM tbl_category WHERE parent_id=0 ORDER BY sequence"; $result = &$dbconn->Execute($sql); if (!$result) { print "Error in sql
"; exit; } else { $mainmenu = $result->GetArray(); reset($mainmenu); foreach ($mainmenu as $menuitem) { print ""; print "
"; // recurse and print sub-menu? if (isset($_REQUEST['mcat']) && ($_REQUEST['mcat'] == $menuitem[0])) { build_menu_children($menuitem[0],($depth+1)); } } } } function build_menu_children($parent_id,$depth) { global $dbconn; global $script_name; $sql = "SELECT * FROM tbl_category WHERE parent_id=".$parent_id." ORDER BY sequence"; $result = &$dbconn->Execute($sql); if (!$result) { print "Error in sql
"; exit; } if ($result->RecordCount() != 0) { while (!$result->EOF) { // just using spaces for indentation for ($c=0; $c < ($depth); $c++) print " "; // build link for pictures print ""; print $result->fields[1]."
\n"; build_menu_children($result->fields[0],($depth+1)); $result->MoveNext(); } print "
\n"; } } function display_pictures() { global $dbconn; global $script_name; //print_hierarchy(); if (isset($_REQUEST['asn'])) { print_asn_detail(); } elseif (isset($_REQUEST['pagen'])) { print_col_group($_REQUEST['pagen']); // ADDED BY VISILUNA TO PROCESS NON-DATABASE-DRIVEN MENU ITEMS } elseif (isset($_REQUEST['sec'])) { require_once('include/collection.inc.php'); // END VISILUNA ADDITION } else { print_main_page(); } return; } function print_hierarchy() { global $dbconn; global $script_name; if (isset($_REQUEST['mcat']) && isset($_REQUEST['scat'])) { $parent = $_REQUEST['scat']; do { $sql = "SELECT * FROM tbl_category WHERE cat_id=".$parent; $result = &$dbconn->Execute($sql); if (!$result) { print "Error in database query
"; return; } if ($result->RecordCount() != 1) { print "Error in database query
"; return; } else { // name,id,parent $hierarchy[] = array($result->fields[1],$result->fields[0],$result->fields[2]); $parent = $result->fields[2]; } } while ($parent != 0); } elseif (isset($_REQUEST['mcat']) && !isset($_REQUEST['scat'])) { $parent = $_REQUEST['mcat']; do { $sql = "SELECT * FROM tbl_category WHERE cat_id=".$parent; $result = &$dbconn->Execute($sql); if (!$result) { print "Error in database query
"; return; } if ($result->RecordCount() != 1) { print "Error in database query
"; return; } else { // name,id,parent $hierarchy[] = array($result->fields[1],$result->fields[0],$result->fields[2]); $parent = $result->fields[2]; } } while ($parent != 0); } else { // Nothing to print return; } $reversed = array_reverse($hierarchy); foreach ($reversed as $item) { if ($item[0] == $reversed[0][0]) { print ""; print $item[0].""; } else { print " | "; print "".$item[0].""; } } if (isset($_REQUEST['asn'])) { print " | ".$_REQUEST['asn']; } print "
"; } function print_main_page() { if (!isset($_REQUEST['mcat']) && !isset($_REQUEST['scat'])) { print "


\n \"MountainEliot Porter taught himself how to photograph and make his own black-and-white prints during his early teenage years. In the mid-1930s, he became a master black-and-white printer and, in late 1938, started gaining widespread renown for his quiet, elegantly balanced landscapes. While he never fully gave up black and white after he took up color in 1939, he was focusing almost wholly on color by the mid-1950s. After experimenting with tri-color carbro printing, Porter taught himself Kodak's new wash-off relief process. He switched to the dye transfer process when it superseded wash-off relief printing in 1946. He remained committed to dye transfer printing for the rest of his life, appreciating the extensive color control that the process offered.

\n\n

This Collection Guide samples Porter's photographs from throughout his career. It provides a numerical listing of his photographs in the collection; describes the dye transfer process, his printing method of choice; and samples his images from across the collection. The photographer generally organized his landscape photographs by location and his bird photographs by species. He kept his black-and-white photographs separate from his color prints. The photographs in the category \"In Wildness Is the Preservation of the World\" have been artificially separated from their original location categories because these images reflect the artist's first and most important book. The categories \"Eastern United States\" and \"Western United States\" represent groupings of photographs not covered in the other categories. The images within each category are presented largely in chronological order, and brief introductions open each section.

\n\n

To avoid any vertical scrolling, this Collection Guide is best viewed at 1024x768 resolution. Screen resolution settings can be updated via the Display control panel (in Windows) or the Monitors and Sounds control panel (in MacOS).

\n
"; } elseif (isset($_REQUEST['scat']) && isset($_REQUEST['mcat'])) { print_col_group(1); } elseif (isset($_REQUEST['mcat'])) { print_col_group(1); } } function print_col_group($newpage) { global $dbconn; global $script_name; global $thumbnail_dir; global $images_dir; global $script_name; global $numperpage; global $tntablewidth; global $tntableheight; global $maxnumlinks; global $tnwidth; if (isset($newpage)) { $page = $newpage; } elseif (isset($_REQUEST['pagen'])) { $page = $_REQUEST['pagen']; } else { return; } if (isset($_REQUEST['scat'])) { $category = $_REQUEST['scat']; } elseif (isset($_REQUEST['mcat'])) { $category = $_REQUEST['mcat']; } else { return; } if ($_REQUEST['mcat']=='2' && !isset($_REQUEST['scat'])) { $_REQUEST['scat'] = 5; $category = $_REQUEST['scat']; } elseif ($_REQUEST['mcat']=='3' && !isset($_REQUEST['scat'])) { $_REQUEST['scat'] = 9; $category = $_REQUEST['scat']; } elseif ($_REQUEST['mcat']=='4' && !isset($_REQUEST['scat'])) { $_REQUEST['scat'] = 24; $category = $_REQUEST['scat']; } // now we have $page and $category number ( not name ) $sql = "SELECT * FROM tbl_layout WHERE category=".$category." ORDER BY sequence"; // this is just in here for testing $sql = "SELECT * FROM tbl_layout"; $result = &$dbconn->Execute($sql); if (!$result) { print "Error in sql
"; exit; } // need to get real number of items $totalnumber = $result->RecordCount(); // over maxnumlinks gets reset to maximum if ($totalnumber > $maxnumlinks) $totalnumber = $maxnumlinks; // now build the table of links/images print "\n\t"; print "\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\n\n\t\t\n\t\t"; print "\n\t\n\t
"; print_hierarchy(); print ""; print_page_links($page,$totalnumber); print "
\n\t"; // prints introductions link print "\"\"
"; // start table for images print "\n\t\t"; $image_array = $result->GetArray(); reset($image_array); // use this for walking around the array for the current page $image_index = (($page - 1) * $numperpage); if (($page * $numperpage) >= $totalnumber) { $end_index = $totalnumber; } else { $end_index = ($page * $numperpage); } $linecount = 1; if ($result->RecordCount() != 0) { // because arrays start at 0 while ($image_index < $end_index) { // here be where we print table cells for pictures // we also set width here print "\n\t\t"; // PJ - 11/14/2002 - Call to $tnwidth global removed // Original code preserved above print ">
".$image_array[$image_index][2]."\n\t\t"; if ($linecount==$tntablewidth) { print "\n\t\t"; $linecount = 1; } else { $linecount++; } $image_index++; } } // end table of images print "

".$image_array[$image_index][2]."
"; print "
 "; print_page_links($page,$totalnumber); // end table with links print "
"; } // // function to print the bracketed page links for the // grouped pages requires a page number, and total number, // expects $_REQUEST variables to build page links // function print_page_links($page,$totalnumber) { global $script_name; global $numperpage; if ($totalnumber > 0) { print "page "; for ($i=1;($i<=$totalnumber); $i++) { if ((!($i % $numperpage)) && ($i > $numperpage)) { print " | "; print ""; if (!isset($_REQUEST['pagen'])){ print ($i/$numperpage); print ""; } elseif (($_REQUEST['pagen'])== ($i/$numperpage)){ print "".($i/$numperpage).""; } else { print ($i/$numperpage); print ""; } } if ((($i % $numperpage) == 0) && ($i == $numperpage)) { print ""; if (!isset($_REQUEST['pagen'])){ print "1"; } elseif ($_REQUEST['pagen']==1) { print "1"; } else { print "1"; } } } $i--; if (($i > $numperpage) && (!($i % $numperpage) == 0)) { print " | "; print ""; if (!isset($_REQUEST['pagen'])){ print ceil($i/$numperpage); print ""; } elseif (($_REQUEST['pagen'])== ceil($i/$numperpage)){ print "".ceil($i/$numperpage).""; } else { print ceil($i/$numperpage); print ""; } } elseif ($totalnumber < $numperpage) { print ""; print "1"; print ""; } } } // // function to print the table for the accesion detail // assumes asn and mcat/scat are requested // function print_asn_detail() { global $dbconn; global $script_name; global $thumbnail_dir; global $images_dir; global $script_name; if (isset($_REQUEST['asn'])) { $accession = $_REQUEST['asn']; } else { return; } if (isset($_REQUEST['scat'])) { $category = $_REQUEST['scat']; } elseif (isset($_REQUEST['mcat'])) { $category = $_REQUEST['mcat']; } else { return; } // now we have $accession and $category number ( not name ) // RJS if we go to category number in tbl_layout, this will need to be changed // should be able to just take out this whole block $category = $dbconn->qstr($category); $sql = "SELECT * FROM tbl_layout WHERE category=".$category." ORDER BY sequence"; $result = &$dbconn->Execute($sql); if (!$result) { print "Error in database query
"; return; } // // I really don't like this, but it works // $totalnumber = $result->RecordCount(); $position = 1; unset($nextasn); unset($prevasn); if ($result->RecordCount() >= 1) { $asn_array = $result->GetArray(); reset($asn_array); $tempcount = 0; foreach ($asn_array as $item) { if ($item[2] == $accession) { $position = $tempcount+1; if ($tempcount != 0) { $prevasn = $asn_array[($tempcount-1)][2]; } if ($tempcount != (count($asn_array)-1)) { $nextasn = $asn_array[($tempcount+1)][2]; } } $tempcount++; } } // now we know prevasn, nextasn, position, and total in group // // now we are dealing with text, we have to quote it. $asnsql = $dbconn->qstr($accession); $sql = "SELECT * FROM tbl_collection WHERE accession=".$asnsql." LIMIT 1"; $result = &$dbconn->Execute($sql); if (!$result) { print "Error in sql
"; return; } if ($result->RecordCount() == 1) { // here be where we print a pretty picture print "\n\t"; print "\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t
"; print_hierarchy(); print "\n\t\t"; if (isset($prevasn)) { print " "; } print " image ".$position." of ".$totalnumber." "; if (isset($nextasn)) { print " "; } echo "
"; // TODO take height and width out!!!!!!!!!!!! // PJ - 11/14/2002 - Height and Width Removed print "
"; // print the image information echo "
".$result->fields[1]."
".$result->fields[6]."
Request imagery
\n"; print_hierarchy(); echo ""; if (isset($prevasn)) { print " "; } print " image ".$position." of ".$totalnumber." "; if (isset($nextasn)) { print " "; } echo "
"; } else { return; } } // // All functions below this line were created by Visiluna Productions // function print_lnav($sec) { switch($sec) { case 'about': echo "
"; echo "
"; echo "
"; echo "
"; break; // case 'photos': case 'manuscripts': echo "Biographical Note
"; echo "Scope and Content Note
"; echo "Series Description
"; echo "Containter List
"; break; case 'library': echo "Books
"; echo "Periodicals
"; echo "Periodicals (Disposed of)
"; break; case 'other': echo "Camera and Darkroom Equipment
"; echo "Furniture
"; echo "Miscellaneous
"; echo "Artworks by Other Artists
"; echo "Related Manuscript Holdings
"; break; } } function print_body($sec,$lpick,$pgpart) { //require_once('include/content/'.$sec.'_body.inc'); }