Item Index Information\n"); // Parse URL if ($q = getenv("QUERY_STRING")) { $baseurl = urldecode($q); parse_str($baseurl, $get); foreach ($get as $key => $value) $GLOBALS[$key] = $value; } elseif (isset($_REQUEST)) { foreach($_REQUEST as $key => $value) { $GLOBALS[$key] = $value; } } include 'indexingfuncs.php'; connect_to_database(); if (!empty($itemurl)) { $pos = strrpos($itemurl, "#"); if ($pos === false) { // no action needed } else { $itemurl = substr($itemurl, 0, $pos-1); } $maxurl = $itemurl . "#zzzzzzzz"; $sql = "SELECT * FROM Item WHERE IsDeleted=0 AND IsHidden=0 AND URL >= :itemurl AND URL <= :maxurl"; $data = array(":itemurl" => $itemurl, ":maxurl" => $maxurl); } else { $sql = "SELECT * FROM Item WHERE ItemID = :itemid"; $itemid = asciify($itemid); $data = array(":itemid" => $itemid); } $stmt = $dbh->prepare($sql); if (!$stmt->execute($data)) { echo "SQL FAILED: " . recreate_sql($sql, $data); exit(); } $rows = $stmt->fetchAll(); if (count($rows) > 1) { echo("

Collection

\n"); echo("This item is a collection. Please select which item in the collection you wish to display:"); echo("

\n"); } elseif (count($rows) == 1) { $row = $rows[0]; $itemid = $row["ItemID"]; $linkitemid = $row["LinkItemID"]; echo("
\n"); echo("See also | "); echo("Other information | "); echo("Associated images or text | "); echo("Author/Inventor information | "); echo("Comments | "); echo("
\n"); include("itemsummaryinc.php"); $theitemline = make_item_line($row, 1, 0, 1); echo("

\n"); echo(" \n"); $authorline = make_author_line( $row, 1, 1); echo("

"); echo($authorline); // Doesn't exist. What did it do? // displayitemdates(0, 0, $row); echo(" \n"); include("associationsinc.php"); echo(" \n"); include("otherinfo.php"); echo(" \n"); include("seealsoinc.php"); } elseif (!empty($itemid)) { echo("

Item '{$itemid}' not found!

\n"); } elseif (!empty($itemurl)) { echo("

URL '".$itemurl."' not found!

\n"); } else { echo ("

No URL or ItemID provided!

\n"); } include("indexmaintinc.php"); if (!empty($linkitemid)) { echo("

Group ID '".$linkitemid."'\n"); } include("../footer.php"); ?>