Exemple #1
0
<?php

include_once "../include.php";
require_once "connect.php";
$f = new sparql("");
$srch = $_GET['srch'];
$query = '
PREFIX ah: <http://purl.org/artsholland/1.0/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
PREFIX osgeo: <http://rdf.opensahara.com/type/geo/>
PREFIX bd: <http://www.bigdata.com/rdf/search#>
PREFIX search: <http://rdf.opensahara.com/search#>
PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
PREFIX gr: <http://purl.org/goodrelations/v1#>
PREFIX gn: <http://www.geonames.org/ontology#>
SELECT ?venue_title ?venue ?event ?date ?production ?production_title
WHERE {
	?venue a ah:Venue ;
		dc:title ?venue_title ;
		ah:locationAddress ?address .	

	?address vcard:locality "Amsterdam" .
	
         print "<INPUT NAME=\"count_files\" TYPE=\"hidden\" value=\"" . count($files) . "\">";
         print "</form>";
         print "<SCRIPT>setTimeout(\"document.afterupload.submit()\",2000);</SCRIPT>";
         break;
     }
     //Si rien n'a été sélectionné on réafiche la page de chargement
     print $form_download_files;
 case 'afterupload':
     $files = unserialize(urldecode($files_post));
     if ($logs_serialize) {
         $logs_imports = unserialize(urldecode($logs_serialize));
     } else {
         $logs_imports = array();
     }
     $file = array_shift($files);
     $p = new sparql();
     $res = $p->load_file($file["location"]);
     if (!$res) {
         $logs_imports[] = array("result" => "ko", "msg" => $msg["ontology_skos_admin_import_error"] . $file["name"]);
     } else {
         $logs_imports[] = array("result" => "ok", "msg" => $res . $msg["ontology_skos_admin_import_ok"] . $file["name"]);
     }
     unlink($file["location"]);
     if (count($files)) {
         echo "<br/><br/><br/>";
         printf($msg["ontology_skos_admin_import_afterupload_files"], count($files), $count_files);
         echo "<br/>";
         print "<form class='form-{$current_module}' METHOD=\"post\"  NAME=\"afterupload\" ACTION=\"import_skos.php\">";
         print "<INPUT NAME=\"categ\" TYPE=\"hidden\" value=\"import\">";
         print "<INPUT NAME=\"sub\" TYPE=\"hidden\" value=\"import_skos\">";
         print "<INPUT NAME=\"action\" TYPE=\"hidden\" value=\"afterupload\">";