!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_tdfonline/proyectos/toba_editor/php/db/   drwxr-xr-x
Free 14.77 GB of 61.93 GB (23.85%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     odr_datos_tabla.php (1.92 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php 

class odr_datos_tabla extends toba_datos_relacion
{
    
/**
     * Recorre los metadatos de la tabla y actualiza la definicion:
     *   - Si hay alguna nueva columna la agrega
     */
    
function actualizar_campos($schema=null)
    {
        
$basicos $this->tabla('base')->get();
        
$id_fuente $basicos['fuente_datos'];
        
        
//-- Obtengo datos
        
$reg $this->tabla('prop_basicas')->get();
        
$tabla $reg['tabla'];
        
$fuente toba::db($id_fuentetoba_editor::get_proyecto_cargado());
        if (
is_null($schema)) {
            
$schema $fuente->get_schema();
        }        
        
$columnas $fuente->get_definicion_columnas($tabla$schema);
        
$tabla_ext '';
        if (
$reg['ap'] == toba_ap_tabla_db_mt::id_ap_mt) {    // Si es un ap multitabla
            
$tabla_ext $reg['tabla_ext'];
            
$columnas array_merge($columnas$fuente->get_definicion_columnas($tabla_ext));
        }
        
        foreach (
array_keys($columnas) as $id) {
            
$columnas[$id]['columna'] = $columnas[$id]['nombre'];    
            
$columnas[$id]['no_nulo_db'] = $columnas[$id]['not_null'];
            if (
$columnas[$id]['tipo'] == 'C' && $columnas[$id]['longitud'] > 0) {
                
$columnas[$id]['largo'] = $columnas[$id]['longitud'];
            }            
        }
        
$dbr $this->tabla('columnas');
        
$actuales $dbr->get_filas(nulltrue);
        for (
$a 0$a count($columnas); $a++) {
            try{
                
//--- Evita incluir dos veces el mismo nombre
                
$nueva true;
                foreach (
$actuales as $id => $actual) {
                    if (
$columnas[$a]['columna'] == $actual['columna']) {
                        
$nueva false;
                    }
                }
                if (
$nueva) {
                    
$dbr->nueva_fila($columnas[$a]);
                }
            }catch(
toba_error $e) {
                if (
$columnas[$a]['tabla'] == $tabla) {
                    
toba::notificacion()->agregar("Error agregando la COLUMNA '{$columnas[$a]['columna']}' al datos_tabla de laa tabla $tabla. " $e->getMessage());
                } else {
                    
toba::notificacion()->agregar("Error agregando la COLUMNA '{$columnas[$a]['columna']}' al datos_tabla de laa tabla $tabla_ext. " $e->getMessage());
                }
                
            }
        }
    }

}

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.8 ]--