<?php # TemaTres : aplicaci�n para la gesti�n de lenguajes documentales # # # # # Copyright (C) 2004-2008 Diego Ferreyra tematres@r020.com.ar # Distribuido bajo Licencia GNU Public License, versi�n 2 (de junio de 1.991) Free Software Foundation # ############################################################################################################### # include "config.tematres.php"; if ($_GET[zthesTema]) { echo do_zthes(do_nodo_zthes($_GET[zthesTema])); } elseif ($_GET[skosTema]) { echo do_skos(do_nodo_skos($_GET[skosTema])); } elseif ($_GET[bs8723Tema]) { echo do_BS8723s(do_nodo_BS8723($_GET[bs8723Tema])); } elseif ($_GET[madsTema]) { echo do_mads($_GET[madsTema]); } elseif ($_GET[xtmTema]) { return do_topicMap($_GET[xtmTema]); } elseif ($_GET[dcTema]) { return do_dublin_core($_GET[dcTema]); } elseif ($_GET[rss]) { return do_rss(); } if ($_SESSION[$_SESSION["CFGURL"]][ssuser_nivel] == '1' && $_GET[dis]) { switch ($_GET[dis]) { case 'zline': return doTotalZthes("line"); break; case 'zfile':
function doTotalBS8723($tipoEnvio) { $time_start = time(); @set_time_limit(900); switch ($tipoEnvio) { #enviar como archivo case 'file': header('content-type: text/xml'); $xml .= '<?xml version="1.0" encoding="ISO-8859-1"?>'; $xml .= '<Thesaurus xmlns="http://schemas.bs8723.org/XmlSchema/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:eGMS="http://www.govtalk.gov.uk/CM/gms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.bs8723.org/XmlSchema/DD8723-5.xsd">'; $xml .= ' <dc:identifier>' . $_URI_BASE_ID . '</dc:identifier>'; $xml .= ' <dc:title>' . xmlentities($_SESSION[CFGTitulo]) . '</dc:title>'; $xml .= ' <dc:creator>' . xmlentities($_SESSION[CFGAutor]) . '</dc:creator>'; $xml .= ' <dc:subject>' . xmlentities($_SESSION[CFGKeywords]) . '</dc:subject>'; $xml .= ' <dc:description>' . xmlentities($_SESSION[CFGCobertura], true) . '</dc:description>'; $xml .= ' <dc:publisher>' . xmlentities($_SESSION[CFGAutor]) . '</dc:publisher>'; $xml .= ' <dc:date>' . xmlentities($_SESSION[CFGCreacion]) . '</dc:date>'; $xml .= ' <dc:language>' . LANG . '</dc:language>'; // consulta muy costosa //$sql=SQLIdTerminosValidos(); // consulta menos costosa $sql = SQLIdTerminosIndice(); while ($array = mysqli_fetch_row($sql[datos])) { $time_now = time(); if ($time_start >= $time_now + 10) { $time_start = $time_now; header('X-pmaPing: Pong'); } $xml .= do_nodo_BS8723($array[0], "TRUE"); } $xml .= '</Thesaurus>'; $filname = string2url($_SESSION[CFGTitulo]) . '_BS8723.xml'; sendFile("{$xml}", "{$filname}"); break; } }