Ejemplo n.º 1
0
$url = null;
if (isset($_REQUEST['url_metadata'])) {
    $url = $_REQUEST['url_metadata'];
} else {
    if (isset($_REQUEST['id'])) {
        $url = "http://" . $GLOBALS['apps_config']['geonetwork']['host'] . "/geonetwork/srv/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&outputSchema=csw:IsoRecord&ID={$_REQUEST['id']}&elementSetName=full";
    }
}
if (isset($url)) {
    $parseUrl = parse_url($_SERVER['REQUEST_URI']);
    $base = dirname($parseUrl['path']);
    $xml = curl_file_get_contents($url);
    if (isset($_REQUEST['full'])) {
        $GLOBALS['data'] = transform($xml, fopen_file_get_contents("./xsl/bs_full.xsl"));
    } else {
        $GLOBALS['data'] = transform($xml, fopen_file_get_contents("./xsl/bs_full.xsl"));
    }
    $GLOBALS['data'] = str_replace("{base}", $base, $GLOBALS['data']);
    //IncrementPopularity($_REQUEST['id']);
}
?>
<!DOCTYPE HTML>
<html xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<?php 
echo $base;
?>
/inc/css/reset.css" type="text/css">
Ejemplo n.º 2
0
 /**
  * Utilis� pour remplacer readfile
  * @param string $cheminFichier Chemin vers le fichier � lire
  */
 function fopen_readfile($cheminFichier)
 {
     echo fopen_file_get_contents($cheminFichier);
 }