function fetchDirectTerms($tema_id)
 {
     /*
     $sql=SQLterminosDirectos($tema_id);
     */
     $sql = SQLverTerminoRelaciones($tema_id);
     while ($array = $sql->FetchRow()) {
         $relation_type = arrayReplace(array("2", "3", "4"), array("RT", "BT", "UF"), $array[t_relacion]);
         $result["result"][$array[tema_id]] = array("term_id" => $array[tema_id], "code" => $array[code], "lang" => $array[idioma], "string" => $array[tema], "isMetaTerm" => $array[isMetaTerm], "relation_type_id" => $array[t_relacion], "relation_type" => $relation_type, "relation_code" => $array[rr_code], "relation_label" => $array[rr_value]);
     }
     return $result;
 }
Example #2
0
function HTMLbodyTermino($array)
{
    global $MSG_ERROR_RELACION;
    global $CFG;
    $sqlMiga = SQLarbolTema($array[idTema]);
    $HTMLterminos = doContextoTermino($array[idTema], $sqlMiga[cant]);
    $fecha_crea = do_fecha($array[cuando]);
    $fecha_estado = do_fecha($array[cuando_estado]);
    //Si tiene padres
    if ($sqlMiga[cant]) {
        while ($arrayMiga = mysqli_fetch_array($sqlMiga[datos])) {
            if ($arrayMiga[tema_id] !== $array[idTema]) {
                $menu_miga .= '<li><a title="' . LABEL_verDetalle . $arrayMiga[tema] . '" href="index.php?tema=' . $arrayMiga[tema_id] . '&amp;/' . string2url($arrayMiga[tema]) . '" >' . $arrayMiga[tema] . '</a></li>';
            }
        }
    }
    $row_miga .= '<ol><li><a title="' . MENU_Inicio . '" href="index.php">' . ucfirst(MENU_Inicio) . '</a></li>' . $menu_miga . '<li>' . $array[titTema] . '</li></ol>';
    $body = '<div id="bodyText">';
    //MENSAJE DE ERROR
    $body .= $MSG_ERROR_RELACION;
    $body .= ' <h1 id="T' . $array[tema_id] . '">' . $array[titTema] . '</h1>';
    if ($_SESSION[$_SESSION["CFGURL"]][ssuser_id] || CFG_VIEW_STATUS == '1') {
        $label_estado = '<span class="estado_termino' . $array[estado_id] . '"> ' . ucfirst(arrayReplace(array("12", "13", "14"), array(LABEL_Candidato, LABEL_Aceptado, LABEL_Rechazado), $array[estado_id])) . ': ' . $fecha_estado[dia] . '-' . $fecha_estado[descMes] . '-' . $fecha_estado[ano] . '</span> ';
    }
    #Div miga de pan
    $body .= '<div id="breadScrumb">';
    $body .= $row_miga;
    $body .= '</div>';
    # fin Div miga de pan
    $body .= HTMLNotasTermino($array);
    #Div relaciones del terminos
    $body .= '<div id="relacionesTermino">';
    $body .= $HTMLterminos[HTMLterminos]["UP"];
    $body .= $HTMLterminos[HTMLterminos]["TG"];
    //Editor de código
    if ($_SESSION[$_SESSION["CFGURL"]][ssuser_id] && $CFG["_USE_CODE"] == '1') {
        $body .= '<div title="term code, click to edit" class="editable_textarea" id="code_tema' . $array[tema_id] . '">' . $array[code] . '</div>';
        $body .= HTMLtermMenu($array, $HTMLterminos[cantRelaciones]);
    } else {
        $body .= $array[code] ? ' <label class="code_tema" for="T' . $array[tema_id] . '">' . $array[code] . '</label>' : '';
    }
    //el termino
    if ($_SESSION[$_SESSION["CFGURL"]][ssuser_id]) {
        //span editable
        $body .= doListaTag('1', "h5", '<span id="edit_tema' . $array[tema_id] . '" class="edit_area_term">' . $array[titTema] . '</span> ', "term");
    } else {
        $body .= doListaTag('1', "h5", $array[titTema], "term");
    }
    $body .= $HTMLterminos[HTMLterminos]["USE"];
    $body .= $HTMLterminos[HTMLterminos]["TE"];
    $body .= $HTMLterminos[HTMLterminos]["TR"];
    $body .= $HTMLterminos[HTMLterminos]["EQ"];
    $body .= HTMLtargetTerms($array[tema_id]);
    $body .= '</div>';
    #Fin div bodyText
    $body .= '</div>';
    #Div pie de datos
    $body .= '<div id="pie_datos" class="enlacefoo"><ul id="fechas"><li> ' . LABEL_Fecha . ': ' . $fecha_crea[dia] . '-' . $fecha_crea[descMes] . '-' . $fecha_crea[ano] . '</li>';
    if ($array[cuando_final]) {
        $fecha_cambio = do_fecha($array[cuando_final]);
        $body .= '<li>' . LABEL_fecha_modificacion . ': ' . $fecha_cambio[dia] . '-' . $fecha_cambio[descMes] . '-' . $fecha_cambio[ano] . '</li> ';
    }
    $body .= '</ul>' . $label_estado . '</div> ';
    # fin Div pie de datos
    $body .= HTML_URLsearch($CFG[SEARCH_URL_SITES], $array);
    /*
     * $HTMLterminos[tema_id] es el ID del término válido siempre
     * 
    */
    $body .= '<ul id="enlaces_xml">';
    $body .= '        <li><a title="' . LABEL_verEsquema . ' MADS"  href="xml.php?madsTema=' . $HTMLterminos[tema_id] . '">MADS</a></li>  ';
    $body .= '        <li><a title="' . LABEL_verEsquema . ' Zthes" href="xml.php?zthesTema=' . $HTMLterminos[tema_id] . '">Zthes</a></li>  ';
    $body .= '        <li><a title="' . LABEL_verEsquema . ' Skos"  href="xml.php?skosTema=' . $HTMLterminos[tema_id] . '">SKOS-Core</a></li>';
    $body .= '        <li><a title="' . LABEL_verEsquema . ' BS8723-5"  href="xml.php?bs8723Tema=' . $HTMLterminos[tema_id] . '">BS8723-5</a></li>';
    $body .= '        <li><a title="' . LABEL_verEsquema . ' TopicMap"  href="xml.php?xtmTema=' . $HTMLterminos[tema_id] . '">XTM</a></li>';
    $body .= '        <li><a title="' . LABEL_verEsquema . ' Dublin Core"  href="xml.php?dcTema=' . $HTMLterminos[tema_id] . '">DC</a></li>';
    $body .= '</ul>';
    return $body;
}
        $buttons .= '<button type="button" class="btn btn-default"  name="cancelar" type="button" onClick="location.href=\'index.php?tema=' . $metadata["arraydata"]["tema_id"] . '\'" value="' . ucfirst(LABEL_Cancelar) . '"/>' . ucfirst(LABEL_Cancelar) . '</button>';
    } else {
        $hidden .= '<input type="hidden" name="taskNota" value="alta" />';
        $buttons .= '<button type="submit" class="btn btn-primary" name="LABEL_Enviar" value="' . LABEL_Enviar . '"/>' . ucfirst(LABEL_Enviar) . '</button>';
        $buttons .= '<button type="button" class="btn btn-default"  name="cancelar" type="button" onClick="location.href=\'index.php?tema=' . $metadata["arraydata"]["tema_id"] . '\'" value="' . ucfirst(LABEL_Cancelar) . '"/>' . ucfirst(LABEL_Cancelar) . '</button>';
    }
}
$LabelNB = 'NB#' . LABEL_NB;
$LabelNH = 'NH#' . LABEL_NH;
$LabelNA = 'NA#' . LABEL_NA;
$LabelNP = 'NP#' . LABEL_NP;
$LabelNC = 'NC#' . LABEL_NC;
$sqlNoteType = SQLcantNotas();
$arrayNoteType = array();
while ($array = $sqlNoteType->FetchRow()) {
    $varNoteType = in_array($array["value_id"], array(8, 9, 10, 11, 15)) ? arrayReplace(array(8, 9, 10, 11, 15), array($LabelNA, $LabelNH, $LabelNB, $LabelNP, $LabelNC), $array["value_id"]) : $array["value_code"] . '#' . $array["value"];
    array_push($arrayNoteType, $varNoteType);
}
// Preparado de datos para el formulario ///
$arrayLang = array();
foreach ($CFG["ISO639-1"] as $langs) {
    array_push($arrayLang, "{$langs['0']}#{$langs['1']}");
}
//idioma de la nota
$arrayNota[lang_nota] = !$arrayNota[lang_nota] ? $_SESSION["CFGIdioma"] : $arrayNota[lang_nota];
?>
<div class="container" id="bodyText">
<a class="topOfPage" href="index.php?tema=<?php 
echo $metadata["arraydata"]["tema_id"];
?>
" title="<?php 
function do_json($tema_id)
{
    global $CFG;
    $datosTermino = ARRAYverDatosTermino($tema_id);
    if (!is_numeric($datosTermino["tema_id"])) {
        return null;
    }
    $ARRAYterm["tema_id"] = $datosTermino["tema_id"];
    $ARRAYterm["string"] = $datosTermino["titTema"];
    $ARRAYterm["created"] = $datosTermino["cuando"];
    $ARRAYterm["code"] = $datosTermino["code"];
    if ($datosTermino["cuando_final"]) {
        $ARRAYterm["modified"] = $datosTermino["cuando_final"];
    }
    for ($iNota = 0; $iNota < count($datosTermino["notas"]); ++$iNota) {
        //there are note and is not private note
        if ($datosTermino["notas"][$iNota]["id"] && $datosTermino["notas"][$iNota]["tipoNota"] !== 'NP') {
            $tipoNota = in_array($datosTermino["notas"][$iNota]["tipoNota_id"], array(8, 9, 10, 11, 15)) ? arrayReplace(array(8, 9, 10, 11, 15), array(LABEL_NA, LABEL_NH, LABEL_NB, LABEL_NP, LABEL_NC), $datosTermino["notas"][$iNota]["tipoNota_id"]) : $datosTermino["notas"][$iNota]["tipoNotaLabel"];
            $ARRAYterm["notes"][] = array("@type" => $tipoNota, "@lang" => $datosTermino[notas][$iNota][lang_nota], "@value" => html2txt($datosTermino["notas"][$iNota]["nota"]));
        }
    }
    return json_encode($ARRAYterm);
}
Example #5
0
?>
"
                size="10" maxlength="10"
                />
                        </div>
                        
            <label for="isAdmin" accesskey="i"><?php 
echo ucfirst(LABEL_esSuperUsuario);
?>
</label>
                <input type="checkbox"
                name="isAdmin"                
                id="isAdmin"
                value="1"                
                <?php 
echo arrayReplace(array("1", "2"), array("checked", ""), $dato_user[nivel]);
?>
                />
          		<div class="submit_form" align="center">
		<INPUT name="useactua"
                TYPE="HIDDEN"
                value="<?php 
echo $dato_user[id];
?>
"
                />
                <input name="boton"
                type="submit"
                value="<?php 
echo $nombre_boton;
?>
$rows .= '<div class="form-group">
			           <label for="clave" class="col-sm-3 control-label">' . ucfirst(LABEL_pass) . '</label>
			                    <div class="col-sm-9">
			                        <input data-minlength="4" ' . $fillRulePass . ' class="form-control" id="clave" placeholder="' . LABEL_pass . '" type="password" id="clave" name="' . FORM_LABEL_pass . '" value="">
															<span class="help-block">' . ucfirst(sprintf(MSG_lengh_error, 4)) . '</span>
			                    </div>
			         </div>';
$rows .= '<div class="form-group">
			           <label for="reclave" class="col-sm-3 control-label">' . ucfirst(LABEL_repass) . '</label>
			                    <div class="col-sm-9">
			                        <input data-match="#clave" ' . $fillRulePass . ' data-match-error="' . ucfirst(MSG_repass_error) . '" placeholder="' . LABEL_repass . '" class="form-control" type="password" id="reclave" name="' . FORM_LABEL_repass . '" value="">
															<div class="help-block with-errors"></div>
													</div>
			         </div>';
$rows .= '<div class="form-group">
							<input type="checkbox" name="isAdmin" id="isAdmin" value="1" ' . arrayReplace(array("1", "2"), array("checked", ""), $dato_user["nivel"]) . '/>
							<div class="col-sm-4">
							<label for="isAdmin">' . ucfirst(LABEL_esSuperUsuario) . '</label>
								</div>
							</div>';
if (isset($dato_user["id"])) {
    $isAlive = $dato_user["estado"] == 'ACTIVO' ? 'checked' : '';
    $rows .= '<div class="form-group">
											<input type="checkbox" name="isAlive" id="isAlive" value="ACTIVO" ' . $isAlive . '/>
											<div class="col-sm-4">
											<label for="isAlive">' . ucfirst(LABEL_User_Habilitado) . '</label>
												</div>
											</div>';
}
$rows .= '<div class="form-group">
																	<div class="col-sm-12 text-right">
function HTMLformUserNotes()
{
    //ALTA
    if ($_POST['value'] != '' and $_POST['orden'] != '' and $_POST['alias'] != '' and $_POST['doAdmin'] == '') {
        $arrayValues = array("value" => $_POST['value'], "orden" => $_POST['orden'], "alias" => $_POST['alias']);
        $task = abm_userNotes("A", $arrayValues);
        if ($task[cant] > 0) {
            echo "<script>javascript:alert('" . ucfirst(LABEL_saved) . "');</script>";
        }
    }
    //MOD
    if ($_POST['doAdmin'] == 'modUserNotes') {
        $arrayValues = array("value" => $_POST['value'], "orden" => $_POST['orden'], "alias" => $_POST['alias']);
        $task = abm_userNotes("M", $arrayValues, $_POST['valueid']);
        if ($task[cant] > 0) {
            echo "<script>javascript:alert('" . ucfirst(LABEL_saved) . "');</script>";
        }
        $_POST['value'] = '';
        $_POST['orden'] = '';
        $_POST['alias'] = '';
        $_POST['ac'] = '';
    }
    //BAJA
    if ($_POST['doAdmin'] == 'deleteUserNotes') {
        $task = abm_userNotes("B", array(), $_POST['value']);
    }
    $sql = SQLcantNotas();
    $rows .= '<form id="morenotas" name="morenotas" method="POST" action="admin.php?vocabulario_id=list#morenotas">';
    $rows .= '<input type="hidden" name="doAdmin" id="doAdmin" value="">  ';
    $rows .= ' <input type="hidden" name="valueid" id="valueid"> ';
    $rows .= '<div class="table-responsive"> ';
    $rows .= '<h3>' . ucfirst(LABEL_configTypeNotes) . ' </h3>';
    $rows .= '<table class="table table-striped table-bordered table-condensed table-hover"  summary="' . ucfirst(LABEL_configTypeNotes) . '">';
    $rows .= '<thead>';
    $rows .= '<tr>';
    $rows .= ' <th>' . ucfirst(LABEL_tipoNota) . '</th>';
    $rows .= '<th>' . ucfirst(alias) . ':</th>';
    $rows .= '<th>' . ucfirst(orden) . '</th>';
    $rows .= '<th></th>';
    $rows .= '</tr>';
    $rows .= '<tr>';
    $rows .= '<th class="izq"><input type="text" name="value" id="value"/></td>';
    $rows .= '<th class="izq"><input type="text" name="alias" size="2" id="alias"/></td>';
    $rows .= '<th class="izq"><input type="text" name="orden" size="2"  id="orden"/></td>';
    $rows .= '<th><a onclick="envianota()" href="#"><strong>' . ucfirst(LABEL_Enviar) . '</strong></a></td>';
    $rows .= '</tr>';
    $rows .= ' </thead>';
    $rows .= ' <tbody>';
    while ($array = $sql->FetchRow()) {
        $i = ++$i;
        if (in_array($array["value_id"], array(8, 9, 10, 11, 15))) {
            $array["value"] = in_array($array["value_id"], array(8, 9, 10, 11)) ? arrayReplace(array(8, 9, 10, 11, 15), array(LABEL_NA, LABEL_NH, LABEL_NB, LABEL_NP, LABEL_NC), $array["value_id"]) : $array["value"];
            $rows .= '<tr>';
            $rows .= ' <td class="izq">' . $array["value"] . '</a></td>';
            $rows .= '<td>' . $array["value_code"] . '</td>';
            $rows .= '<td>' . $array["value_order"] . '</td>';
            $rows .= '<td>' . $array["cant"] . ' ' . LABEL_notes . '</td>';
            $rows .= '</tr>';
        } else {
            $rows .= '<tr>';
            $rows .= ' <td class="izq"><a title="' . $array["value"] . '"  href="javascript:recargaedit(\'' . $array["value"] . '\',\'' . $array["value_order"] . '\',\'' . $array["value_code"] . '\',\'' . $array["value_id"] . '\')">' . $array["value"] . '</a></td>';
            $rows .= '<td>' . $array["value_code"] . '</td>';
            $rows .= '<td>' . $array["value_order"] . '</td>';
            $rows .= $array["cant"] > 0 ? '<td>' . $array["cant"] . ' ' . LABEL_notes . '</td>' : '<td><a onclick=preparaborrado2(\'' . $array["value_id"] . '\') title="' . ucfirst(borrar) . '" href="#")><strong>' . ucfirst(borrar) . '</strong></a></td>';
            $rows .= '</tr>';
        }
    }
    $rows .= ' </tbody>';
    $rows .= '<tfoot>';
    $rows .= '<tr><td colspan="4">' . $i . '</th></tr>';
    $rows .= '</tfoot>';
    $rows .= '</table> </div>';
    $rows .= '</form>';
    return $rows;
}
Example #8
0
function do_mysql_dump($encode = "utf8")
{
    global $DBCFG;
    $tables = $DBCFG[DBprefix] . 'config,' . $DBCFG[DBprefix] . 'tema,' . $DBCFG[DBprefix] . 'tabla_rel,' . $DBCFG[DBprefix] . 'indice,' . $DBCFG[DBprefix] . 'usuario,' . $DBCFG[DBprefix] . 'notas,' . $DBCFG[DBprefix] . 'values,' . $DBCFG[DBprefix] . 'tvocab,' . $DBCFG[DBprefix] . 'term2tterm';
    $link = mysql_connect($DBCFG["Server"], $DBCFG["DBLogin"], $DBCFG["DBPass"]);
    mysql_select_db($DBCFG["DBName"], $link);
    /*
     * To UTF-8 databases
     */
    if ($encode == 'utf8') {
        mysql_query('SET NAMES utf8');
        mysql_query('SET CHARACTER SET utf8');
    }
    //get all of the tables
    if ($tables == '*') {
        $tables = array();
        $result = mysql_query('SHOW TABLES');
        while ($row = mysql_fetch_row($result)) {
            $tables[] = $row[0];
        }
    } else {
        $tables = is_array($tables) ? $tables : explode(',', $tables);
    }
    //cycle through
    foreach ($tables as $table) {
        $result = mysql_query('SELECT * FROM ' . $table);
        $num_fields = mysql_num_fields($result);
        $return .= 'DROP TABLE IF EXISTS ' . $table . '; ';
        $row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE ' . $table));
        $return .= "\n\n" . $row2[1] . ";\n\n";
        for ($i = 0; $i < $num_fields; $i++) {
            while ($row = mysql_fetch_row($result)) {
                $return .= 'INSERT INTO ' . $table . ' VALUES(';
                for ($j = 0; $j < $num_fields; $j++) {
                    $row[$j] = addslashes($row[$j]);
                    $row[$j] = $data = arrayReplace(array("\n"), array("\\n"), $row[$j]);
                    if (isset($row[$j])) {
                        $return .= '"' . $row[$j] . '"';
                    } else {
                        $return .= '""';
                    }
                    if ($j < $num_fields - 1) {
                        $return .= ',';
                    }
                }
                $return .= ");\n";
            }
        }
        $return .= "\n\n\n";
    }
    sendFile($return, string2url('TemaTres-' . $_SESSION[CFGTitulo]) . '.sql');
}
Example #9
0
/**
* From TematresView by Nicolas Poulain
*/
function secure_data($data, $type = "alnum")
{
    switch ($type) {
        case "alnum":
            // suppression des caracteres pas catholiques
            $data = preg_replace('/^\\W+|\\W+$/', '', $data);
            $data = preg_replace('/\\s/', '', $data);
            break;
        case "alpha":
            // suppression des caracteres pas catholiques
            $data = preg_replace('/^\\W+|\\W+$/', '', $data);
            $data = arrayReplace(array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"), array(""), $data);
            $data = preg_replace('/\\s/', '', $data);
            break;
        case "sql":
            global $db;
            // vire les balises
            $data = strip_tags($data);
            // zappe le magic_quote déprécié
            if (get_magic_quotes_gpc()) {
                if (ini_get('magic_quotes_sybase')) {
                    $data = str_replace("''", "'", $data);
                } else {
                    $data = stripslashes($data);
                }
            }
            $data = trim($data);
            $data = mysqli_real_escape_string($db, $data);
            break;
        case "sqlhtml":
            global $db;
            //SQL secure with HTML tags
            // zappe le magic_quote déprécié
            if (get_magic_quotes_gpc()) {
                if (ini_get('magic_quotes_sybase')) {
                    $data = str_replace("''", "'", $data);
                } else {
                    $data = stripslashes($data);
                }
            }
            $data = trim($data);
            $data = mysqli_real_escape_string($db, $data);
            break;
        default:
            // int
            $data = (int) preg_replace('|[^0-9.]|i', '', $data);
            if ($data == "") {
                $data = 0;
            }
            break;
    }
    return $data;
}
function HTMLformConfigValues($array_vocabulario)
{
    $si = LABEL_SI;
    $no = LABEL_NO;
    global $arrayCFGs;
    $sql = SQLconfigValues();
    $NEWarrayCFGs = array();
    while ($array = $sql->FetchRow()) {
        $NEWarrayCFGs[$array["value"]] = $array["value_code"];
    }
    $rows .= '<div class="form-group">';
    $rows .= '<label class="col-sm-3 control-label" for="' . FORM_LABEL_jeraquico . '">' . ucfirst(FORM_LABEL_jeraquico) . '</label>';
    $rows .= '<div class="col-sm-9">    <select id="' . FORM_LABEL_jeraquico . '" name="' . FORM_LABEL_jeraquico . '">';
    $rows .= doSelectForm(array("1#{$si}", "2#{$no}"), $array_vocabulario["polijerarquia"]);
    $rows .= '</select><span class="help-block">' . ucfirst(LABEL_jeraquico) . '</span></div>';
    $rows .= '</div>';
    foreach ($arrayCFGs as $key => $value) {
        switch ($key) {
            case 'CFG_MAX_TREE_DEEP':
                $rows .= '<div class="form-group">';
                $rows .= '<label class="col-sm-5 control-label" for="' . $key . '">' . $key . '</label>';
                $rows .= '<div class="col-sm-5">    <select id="' . $key . '" name="' . $key . '">';
                $rows .= doSelectForm(array("1#1", "2#2", "3#3", "4#4", "5#5", "6#6"), $NEWarrayCFGs[$key]);
                $rows .= '</select>';
                $rows .= '<span class="help-block">' . ucfirst(LABEL_CFG_MAX_TREE_DEEP) . '</span></div>';
                $rows .= '</div>';
                break;
            case 'CFG_MIN_SEARCH_SIZE':
                $rows .= '<div class="form-group">';
                $rows .= '<label class="col-sm-5 control-label" for="' . $key . '" >' . $key . '</label>';
                $rows .= '<div class="col-sm-5">     <select id="' . $key . '" name="' . $key . '">';
                $rows .= doSelectForm(array("1#1", "2#2", "3#3", "4#4", "5#5", "6#6"), $NEWarrayCFGs[$key]);
                $rows .= '</select>';
                $rows .= '<span class="help-block">' . ucfirst(LABEL_CFG_MIN_SEARCH_SIZE) . '</span></div>';
                $rows .= '</div>';
                break;
            case 'CFG_NUM_SHOW_TERMSxSTATUS':
                $rows .= '<div class="form-group">';
                $rows .= '<label class="col-sm-5 control-label" for="' . $key . '">' . $key . '</label>';
                $rows .= '<div class="col-sm-5">     <select id="' . $key . '" name="' . $key . '">';
                $rows .= doSelectForm(array("50#50", "100#100", "150#150", "200#200", "250#250"), $NEWarrayCFGs[$key]);
                $rows .= '</select>';
                $rows .= '<span class="help-block">' . ucfirst(LABEL_CFG_NUM_SHOW_TERMSxSTATUS) . '</span></div>';
                $rows .= '</div>';
                break;
            case 'CFG_SEARCH_METATERM':
                $rows .= '<div class="form-group">';
                $rows .= '<label class="col-sm-5 control-label" for="' . $key . '">' . $key . '</label>';
                $rows .= '<div class="col-sm-5">     <select id="' . $key . '" name="' . $key . '">';
                $rows .= doSelectForm(array("1#{$si}", "00#{$no}"), $NEWarrayCFGs[$key]);
                $rows .= '</select>';
                $rows .= '<span class="help-block">' . ucfirst(NOTE_isMetaTermNote) . '</span></div>';
                $rows .= '</div>';
                break;
            default:
                $rows .= '<div class="form-group">';
                $rows .= '<label class="col-sm-5 control-label" for="' . $key . '">' . $key . '</label>';
                $rows .= '<div class="col-sm-5">     <select id="' . $key . '" name="' . $key . '">';
                $rows .= doSelectForm(array("1#{$si}", "00#{$no}"), $NEWarrayCFGs[$key]);
                $rows .= '</select>';
                $rows .= '<span class="help-block">' . ucfirst(arrayReplace(array('_USE_CODE', '_SHOW_CODE', 'CFG_VIEW_STATUS', 'CFG_SIMPLE_WEB_SERVICE', '_SHOW_TREE', '_PUBLISH_SKOS', 'CFG_ENABLE_SPARQL'), array(LABEL__USE_CODE, LABEL__SHOW_CODE, LABEL_CFG_VIEW_STATUS, LABEL_CFG_SIMPLE_WEB_SERVICE, LABEL__SHOW_TREE, LABEL__PUBLISH_SKOS, LABEL__ENABLE_SPARQL), $key)) . '</span></div>';
                $rows .= '</div>';
        }
    }
    return $rows;
}
        <dt><?php 
echo ucfirst(LABEL_TerminosUP);
?>
</dt><dd><?php 
echo $resumen[cant_up];
?>
</dd>
		<?php 
//Evaluar si hay notas
if (is_array($resumen["cant_notas"])) {
    $sqlNoteType = SQLcantNotas();
    $arrayNoteType = array();
    while ($array = $sqlNoteType->FetchRow()) {
        if ($array[cant] > 0) {
            echo '<dt>';
            echo in_array($array["value_id"], array(8, 9, 10, 11, 15)) ? arrayReplace(array(8, 9, 10, 11, 15), array(LABEL_NA, LABEL_NH, LABEL_NB, LABEL_NP, LABEL_NC), $array["value_id"]) : $array["value"];
            echo '</dt><dd> ' . $array[cant] . '</dd>';
        }
    }
}
//are enable SPARQL
if (CFG_ENABLE_SPARQL == 1) {
    echo '<dt>' . LABEL_SPARQLEndpoint . '</dt> <dd><a href="' . $_SESSION["CFGURL"] . 'sparql.php" title="' . LABEL_SPARQLEndpoint . '">' . $_SESSION["CFGURL"] . 'sparql.php</a></dd>';
}
//are enable SPARQL
if (CFG_SIMPLE_WEB_SERVICE == 1) {
    echo '<dt>API </dt> <dd><a href="' . $_SESSION["CFGURL"] . 'services.php" title="API">' . $_SESSION["CFGURL"] . 'services.php</a></dd>';
}
?>
    <dt><?php 
echo LABEL_Version;
function secure_data($data, $type = "alnum")
{
    switch ($type) {
        case "alnum":
            // suppression des caracteres pas catholiques
            $data = preg_replace('/^\\W+|\\W+$/', '', $data);
            $data = preg_replace('/\\s/', '', $data);
            break;
        case "alpha":
            // suppression des caracteres pas catholiques
            $data = preg_replace('/^\\W+|\\W+$/', '', $data);
            $data = arrayReplace(array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"), array(""), $data);
            $data = preg_replace('/\\s/', '', $data);
            break;
        case "ADOsql":
            global $DB;
            $data = trim($data);
            $data = $DB->qstr($data, get_magic_quotes_gpc());
            break;
        case "sql":
            $data = trim($data);
            // vire les balises
            $data = strip_tags($data);
            if (is_numeric($data) || $data === null) {
                return $data;
            }
            // zappe le magic_quote d�pr�ci�
            $data = str_replace("''", "'", $data);
            if (get_magic_quotes_gpc()) {
                $data = stripslashes($data);
            }
            $data = addslashes($data);
            break;
        case "sqlhtml":
            //SQL secure with HTML tags
            // zappe le magic_quote d�pr�ci�
            if (get_magic_quotes_gpc()) {
                if (ini_get('magic_quotes_sybase')) {
                    $data = str_replace("''", "'", $data);
                } else {
                    $data = stripslashes($data);
                }
            }
            $data = trim($data);
            break;
        case "int":
            // int
            $data = (int) preg_replace('|[^0-9.]|i', '', $data);
            if ($data == "") {
                $data = 0;
            }
            break;
        default:
            // int
            $data = (int) preg_replace('|[^0-9.]|i', '', $data);
            if ($data == "") {
                $data = 0;
            }
            break;
    }
    return $data;
}
function HTMLtermMetadata($arrayTerm, $arrayCantRelaciones)
{
    global $CFG;
    $fecha_crea = do_fecha($arrayTerm["cuando"]);
    $fecha_estado = do_fecha($arrayTerm["cuando_estado"]);
    $body .= '<dl class="dl-horizontal">';
    if (@$_SESSION[$_SESSION["CFGURL"]]["ssuser_id"]) {
        $ARRAYuserData4term = ARRAYuserData4term($arrayTerm["tema_id"]);
        $termCreator = ' (' . $ARRAYuserData4term["c_nombres"] . ' ' . $ARRAYuserData4term["c_apellido"] . ')';
        $termMod = ' (' . $ARRAYuserData4term["m_nombres"] . ' ' . $ARRAYuserData4term["m_apellido"] . ')';
    }
    $body .= '<dt>' . ucfirst(LABEL_Fecha) . '</dt>';
    $body .= '<dd>' . $fecha_crea["dia"] . '-' . $fecha_crea["descMes"] . '-' . $fecha_crea["ano"] . ' ' . $termCreator . '</dd>';
    if ($arrayTerm["cuando_final"]) {
        $fecha_cambio = do_fecha($arrayTerm["cuando_final"]);
        $body .= '<dt>' . ucfirst(LABEL_fecha_modificacion) . '</dt>';
        $body .= '<dd>' . $fecha_cambio["dia"] . '-' . $fecha_cambio["descMes"] . '-' . $fecha_cambio["ano"] . '  ' . $termMod . '</dd>';
    }
    $body .= '<dt class="estado_termino' . $arrayTerm["estado_id"] . '">' . ucfirst(arrayReplace(array("12", "13", "14"), array(LABEL_Candidato, LABEL_Aceptado, LABEL_Rechazado), $arrayTerm["estado_id"])) . '</dt>';
    $body .= '<dd class="estado_termino' . $arrayTerm["estado_id"] . '">' . $fecha_estado["dia"] . '-' . $fecha_estado["descMes"] . '-' . $fecha_estado["ano"] . '</dd>';
    $body .= '<dt>' . ucfirst(LABEL_totalTermsDescendants) . '</dt>';
    $body .= '<dd> ' . cantChildTerms($arrayTerm["idTema"]) . '</dd>';
    $body .= '<dt>' . ucfirst(LABEL_narrowerTerms) . '</dt>';
    $body .= '<dd>' . ($arrayCantRelaciones["cantNT"] ? $arrayCantRelaciones["cantNT"] : 0) . '</dd>';
    $body .= '<dt>' . ucfirst(LABEL_altTerms) . '</dt>';
    $body .= '<dd> ' . ($arrayCantRelaciones["cantUF"] ? $arrayCantRelaciones["cantUF"] : 0) . '</dd>';
    $body .= '<dt>' . ucfirst(LABEL_relatedTerms) . '</dt>';
    $body .= '<dd> ' . ($arrayCantRelaciones["cantRT"] ? $arrayCantRelaciones["cantRT"] : 0) . '</dd>';
    $body .= '<dt>Notas </dt>';
    $body .= '<dd> ' . count($arrayTerm["notas"]) . '</dd>';
    $body .= '<dt>' . ucfirst(LABEL_metadatos) . '</dt>';
    $body .= '<dd>';
    $body .= '<ul class="list-inline" id="enlaces_xml">';
    $body .= '        <li><a class="btn btn-info btn-xs" target="_blank" title="' . LABEL_verEsquema . ' BS8723-5"  href="xml.php?bs8723Tema=' . $arrayTerm["tema_id"] . '">BS8723-5</a></li>';
    $body .= '        <li><a class="btn btn-info btn-xs" target="_blank" title="' . LABEL_verEsquema . ' Dublin Core"  href="xml.php?dcTema=' . $arrayTerm["tema_id"] . '">DC</a></li>';
    $body .= '        <li><a class="btn btn-info btn-xs"  target="_blank" title="' . LABEL_verEsquema . ' MADS"  href="xml.php?madsTema=' . $arrayTerm["tema_id"] . '">MADS</a></li>  ';
    $body .= '        <li><a class="btn btn-info btn-xs"  target="_blank" title="' . LABEL_verEsquema . ' Skos"  href="xml.php?skosTema=' . $arrayTerm["tema_id"] . '">SKOS-Core</a></li>';
    $body .= '        <li><a class="btn btn-info btn-xs"  target="_blank" title="' . LABEL_verEsquema . ' IMS Vocabulary Definition Exchange (VDEX)"  href="xml.php?vdexTema=' . $arrayTerm["tema_id"] . '">VDEX</a></li>';
    $body .= '        <li><a class="btn btn-info btn-xs"  target="_blank" title="' . LABEL_verEsquema . ' TopicMap"  href="xml.php?xtmTema=' . $arrayTerm["tema_id"] . '">XTM</a></li>';
    $body .= '        <li><a class="btn btn-info btn-xs"  target="_blank" title="' . LABEL_verEsquema . ' Zthes" href="xml.php?zthesTema=' . $arrayTerm["tema_id"] . '">Zthes</a></li>  ';
    $body .= '        <li><a class="btn btn-info btn-xs"  target="_blank" title="' . LABEL_verEsquema . ' JavaScript Object Notation for Linked Data" href="xml.php?jsonTema=' . $arrayTerm["tema_id"] . '">JSON</a></li>  ';
    $body .= '        <li><a class="btn btn-info btn-xs"  target="_blank" title="' . LABEL_verEsquema . ' JavaScript Object Notation for Linked Data" href="xml.php?jsonldTema=' . $arrayTerm["tema_id"] . '">JSON-LD</a></li>  ';
    $body .= '</ul>';
    $body .= '</dd>';
    $body .= '<dt>' . ucfirst(LABEL_busqueda) . '</dt>';
    $body .= '<dd>';
    $body .= HTML_URLsearch($CFG[SEARCH_URL_SITES], $arrayTerm);
    $body .= '</dd> ';
    $body .= '</dl> ';
    # fin Div pie de datos
    return $body;
}