function SQLarbolTema($tema_id) { global $DBCFG; $tema_id = secure_data($tema_id, "sql"); $ARRAYtema_indice = ARRAYIndexTema($tema_id); if ($ARRAYtema_indice) { $temas_ids = str_replace('|', ',', $ARRAYtema_indice[indice]); $temas_ids = substr($temas_ids, 1); $sql = SQL("select", "t.tema_id as tema_id,t.tema\r\n\t\tfrom {$DBCFG['DBprefix']}tema t\r\n\t\twhere t.tema_id in ({$temas_ids})\r\n\t\torder by FIELD(t.tema_id, {$temas_ids})"); return $sql; } }
function ARRAYmyTopTerm($term_id, $index = "1") { $myIndex = ARRAYIndexTema($term_id); $arrayMyIndex = explode('|', $myIndex["indice"]); $arrayTerm = ARRAYverTerminoBasico($arrayMyIndex[$index]); return $arrayTerm; }