function do_meta_tag($arrayTermino = "")
{
    global $CFG;
    //Si hay algún tema de proveniente de algún proceso
    global $tema;
    //Si hay cambio de idioma... para que no dé duplicado
    $labelChangeLang = $_GET[setLang] ? '. ' . ucfirst($_SESSION[$_SESSION["CFGURL"]][lang][0]) : '';
    $ARRAYfetchValues = ARRAYfetchValues('METADATA');
    $_SESSION["CFGContributor"] = $ARRAYfetchValues["dc:contributor"]["value"];
    $_SESSION["CFGRights"] = $ARRAYfetchValues["dc:rights"]["value"];
    $_SESSION["CFGPublisher"] = $ARRAYfetchValues["dc:publisher"]["value"];
    $_SESSION["CFGlastMod"] = fetchlastMod();
    if (secure_data($tema, "digit")) {
        //Si hay tema_id desde GET o POST
        $tema_id = $_POST[tema] ? secure_data($_POST[tema], "digit") : secure_data($_GET[tema], "digit");
        //Si hay tema_id desde algún proceso
        $tema_id = $tema ? $tema : $tema_id;
    }
    $letra = isValidLetter($_GET[letra]);
    if (secure_data($tema_id, "digit")) {
        $ARRAYdatosTermino = ARRAYverDatosTermino(secure_data($tema_id, "digit"));
        $sub_title = '; ' . xmlentities($ARRAYdatosTermino[titTema]);
        $ver_sub_title = xmlentities($ARRAYdatosTermino[titTema]) . ' - ';
        $relMeta = '<link rel="Dublin Core metadata" type="application/xml" href="xml.php?dcTema=' . $ARRAYdatosTermino[idTema] . '" title="Dublin Core ' . xmlentities($datosTermino[titTema]) . '" />';
        $relMeta .= '<link rel="MADS metadata" type="application/xml" href="xml.php?madsTema=' . $ARRAYdatosTermino[idTema] . '" title="MADS ' . xmlentities($datosTermino[titTema]) . '" />';
        $relMeta .= '<link rel="Zthes metadata" type="application/xml" href="xml.php?zthesTema=' . $ARRAYdatosTermino[idTema] . '" title="Zthes ' . xmlentities($datosTermino[titTema]) . '" />';
        $relMeta .= '<link rel="Skos metadata" type="application/rdf+xml" href="xml.php?skosTema=' . $ARRAYdatosTermino[idTema] . '" title="Skos Core ' . xmlentities($datosTermino[titTema]) . '" />';
        $relMeta .= '<link rel="TopicMap metadata" type="application/xml" href="xml.php?xtmTema=' . $ARRAYdatosTermino[idTema] . '" title="TopicMap ' . xmlentities($datosTermino[titTema]) . '" />';
    } elseif (strlen($letra) > 0) {
        $sub_title = '; ' . MSG_ResultLetra . ' ' . xmlentities($letra);
        $ver_sub_title = ' :: ' . MENU_ListaAbc . ': ' . xmlentities($letra);
    }
    $meta_tag = '<title>' . xmlentities($ver_sub_title . ' ' . $_SESSION[CFGTitulo] . $labelChangeLang) . '</title>';
    /*
    * Error en verificación
    $meta_tag.='<meta http-equiv="content-language" content="'.LANG.'" />';
    */
    $page_encode = in_array($CFG["_CHAR_ENCODE"], array('utf-8', 'iso-8859-1')) ? $CFG["_CHAR_ENCODE"] : 'utf-8';
    header('Content-type: text/html; charset=' . $page_encode . '');
    $meta_tag .= '<meta http-equiv="content-type" content="application/xhtml+xml; charset=' . $page_encode . '" />';
    $meta_tag .= '<meta name="generator" content="' . xmlentities($_SESSION[CFGVersion]) . '" />';
    $meta_tag .= '<meta name="description" content="' . html2txt($ver_sub_title . $_SESSION[CFGCobertura] . $labelChangeLang) . '" />';
    $meta_tag .= '<meta name="keywords" content="' . xmlentities($_SESSION[CFGKeywords] . $sub_title . $labelChangeLang) . '" />';
    $meta_tag .= '<meta name="author" content="' . xmlentities($_SESSION[CFGAutor]) . '" />';
    $meta_tag .= '<meta name="Creation_Date" content="' . $_SESSION[CFGCreacion] . '" />';
    $meta_tag .= '<meta http-equiv="last-modified" content="' . $_SESSION["CFGlastMod"] . '" />';
    $meta_tag .= '<meta name="robots" content="index, follow" />';
    $meta_tag .= '<meta name="revisit-after" content="15 days" />';
    //$meta_tag.='<!-- Dublin Core -->';
    $meta_tag .= '<meta name="DC.Title"        content="' . xmlentities($ver_sub_title . ' ' . $_SESSION[CFGTitulo]) . '" />';
    $meta_tag .= '<meta name="DC.Creator"      content="' . xmlentities($_SESSION[CFGAutor]) . '" />';
    $meta_tag .= '<meta name="DC.Subject"      content="' . xmlentities($_SESSION[CFGKeywords] . $sub_title) . '" />';
    $meta_tag .= '<meta name="DC.Description"  content="' . html2txt($ver_sub_title . $_SESSION[CFGCobertura], true) . '" />';
    $meta_tag .= '<meta name="DC.Publisher"    content="' . xmlentities($_SESSION[CFGPublisher]) . '" />';
    $meta_tag .= '<meta name="DC.Contributor"    content="' . xmlentities($_SESSION[CFGContributor]) . '" />';
    $meta_tag .= '<meta name="DC.Rights"    content="' . xmlentities($_SESSION[CFGRights]) . '" />';
    $meta_tag .= '<meta name="DC.Date"         content="' . $_SESSION[CFGCreacion] . '" />';
    $meta_tag .= '<meta name="DC.Language"     content="' . LANG . '" />';
    $meta_tag .= '<link rel="' . MENU_Inicio . '" href="' . $_SESSION[CFGURL] . 'index.php" title="' . MENU_Inicio . '" />';
    $meta_tag .= '<link rel="' . MENU_ListaSis . '" href="' . $_SESSION[CFGURL] . 'index.php" title="' . MENU_ListaSis . '" />';
    $meta_tag .= '<link rel="' . MENU_ListaAbc . '" href="' . $_SESSION[CFGURL] . 'index.php?letra=?" title="' . MENU_ListaAbc . '" />';
    $meta_tag .= '<link rel="' . MENU_Sobre . '" href="' . $_SESSION[CFGURL] . 'sobre.php" title="' . MENU_Sobre . '" />';
    $meta_tag .= '<link rel="help" href="' . $_SESSION[CFGURL] . 'sobre.php" title="' . MENU_Sobre . '" />';
    $meta_tag .= '<link rel="login" href="' . $_SESSION[CFGURL] . 'login.php" title="' . LABEL_login . '" />';
    $meta_tag .= '<link rel="service" href="' . $_SESSION[CFGURL] . 'services.php" title="terminogical web services" />';
    $meta_tag .= '<link rel="bookmark" href="' . $_SESSION[CFGURL] . '"/>';
    $meta_tag .= '<link rel="rss" type="application/rss+xml" href="xml.php?rss=true" title="RSS ' . xmlentities($_SESSION[CFGTitulo]) . '" />';
    $meta_tag .= '<link rel="alternate" type="application/rss+xml" href="xml.php?rss=true" title="RSS ' . xmlentities($_SESSION[CFGTitulo]) . '" />';
    $meta_tag .= $relMeta;
    return array("metadata" => $meta_tag, "arraydata" => $ARRAYdatosTermino);
}
 function fetchVocabularyData($vocabulary_id)
 {
     $sql = SQLdatosVocabulario($vocabulary_id);
     $array = $sql->FetchRow();
     $arrayResponse["result"][vocabulary_id] = $array[vocabulario_id];
     $arrayResponse["result"][title] = $array[titulo];
     $arrayResponse["result"][author] = $array[autor];
     $arrayResponse["result"][lang] = $array[idioma];
     $arrayResponse["result"][scope] = $array[cobertura];
     $arrayResponse["result"][keywords] = $array[keywords];
     $arrayResponse["result"][uri] = $array[url_base];
     $arrayResponse["result"][createDate] = $array[cuando];
     $arrayResponse["result"][lastMod] = fetchlastMod();
     $ARRAYfetchValues = ARRAYfetchValues('METADATA');
     $ARRAYfetchContactMail = ARRAYfetchValue('CONTACT_MAIL');
     $arrayResponse["result"]["contributor"] = $ARRAYfetchValues["dc:contributor"]["value"];
     $arrayResponse["result"]["adminEmail"] = $ARRAYfetchContactMail["value"];
     $arrayResponse["result"]["publisher"] = $ARRAYfetchValues["dc:publisher"]["value"];
     $arrayResponse["result"]["rights"] = $ARRAYfetchValues["dc:rights"]["value"];
     $cant_term = ARRAYcantTerms4Thes("1");
     $arrayResponse["result"]["cant_terms"] = $cant_term["cant"];
     return $arrayResponse;
 }
$arrayLang = array();
foreach ($CFG["ISO639-1"] as $langs) {
    array_push($arrayLang, "{$langs['0']}#{$langs['1']}");
}
$si = LABEL_SI;
$no = LABEL_NO;
if ($_GET[vocabulario_id] > 0) {
    $sql_vocabulario = SQLdatosVocabulario($_GET[vocabulario_id]);
    $array_vocabulario = $sql_vocabulario->FetchRow();
    $fecha_crea = do_fecha($array_vocabulario[cuando]);
} else {
    $array_vocabulario[vocabulario_id] = 'NEW';
}
if ($array_vocabulario[vocabulario_id] == 1) {
    $titulo_formulario = LABEL_vocabulario_principal;
    $ARRAYfetchValues = ARRAYfetchValues('METADATA');
} else {
    $titulo_formulario = LABEL_vocabulario_referencia;
}
$array_ano = do_intervalDate("1998", date(Y), FORM_LABEL_FechaAno);
$array_dia = do_intervalDate("1", "31", FORM_LABEL_FechaDia);
$array_mes = do_intervalDate("1", "12", FORM_LABEL_FechaMes);
$rows .= '<form role="form" id="config-vocab" name="abm_config"  data-toggle="validator" action="admin.php" method="post">';
$rows .= '	<div class="row">
		<div class="col-sm-12">
				<legend><a href="admin.php" title="' . ucfirst(LABEL_lcConfig) . ' ' . $titulo_formulario . '">' . ucfirst(LABEL_lcConfig) . '</a> &middot;  ' . ucfirst($titulo_formulario) . '</legend>
		</div>
		<!-- panel  -->
			    <div class="col-lg-7">
					<h4>' . ucfirst(LABEL_lcConfig) . '</h4>
			        <div class="panel panel-default">