header("Content-type: text/html; charset=UTF-8");
include("php_header.php");
?>
OBJECTS OF MEDIA STUDIES
// authors
$objectsFieldsArray = $objectsValueArray = array ();
$result = mysql_query("SHOW COLUMNS FROM objects");
while ($result && $row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$objectsFieldsArray[] = $row['Field'];
}
$result = mysql_query("SELECT * FROM objects ORDER BY objectPk ASC");
while ($result && $row = mysql_fetch_array($result)) {
$rowValueArray = array();
foreach($objectsFieldsArray AS $field) {
if (!is_numeric($row[$field])) $rowValueArray[] = $row[$field];
}
$rowValue = implode(" ", $rowValueArray);
$objectsValueArray[] = $rowValue;
}
// biblio text
$result = mysql_query("SELECT * FROM text WHERE textID = 'bib' ORDER BY textPk DESC LIMIT 1");
if ($result && $row = mysql_fetch_array($result)) {
$text_content = trim($row['text_content']);
$text_content = str_replace("\n", " ", $text_content);
$text_content = str_replace("\r", " ", $text_content);
if (!empty($text_content)) echo ''.$text_content.'
'."\n";
}
if (!empty($objectsValueArray)) echo ''.implode("; ", $objectsValueArray).'
'."\n";
?>