function evalArg($type, $arg)
{
    switch ($type) {
        case 'string':
            $arg = is_string($arg) ? $arg : '';
            break;
        case 'int':
            $arg = secure_data($arg, "int");
            break;
        case 'array_int':
            $arg = string2array4ID($arg);
            break;
        default:
            $arg = "";
            break;
    }
    return $arg;
}
function SQLlistaTema_id($lista_temas_id)
{
    global $DBCFG;
    //Control de estados
    !$_SESSION[$_SESSION["CFGURL"]][ssuser_id] ? $where = " and t.estado_id='13' " : ($where = "");
    $csv_temas_id = string2array4ID($lista_temas_id);
    return SQL("select", "t.tema_id as tema_id,t.tema,t.isMetaTerm from {$DBCFG['DBprefix']}tema t where t.tema_id in ({$csv_temas_id}) {$where} order by t.tema");
}