//echo "
"; if(is_string($_GET["ppn"])){ $ppn=(int)$_GET["ppn"]; } if(strpos($_GET["ppn"],"X")>7 OR $_GET["ppn"]==="050259121" OR $_GET["ppn"]==="196857252"){ $ppn=$_GET["ppn"]; } $mongo = new MongoClient("mongodb://mdb01.ppl.nl,mdb02.ppl.nl,mdb03.ppl.nl", array( "username" => 'web', "password" => "RhEb992TQFU[L{ZT]YeqBuyWZ", "replicaSet" => "ppl", "connectTimeoutMS" => 1000 )); $db=$mongo->test; $collection=$db->portraits; $cursor=$collection->find(array('PPN_nr' => $ppn)); $publication=$collection->findOne(array('PPN_nr' => $ppn)); echo "
"; if ($publication["author"]){ echo $publication["author"]; echo ", "; } echo ""; echo $publication["title_of_pub"]; echo " "; echo ", ".$publication["vol_nr"]." "; echo "("; if($publication["place"]){ echo "".$publication["place"]; echo ": "; } if ($publication["publisher_printer"]){ echo $publication["publisher_printer"]; } echo ", "; echo $publication["year_of_pub"]; echo ").
"; echo "Language of publication: "; echo $publication["language_of_pub"]; echo "
"; echo ("You searched or clicked for all scanned images from this publication, we have "); echo $cursor->count(); echo " result(s).
"; while($result=$cursor->getNext()){ echo "
";
//echo "
";
//$ppn=$_GET["ppn"];
//echo is_string($ppn);
if (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
$return_url=$_SERVER['HTTP_REFERER'];
echo " ";
echo ""; if(is_string($_GET["ppn"])){ $ppn=(int)$_GET["ppn"]; } if(strpos($_GET["ppn"],"X")>7 OR $_GET["ppn"]==="050259121" OR $_GET["ppn"]==="196857252"){ $ppn=$_GET["ppn"]; } $mongo = new MongoClient("mongodb://mdb01.ppl.nl,mdb02.ppl.nl,mdb03.ppl.nl", array( "username" => 'web', "password" => "RhEb992TQFU[L{ZT]YeqBuyWZ", "replicaSet" => "ppl", "connectTimeoutMS" => 1000 )); $db=$mongo->test; $collection=$db->portraits; $cursor=$collection->find(array('PPN_nr' => $ppn)); $publication=$collection->findOne(array('PPN_nr' => $ppn)); echo "
"; if ($publication["author"]){ echo $publication["author"]; echo ", "; } echo ""; echo $publication["title_of_pub"]; echo " "; echo ", ".$publication["vol_nr"]." "; echo "("; if($publication["place"]){ echo "".$publication["place"]; echo ": "; } if ($publication["publisher_printer"]){ echo $publication["publisher_printer"]; } echo ", "; echo $publication["year_of_pub"]; echo ").
"; echo "Language of publication: "; echo $publication["language_of_pub"]; echo "
"; echo ("You searched or clicked for all scanned images from this publication, we have "); echo $cursor->count(); echo " result(s).
"; while($result=$cursor->getNext()){ echo "
";
$z++;
$nr=(string)$result["image_nr"];
if(strlen($nr)==1){
$nr="000".$nr;
}
if(strlen($nr)==2){
$nr="00".$nr;
}
if(strlen($nr)==3){
$nr="0".$nr;
}
$ppn=(string)$result["PPN_nr"];
if(strlen($ppn)==8){
$ppn="0".$ppn;
}
if($ppn==="144476584"){
echo "
";
echo "";
echo "
";
echo "";
echo $result["portrait_of"];
echo $result["description"];
}
else{
echo "
";
}
//echo $z%3;
if($z%3==1){
echo "";
echo "";
echo "
";
echo "";
echo $result["portrait_of"];
echo $result["description"];
}
echo "
";
echo "";
echo "
";
echo "";
echo "
";
}
if($z%3==2){
echo "";
echo "
";
}
$tijd=time();
$plaatje=$ppn."_".$nr;
$gebruik=array('ppn'=>$ppn,'tijd'=>$tijd,'ip'=>$ip,'script'=>'all_portraits_search','refer'=>$return_url);
json_encode($gebruik);
$collection_clicked=$db->engravings_use;
$collection_clicked->insert($gebruik);
$mongo->close();
//echo "";
//echo "
";
?>