Beispiel #1
0
        $new_termino = abm_tema('mod', doValue($_POST, FORM_LABEL_termino), "{$_POST['edit_id_tema']}");
        $tema = $new_termino;
    }
    # Alta de nota
    if ($_POST[altaNota]) {
        $tema = abmNota('A', "{$_POST['idTema']}", doValue($_POST, FORM_LABEL_tipoNota), doValue($_POST, FORM_LABEL_Idioma), doValue($_POST, FORM_LABEL_nota));
    }
    #Operaciones Mod y Borrado de notas
    if ($_POST[modNota]) {
        # Modificación de nota
        if ($_POST[guardarCambioNota] == LABEL_Cambiar) {
            $tema = abmNota('M', "{$_POST['idTema']}", doValue($_POST, FORM_LABEL_tipoNota), doValue($_POST, FORM_LABEL_Idioma), doValue($_POST, FORM_LABEL_nota), "{$_POST['idNota']}");
        }
        # Borrado de nota
        if ($_POST[eliminarNota] == LABEL_EliminarNota) {
            $tema = abmNota('B', "{$_POST['idTema']}", "", "", "", "{$_POST['idNota']}");
        }
    }
    # Cambio de estado de un término
    if ($_GET[estado_id] && $_GET[tema]) {
        $cambio_estado = cambio_estado($_GET[tema], $_GET[estado_id]);
        $tema = $cambio_estado[tema_id];
        $MSG_ERROR_ESTADO = $cambio_estado[msg_error];
    }
}
// fin de llamdas de funciones de gestion
###################################################################################
##################      FUNCIONES DE ABM TERMINOS   ###############################
###################################################################################
function doArrayNota($array)
{
 $rwTerms[0] = trim($rwTerms[0]);
 $rwTerms[1] = trim($rwTerms[1]);
 $term = $rwTerms[0];
 $objectTerm = $rwTerms[1];
 //Si es un término o un tag
 $t_relacion = in_array($rwTerms[0], $arrayTiposTermino) ? $rwTerms[0] : $t_relacion;
 //es un término
 if (strlen($term) > 0 && !$objectTerm) {
     $term_id = resolveTerm_id($term);
     $i = ++$i;
 }
 //es una nota
 if (in_array($rwTerms[0], $arrayTiposNotas)) {
     //re-redactar nota para prevenir signo de separación en notas
     $note = implode($separador, array_slice($rwTerms, 1));
     abmNota("A", $term_id, $rwTerms[0], "{$thes_lang}", trim($note));
 } elseif (in_array($rwTerms[0], $arrayTiposTermino)) {
     //Retomar tag
     $label = $rwTerms[0] == $tabulador ? $past_label : trim($rwTerms[0]);
     switch ($label) {
         case 'CODE':
             edit_single_code($term_id, $objectTerm);
             break;
         case 'BT':
             $BTterm_id = resolveTerm_id($objectTerm, "1");
             ALTArelacionXId($BTterm_id, $term_id, "3");
             break;
         case 'RT':
             $RTterm_id = resolveTerm_id($objectTerm, "1");
             ALTArelacionXId($term_id, $RTterm_id, "2");
             ALTArelacionXId($RTterm_id, $term_id, "2");
function ADDreferencesSuggestedTerm($term_id, $tterm_id, $ARRAYtargetVocabulary, $options = array())
{
    if ($options["addNoteReference"] == 1) {
        abmNota('A', $term_id, "NB", $_SESSION["CFGIdioma"], $ARRAYtargetVocabulary["tvocab_title"] . '. URL:' . $ARRAYtargetVocabulary["tvocab_url"]);
    }
    if ($options["addLinkReference"] > 0) {
        abmURI('A', $term_id, array("uri_type_id" => $options["addLinkReference"], "uri" => "{$ARRAYtargetVocabulary['tvocab_url']}?tema={$tterm_id}"));
    }
    if ($options["addMappReference"] == 1) {
        abm_target_tema('A', $term_id, $ARRAYtargetVocabulary["tvocab_id"], $tterm_id);
    }
}
 function ALTAnota($tema_id, $tipo_nota, $lang_nota, $nota)
 {
     return abmNota('A', $tema_id, $tipo_nota, $lang_nota, $nota);
 }