예제 #1
0
$direccion = $_GET['direccion_us'];
$telefono = $_GET['telefono_us'];
$correo = $_GET['mail_us'];
if (empty($Radicado)) {
    header("Location: ../pqr/index.php");
}
if ($Radicado != '') {
    $smarty->assign('radicado', $Radicado);
}
$fecha1 = time();
$fecha = FechaFormateada($fecha1);
/*
*Se pasan las variables a la pagina salida_radicado.tpl
*por medio del template
**/
$tipodoc = makeLabel($db, $tdoc);
$tdoc = $tipodoc->fields["SGD_PQR_LABEL"];
$ubica = nom_muni_dpto($muni, $dep, $db);
while (!$ubica->EOF) {
    $municip = $ubica->fields["MUNI_NOMB"];
    $departa = $ubica->fields["DPTO_NOMB"];
    $ubica->MoveNext();
}
$numradicado = $Radicado;
$nombre = $grbNombresUs2 . " " . $apell;
$lugar = $municip . " - " . $departa;
//variables para generar el pdf con l no olvidar \n para dividir filas
$remitente = "Señores\nDepartamento Nacional de Planeación\nCalle 26 # 13 – 19\nTel: 381 50 00\n ";
$referencia = "REFERENCIA: {$tdoc} DESDE LA PAGINA WEB DEL DEPARTAMENTO NACIONAL DE PLANEACIÓN";
$contenido = "Cordial saludo,\nEsta petición se realiza con el siguiente motivo:";
$mensaje = "Atentamente";
function addTypePropertyTypeCount()
{
    global $options;
    $sparql = "SELECT ?p \n" . $options['from-graph'] . " \n\t  { ?s ?p ?o FILTER (!isLiteral(?o)) }\n\t  GROUP BY ?p\n";
    $r = query($sparql);
    foreach ($r as $c) {
        $p = $c->p->value;
        $sparql = "SELECT \n\t\tdistinct ?stype (str(?stype_label) AS ?stype_label) (?sn AS ?sn) (?dsn AS ?dsn) \n\t\t?p (str(?plabel) AS ?plabel) \n\t\t?otype (str(?otype_label) AS ?otype_label) (?on AS ?on) (?don AS ?don)\n\t" . $options['from-graph'] . " \n{\n\t{\n\t\tSELECT distinct ?stype ?p ?otype (COUNT(?s) AS ?sn) (COUNT(DISTINCT ?s) AS ?dsn) (COUNT(?o) AS ?on) (COUNT(DISTINCT ?o) AS ?don)\n\t\t{\n\t\t\t?s ?p ?o . \n\t\t\t?s a ?stype .\n\t\t\t?o a ?otype .\n\t\t\tFILTER(?p = <{$p}>)\n\t\t}\n\t\tGROUP BY ?p ?stype ?otype \n\t}\n\tOPTIONAL {?stype rdfs:label ?stype_label} \n\tOPTIONAL {?p rdfs:label ?plabel} \n\tOPTIONAL {?otype rdfs:label ?otype_label} \n}\n";
        $r = query($sparql);
        foreach ($r as $c) {
            $id = getID($c);
            $sid = getID($c);
            $oid = getID($c);
            $label = $c->sn->value . " (" . $c->dsn->value . " unique) " . makeLabel($c, 'stype', 'stype_label') . " linked by property " . makeLabel($c, 'p', 'plabel') . " to " . $c->on->value . " (" . $c->don->value . " unique) " . makeLabel($c, 'otype', 'otype_label') . " in " . $options['dataset_name'];
            write(Quad($options['uri'], "http://rdfs.org/ns/void#subset", $id) . Quad($id, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://rdfs.org/ns/void#LinkSet") . Quad($id, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Type-Property-Type-Count") . QuadLiteral($id, "http://www.w3.org/2000/01/rdf-schema#label", $label, null, "en") . Quad($id, "http://rdfs.org/ns/void#linkPredicate", $c->p->value) . (isset($c->plabel) ? QuadLiteral($c->p->value, "http://www.w3.org/2000/01/rdf-schema#label", $c->plabel->value) : '') . Quad($id, "http://rdfs.org/ns/void#subjectsTarget", $sid) . Quad($sid, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Subject-Count") . Quad($sid, "http://rdfs.org/ns/void#class", $c->stype->value) . (isset($c->stype_label) ? QuadLiteral($c->stype->value, "http://www.w3.org/2000/01/rdf-schema#label", $c->stype_label->value) : '') . QuadLiteral($sid, "http://rdfs.org/ns/void#entities", $c->sn->value, "long") . QuadLiteral($sid, "http://rdfs.org/ns/void#distinctEntities", $c->dsn->value, "long") . Quad($id, "http://rdfs.org/ns/void#objectsTarget", $oid) . Quad($oid, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Object-Count") . Quad($oid, "http://rdfs.org/ns/void#class", $c->otype->value) . (isset($c->otype_label) ? QuadLiteral($c->otype->value, "http://www.w3.org/2000/01/rdf-schema#label", $c->otype_label->value) : '') . QuadLiteral($oid, "http://rdfs.org/ns/void#entities", $c->on->value, "long") . QuadLiteral($oid, "http://rdfs.org/ns/void#distinctEntities", $c->don->value, "long") . Quad("http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Type-Property-Type-Count", "http://www.w3.org/2000/01/rdf-schema#subClassOf", "http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Descriptor") . Quad("http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Subject-Count", "http://www.w3.org/2000/01/rdf-schema#subClassOf", "http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Descriptor") . Quad("http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Object-Count", "http://www.w3.org/2000/01/rdf-schema#subClassOf", "http://bio2rdf.org/bio2rdf.dataset_vocabulary:Dataset-Descriptor"));
        }
    }
    // foreach property
}