OBJECT RECORD

", $foo); $foobar2 = eregi_replace("%%ITALIC", "", $foobar); $barfoo = eregi_replace("%ITALIC;", "", $foobar2); $barfoo2 = eregi_replace("%ITALIC", "", $barfoo); $barfoo3 = eregi_replace("%eacute;", "é", $barfoo2); $barfoo4 = eregi_replace("%ocirc;", "ô", $barfoo3); $blortfoo = eregi_replace("%ccedil;", "ç", $barfoo4); $blortfoo1 = eregi_replace("%Dgr;", "Delta7", $blortfoo); $blortfoo2 = eregi_replace("%lt;", "<", $blortfoo1); $blortfoo3 = eregi_replace("%gt;", ">", $blortfoo2); $blortfoo4 = eregi_replace("%amp;", "&", $blortfoo3); $farble = eregi_replace("%plus;", "+", $blortfoo4); $farble2 = eregi_replace("%cent;", "¢", $farble); $farble3 = eregi_replace("%reg;", "®", $farble2); $finalCellContents = stripslashes($farble3); switch ($colname) { case record_id: $record_id = $finalCellContents; break; case risd_accession_number: $risd_accession_number = $finalCellContents; break; case uri_accession_number: $uri_accession_number = $finalCellContents; break; case category: $category = $finalCellContents; break; case title: $title = $finalCellContents; break; case date: $date = $finalCellContents; break; case material: $material = $finalCellContents; break; case color: $color = $finalCellContents; break; case technical_information: $technical_information = $finalCellContents; break; case pattern: $pattern = $finalCellContents; break; case measurements: $measurements = $finalCellContents; break; case description: $description = $finalCellContents; break; case label: $label = $finalCellContents; break; case designer: $designer = $finalCellContents; break; case manufacturer: $manufacturer = $finalCellContents; break; case importer: $importer = $finalCellContents; break; case retailer: $retailer = $finalCellContents; break; } } } echo "
RISD Accession No. $risd_accession_number
URI Accession No. $uri_accession_number

Category:

$category

Title:

$title

Date:

$date

Material:

$material

Color:

$color

Technical Information: $technical_information

Pattern:

$pattern

Measurements:

$measurements

Description:

$description


Label:

$label

Designer:

$designer

Manufacturer:

$manufacturer

Importer:

$importer

Retailer:

$retailer

"; echo "

Cataloguing Data for this record

Photo for this record


"; if ($prev_id > 0) { if (strlen($prev_id) == 1) $prev_id = "000" . $prev_id; if (strlen($prev_id) == 2) $prev_id = "00" . $prev_id; if (strlen($prev_id) == 3) $prev_id = "0" . $prev_id; $prev_id = "OB" . $prev_id; echo " << "; } echo "Browse Object Records"; if ($next_id < 4813) { if (strlen($next_id) == 1) $next_id = "000" . $next_id; if (strlen($next_id) == 2) $next_id = "00" . $next_id; if (strlen($next_id) == 3) $next_id = "0" . $next_id; $next_id = "OB" . $next_id; echo " >>"; } echo " Browse Available Photos
"; } } #### end of function display_sql_results #### ## End of all functions ## ########################################################################################### ## Begin body of script ## getSQL(); ## $record is passed on the URL by the user, on an HREF, or through ## another script, e.g.: ## http://mama.stg.brown.edu/projects/tirocchi/database/object_db.php3?record=OB0005 $field = "record_id"; $query = "SELECT * FROM objects WHERE $field='$record'"; ## since (unlike with some DBs) we do not have to sort by client name ## or some other field that is out of order with respect to the primary ## key, here we can just get the next id by temporarily taking off the ## two alphabetic characters from the current id, adding or subtracting ## one for next and prev, and then pasting the "OB" back on. ## $curr_id = substr($record,2); $prev_id = $curr_id-1; $next_id = $curr_id+1; if ($query) { // Execute the SQL query here and display the results $result = runSQLQuery($query); if ($result) { $rows = mysql_num_rows ($result); display_sql_results ($result, $query, $card); } else { err_msg ("MySQL Error", "MySQL Error"); echo "\t

Query = ", $query, "

\n"; $query = ""; } } #################################################################################### ?>