Search
[insert_php]
//Selected attributes of the HTML FORM
if(isset($_POST[‘search’])){
$seachedFor = $_POST[‘query’];
$europeanaChecked = europeanaIsSelected($_POST[‘europeana’]);
$googleChecked = googleIsSelected($_POST[‘google’]);
}else{
$htmlChecked = ‘checked’;
$googleChecked = ‘checked’;
$europeanaChecked = ‘checked’;
}
function europeanaIsSelected ($a){
$r = “”;
if(!empty($a)){ $r=”checked”;}
return $r;
}
function googleIsSelected ($a){
$r = “”;
if(!empty($a)){ $r=”checked”;}
return $r;
}
[/insert_php]
Search in Synthesis Database
Search for a Word
Cultural Objects |
[insert_php]
if(isset($_POST[‘search’])){
if(!empty($_POST[‘query’])){
$query = str_replace(” “,”+”,$_POST[‘query’]);
if(isset($_POST[‘europeana’])){
echo ‘
Europeana Results
‘;
$euro=file_get_contents(‘http://’.$_SERVER[‘HTTP_HOST’].’/portal/services/search/europeanaCall.php?query=’.$query);
echo $euro.”
“;
}
if(isset($_POST[‘google’])){
echo ‘
Google Results
‘;
$google=file_get_contents(‘http://’.$_SERVER[‘HTTP_HOST’].’/portal/services/search/googleCall.php?query=’.rawurlencode($query));
echo $google.”
“;
}
}
}
[/insert_php]
[insert_php]
if (isset($_POST[‘submit’])) {
$searchword4=$_POST[‘pcreator’];
$searchword5=$_POST[‘type’];
$searchword6=$_POST[‘place’];
$searchword7=$_POST[‘material’];
$searchword8=$_POST[‘technique’];
$searchword9=$_POST[‘ccyear’];
$searchword10=$_POST[‘Label1’];
$searchword11=$_POST[‘collection’];
$Synthesis=file_get_contents(‘http://’.$_SERVER[‘HTTP_HOST’].’/portal/DbSearchEn.php?pcreator=’.$searchword4.’&΄type=’.rawurlencode($searchword5).’&place=’.rawurlencode($searchword6).’&material=’.rawurlencode($searchword7).’&collection=’.rawurlencode($searchword11).’&ccyear=’.urlencode($searchword9));
echo “
Search Results
“;
echo $Synthesis.”
“; }
[/insert_php]
[insert_php]
if (isset($_POST[‘submit2’])) {
$searchword=$_POST[‘age_range’];
$searchword1=$_POST[‘lesson’];
$Synthesis=file_get_contents(‘http://’.$_SERVER[‘HTTP_HOST’].’/portal/Mathisiaka.php?age_range=’.$searchword.’&lesson=’.$searchword1);
echo “
Search Results
“;
echo $Synthesis.”
“; }
[/insert_php]
[insert_php]
if (isset($_POST[‘submit3’])) {
$searchword=$_POST[‘lend’];
$searchword1=$_POST[‘interferenceyear’];
$searchword2=$_POST[‘acquitiontype’];
$searchword3=$_POST[‘iidentifier’];
$Synthesis=file_get_contents(‘http://’.$_SERVER[‘HTTP_HOST’].’/portal/mouseio.php?lend=’.$searchword.’&interferenceyear=’.$searchword1.’&acquitiontype=’.$searchword2.’&iidentifier=’.urlencode($searchword3));
echo “
Search Results
“;
echo $Synthesis.”
“; }
[/insert_php]
[insert_php]
if (isset($_POST[‘submit4’])) {
$searchword=$_POST[‘key_word’];
$Synthesis2=file_get_contents(‘http://’.$_SERVER[‘HTTP_HOST’].’/portal/FullSearch2En.php?key_word=’.urlencode($searchword));
echo “
Search Results
“;
echo $Synthesis2.”
“; }
[/insert_php]