0)){ $itemData = mysql_fetch_assoc($result); $itemData['orig_id'] = $itemData['id']; unset($itemData['id']); $queryString = "INSERT INTO removed (removedOn,removedBy,removedComment,"; $queryString.= implode(',', array_keys($itemData)); $username = getUsername(); $queryString.= ") VALUES (NOW(), '$username', '$comment', '"; $queryString.= implode("','", array_values($itemData)); $queryString.= "')"; if(mysql_query($queryString,$db)){ $queryString = "DELETE FROM $mediaType WHERE id='$id'"; mysql_query($queryString,$db); dispSuccess($itemData['title']." removed from site. Record of removal is stored in database."); } else { dispError("Error with query:
$queryString

".mysql_error()); } } } } } } // end processRemove() //// // Displays the form to easily remove an item from the database. //// function dispRemove(){ print "\n"; print "\n"; print "
Remove an item
\n"; print "If an artist has requested that an object be removed for copyright reasons (or just their preference) then use "; print "this form to remove the item.

\n"; print "
\n"; print "\n"; print "Movies:
\n"; selectMedia('movies'); print "Pictures:
\n"; selectMedia('pictures'); print "Games:
\n"; selectMedia('games'); print "Flash:
\n"; selectMedia('flash'); print "Why is this item being removed?
\n"; print "
\n"; print "\n"; print "
\n"; print "
\n"; } // end dispRemove() //// // Displays a select-box for the type of media passed in. //// function selectMedia($mediaType){ include 'connect.php'; $queryString = "SELECT title,id FROM $mediaType ORDER BY title"; print "
\n"; } // end selectMedia() ?>