Created
June 1, 2017 19:25
-
-
Save amccarty/40be2dfe9410c18903e283080c64975b to your computer and use it in GitHub Desktop.
PHP Notice: Undefined variable: record in /cul/web/fantastic.library.cornell.edu/htdocs/imagerecord.php on line 22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Fantastic... Image Record</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
<link rel="stylesheet" type="text/css" href="css/main.css" /> | |
</head> | |
<body> | |
<?php include("inc/topData.html") ?> | |
<table border="0" cellpadding="0" cellspacing="0" align="center" width="96%"> | |
<tr> | |
<td><table border="0" cellpadding="0" cellspacing="5"> | |
<tr><td colspan=3><p class="pageTitleTwo">Image Record</p> | |
<p class="copyTwo">Click image for enlargement</p></td></tr> | |
<tr><td colspan=3><hr size="1" class="ruleTwo"></td></tr> | |
<?php | |
$rec = (int) $record; //security -- block mysql injection | |
$sql="SELECT * FROM images | |
INNER JOIN topics ON (images.topicID = topics.topicID) | |
INNER JOIN books ON (images.bookID = books.bookID) | |
INNER JOIN authors ON (books.authorID = authors.authorID) | |
INNER JOIN cities ON (books.cityID = cities.cityID) | |
INNER JOIN publishers ON (books.publisherID = publishers.publisherID) | |
INNER JOIN media ON (images.mediumID = media.mediumID) | |
WHERE id = $rec"; | |
$result = @mysql_query($sql); | |
while ( $row = mysql_fetch_array($result) ) { | |
echo("<tr>"); | |
echo("<td rowspan=9><a href=\"imagerecord_l.php?record=" . $row["id"] . "\">"); | |
echo("<img src=\"dbgfx/300/" . $row["imageID"] . ".jpg\" border=0></a></td>"); | |
echo("<td class=\"formLabel2\">ID</td>"); | |
echo("<td>" . $row["imageID"] . "</td>"); | |
echo("</tr>"); | |
echo("<tr>"); | |
echo("<td class=\"formLabel2\">Title</td>"); | |
echo("<td>" . $row["imageName"] . "</td>"); | |
echo("</tr>"); | |
echo("<tr>"); | |
echo("<td class=\"formLabel2\">Medium</td>"); | |
echo("<td>" . $row["mediumName"] . "</td>"); | |
echo("</tr>"); | |
echo("<tr>"); | |
echo("<td class=\"formLabel2\">Book</td>"); | |
echo("<td>" . $row["authorName"] . ". "); | |
echo("<a href=\"bookrecord.php?record=" . $row["bookID"] . "\">" . $row["title"] . ".</a> "); | |
echo $row["cityName"]; | |
echo(" : "); | |
echo $row["publisherName"]; | |
echo(", "); | |
echo $row["year"]; | |
if ($row["page"] != "") { | |
echo(". Page "); | |
echo $row["page"]; | |
} | |
if ($row["plate"] != "") { | |
echo(", Plate "); | |
echo $row["plate"]; | |
} | |
echo(".</tr>"); | |
echo("<tr>"); | |
echo("<td class=\"formLabel2\">Notes</td>"); | |
echo("<td>"); | |
if ($row["addlNotes"] != "") { | |
echo $row["addlNotes"]; | |
echo(". "); | |
} | |
if ($row["curator"] != "") { | |
echo $row["curator"]; | |
} | |
echo("</td>"); | |
echo("</tr>"); | |
echo("<tr>"); | |
echo("<td class=\"formLabel2\">Theme</td>"); | |
echo("<td>" . $row["topicName"] . "</td>"); | |
echo("</tr>"); | |
echo("<tr>"); | |
echo("<td class=\"formLabel2\">Subjects</td>"); | |
echo("<td>"); | |
$newID = $row["imageID"]; | |
$result2 = @mysql_query("SELECT * FROM imagesubjects | |
INNER JOIN subjects ON (imagesubjects.subjectID = subjects.subjectID) | |
WHERE imagesubjects.imageID = '$newID'"); | |
$num_rows = mysql_num_rows($result2); | |
$i = 0; | |
while ( $row2 = mysql_fetch_array($result2) ) { | |
echo $row2["subjectName"]; | |
if ( ++$i < $num_rows ) { | |
echo (", "); | |
} | |
} | |
echo("</td></tr>"); | |
echo("<tr><td colspan=2> <br> </td></tr>"); | |
echo("<tr><td colspan=2> <br> </td></tr>"); | |
echo("<tr><td colspan=3><hr size=\"1\" class=\"ruleTwo\"></td></tr>"); | |
} | |
?> | |
</table></td> | |
</tr> | |
</table> | |
<?php include("inc/bottom.html") ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment