"; } ?>
$sortBy, 'direction' => SORT_ASC); $order5[] = array('field' => 'Title', 'direction' => SORT_ASC); $sort=array('fields' => $fields, 'direction' => SORT_ASC, 'byProject' => false); if(isset($_GET['language'])) { $subject = $_GET['language']; $subject = htmlspecialchars(str_replace("'", "%", $subject)); $query = new KORA_Clause("Subject", "IN", $subject); } else if(isset($_GET['archive'])) { $subject = str_replace(' ' , '%', $_GET['archive']); //if(strstr($subject, "sngal")) $subject = str_replace('sngal' , '%', $subject); //if(strstr($subject, "asantehenes")) $subject = str_replace('asantehenes' , '%', $subject); $subject = htmlspecialchars(str_replace("'", "%", $subject)); $query = new KORA_Clause("Subject", "IN", $subject); } else { $query = new KORA_Clause("KID", "!=", ""); } $obj = MPF_Search(token, $projIDs, $subDescripIDs, $query, $fields, $sort); //do not display these controls for for the Images page or the landing pages for Interviews or Documents if(!empty($obj) && $pageType!="Images" && !$landingPage) { foreach($obj as $value) { if(!empty($value['Title'])) { echo '

'.$value['Title'].'

'; } if(!empty($value['Description'])) { echo $value['Description'].'
'; } echo "
"; } } } $fields = array('Title', 'Date Original', 'Date Range', 'Thumbnail', 'Image', 'Image Gallery', 'Description', 'Language', 'Object Type', 'Object Associator', 'Creditline'); $order6[] = array('field' => 'Date Original', 'direction' => SORT_ASC); $order6[] = array('field' => 'Title', 'direction' => SORT_ASC); $sort=array('fields' => array('Date Original', 'Title'), 'direction' => SORT_ASC, 'byProject' => false); if(isset($_GET['language'])) { $language = $_GET['language']; $language = htmlspecialchars(str_replace("'", "%", $language)); $query = new KORA_Clause("Language", "IN", $language); } else if(isset($_GET['archive'])) { $subject = str_replace(' ' , '%', $_GET['archive']); //if(strstr($subject, "sngal")) $subject = str_replace('sngal' , '%', $subject); //if(strstr($subject, "asantehenes")) $subject = str_replace('asantehenes' , '%', $subject); $subject = htmlspecialchars(str_replace("'", "%", $subject)); $query = new KORA_Clause("Archive", "IN", $subject); } else { $query = new KORA_Clause("KID", "!=", ""); } //do not include "Preset" data from KORA $query2 = new KORA_Clause('Title', 'NOT LIKE', '%preset%'); $query3 = joinKORAClauses(array($query, $query2), "AND"); $query4= new KORA_Clause("KID", "!=", ""); //searching only for BABAs $obj = KORA_Search(token, $projID, $objID, $query3, $fields, $sort); //get record associator from essays in baba $assoc = KORA_Search(token, $projID, $essayID, $query4,'Object Associator',array()); $objassoc=array(); //get all record assocciated but no duplicated. foreach($assoc as $ass){ foreach($ass['Object Associator'] as $a){ $objassoc[$a]=$a; } } foreach($objassoc as $obj2){ $query = new KORA_Clause('KID', '=', $obj2); $fields = array('Title', 'Date Original', 'Date Range', 'Thumbnail', 'Image', 'Image Gallery', 'Description', 'Language', 'Object Type', 'Object Associator', 'Creditline'); $order6[] = array('field' => 'Date Original', 'direction' => SORT_ASC); $order6[] = array('field' => 'Title', 'direction' => SORT_ASC); $sort=array('fields' => array('Date Original', 'Title'), 'direction' => SORT_ASC, 'byProject' => false); $rec = MPF_Search(token, $projIDs, $objIDs, $query, $fields, $sort); $obj[$obj2]=$rec[$obj2]; } if(isset($obj) && !empty($obj)) { //Display page, each conditional is a pageType if ($pageType == 'Interviews') { $i = 0; foreach($obj as $value) { ?>
'; } else { echo '
'; } } else echo '
'; $i++; if (!empty($value['Thumbnail']['localName'])) //100px wide { $thumbWidth = 120; $thumbHeight = 300; // Get thumb from KORA echo ''.htmlChars($value['Title']).'
'; } if (!empty($value['Image'])) //link to full object record { $thumbWidth = 120; $thumbHeight = 300; echo ''.htmlChars($value['Title']).''; echo "
"; } if(is_array($value['Date Original'])) { echo 'Date: '.formatDate($value['Date Original']['month'], $value['Date Original']['day'], $value['Date Original']['year']).'
'; } else if(is_array($value['Date Range'])) { echo "Date Range: ".$value['Date Range'].'
'; } ?>
'.$value['Title'].''; } if(!empty($value['Description'])) { echo fixTags($value['Description']).'
'; } echo "
"; } } }//end Interviews else if ($pageType == 'Documents') { foreach($obj as $value) { if(!empty($value['Object Type']) && $value['Object Type'] == "Document") { // echo "
";
//				print_r($value);
			if(!empty($value['Title']))
			{
				echo '

'.$value['Title'].'

'; } if(is_array($value['Date Original'])) { echo 'Date: '.formatDate($value['Date Original']['month'], $value['Date Original']['day'], $value['Date Original']['year']).'
'; } else if(is_array($value['Date Range'])) { echo "Date Range: ".$value['Date Range'][0].'
'; } if (!empty($value['Thumbnail']['localName'])) //100px wide { $thumbWidth = 100; $thumbHeight = 300; // Get thumb from KORA echo ''.htmlChars($value['Title']).'
'; } // // if (!empty($value['Image'])) //link to full object record // { // $thumbWidth = 100; // $thumbHeight = 300; // echo ''.htmlChars($value['Title']).''; // echo "
"; // } if(!empty($value['Description'])) { echo fixTags($value['Description']).'
'; } echo "
"; } } }//end Documents else if ($pageType == 'Images') { echo ''; $i = 0; $imageGroupNo = 0; $imageHeader = false; foreach($obj as $value) { //Images section if(!$imageHeader) { echo ''; $imageHeader = true; } if(!empty($value['Object Type']) && $value['Object Type'] == "Image" && $value['Image Gallery'] != 'True' ) { // At the start of each 3 associated objects, start a new row if ($i == 0) { echo "\n"; } echo ''; // At the end of each n associated objects, end the row if ($i == (objectsToDisplayInARowFull - 1)) { echo ''; } // Increment the counter, modulo the number of objects in a row $i++; $imageGroupNo++; $i %= objectsToDisplayInARowFull; } } //end single images //if the row has less then n associated objects, the row is now closed by the above loop, causing validation errors. // if so, end row here for validation if($i < (objectsToDisplayInARowFull) && $i!=0) { echo ''; } echo '
'; if(!empty($value['Title'])) { if (!empty($value['Image'])) { $thumbWidth = 1500; $thumbHeight = 1500; //highslide display for SINGLE image echo '
'; echo ' '.htmlspecialchars(htmlChars($value['Title'])).'
'.$value['Title'].'
'; //echo '
'; echo '
'; $imageGroupNo++; } } if(!empty($value['Title'])) { if(!empty($value['Image'])) { echo ''.$value['Title'].'
'.htmlChars($value['Title']).'
View Full Record
'. //formatDate($value['Date Original']['month'], $value['Date Original']['day'], $value['Date Original']['year']).'
//'.$value['Description'].'
//'.$value['Creditline']. '

'; $imageGroupNo++; } else //no image, so title cannot link to highslide { echo ''.$value['Title'].'
'; } } if(!empty($value['Date Original'])) { echo 'Date: '.formatDate($value['Date Original']['month'], $value['Date Original']['day'], $value['Date Original']['year']).''; } else if(!empty($value['Date Range'])) { echo 'Date Range: '.$value['Date Range'][0]; } echo '
'; }//end Images } echo '
'; ?>