Exemplo n.º 1
0
 private function ConstructorLoader($Aplicacion)
 {
     $ArrayApp = SysMisNeural::CargarArchivoYAMLAplicacion('Configuracion/ConfiguracionScripts.yaml');
     $ClassContenedor = $ArrayApp[$Aplicacion]['LOADER']['CLASS']['CONTENEDOR']['CLASS'] == 'DESACTIVADO' ? '' : ' class="' . $ArrayApp[$Aplicacion]['LOADER']['CLASS']['CONTENEDOR']['CLASS'] . '"';
     $ClassImagen = $ArrayApp[$Aplicacion]['LOADER']['CLASS']['IMAGEN']['CLASS'] == 'DESACTIVADO' ? '' : ' class="' . $ArrayApp[$Aplicacion]['LOADER']['CLASS']['IMAGEN']['CLASS'] . '"';
     $StyleContenedor = $ArrayApp[$Aplicacion]['LOADER']['CLASS']['CONTENEDOR']['STYLE'] == 'DESACTIVADO' ? '' : ' ' . SysMiscNeuralForm::OrganizarStyle($ArrayApp[$Aplicacion]['LOADER']['STYLE']['CONTENEDOR']);
     $StyleImagen = $ArrayApp[$Aplicacion]['LOADER']['CLASS']['IMAGEN']['STYLE'] == 'DESACTIVADO' ? '' : ' ' . SysMiscNeuralForm::OrganizarStyle($ArrayApp[$Aplicacion]['LOADER']['STYLE']['IMAGEN']);
     return '<div' . $ClassContenedor . $StyleContenedor . '><img src="' . NeuralRutasBase::RutaBase($ArrayApp[$Aplicacion]['LOADER']['LOADER']) . '" alt=""' . $ClassImagen . $StyleImagen . ' /></div>';
     unset($Aplicacion, $ArrayApp, $ClassContenedor, $ClassImagen, $StyleContenedor, $StyleImagen);
 }
Exemplo n.º 2
0
 /**
  * SysMiscNeuralForm::ConstructorFieldsetOpen($Constructor, $Array)
  * 
  * Metodo Contructor de Apertura del Fieldset
  * 
  * @param $Array: array asociativo con los datos a construir
  * @param $Constructor: Array con los constructores html correspondientes
  * 
  */
 public static function ConstructorFieldsetOpen($Constructor, $Array)
 {
     foreach ($Array as $Llave => $Valor) {
         if ($Llave == 'style') {
             $Campo[] = is_array($Valor) ? SysMiscNeuralForm::OrganizarStyle($Valor) : '';
         } else {
             $Campo[] = $Valor == true ? $Llave . "=\"{$Valor}\"" : '';
         }
     }
     $CamposOrganizados = implode(' ', $Campo);
     return str_replace('{ CAMPOS }', trim($CamposOrganizados), $Constructor);
 }
Exemplo n.º 3
0
 /**
  * MostrarFormulario()
  * 
  * toma los metodos anteriores y genera el formulario correspondiente
  **/
 public function MostrarFormulario()
 {
     $Constructor = array('Cabecera' => '<form { CAMPOS }>', 'Fin' => '</form>', 'Text' => '<label { CAMPOS_LABEL }>{ VALOR_LABEL }</label> <input type="text" { CAMPOS } />', 'Hidden' => '<input type="hidden" { CAMPOS } />', 'Password' => '<label { CAMPOS_LABEL }>{ VALOR_LABEL }</label> <input type="password" { CAMPOS } />', 'File' => '<label { CAMPOS_LABEL }>{ VALOR_LABEL }</label> <input type="file" { CAMPOS } />', 'Submit' => '<button type="submit" { CAMPOS }>{ TEXTO }</button>', 'Select' => "<label { CAMPOS_LABEL }>{ VALOR_LABEL }</label> <select { CAMPOS }>\n{ VALORES }\n</select>", 'Textarea' => '<label { CAMPOS_LABEL }>{ VALOR_LABEL }</label> <textarea { CAMPOS }>{ VALORES }</textarea>', 'Fieldset_Open' => '<fieldset { CAMPOS }>', 'Fieldset_Close' => '</fieldset>', 'Legend' => '<legend { CAMPOS }>{ VALORES }</legend>');
     if (count($this->Campo) >= 1) {
         //Validamos que se haya instanciado el metodo de configuracion
         if (isset($this->ConfiguracionFormulario)) {
             $ConfiguracionFormulario = SysMiscNeuralForm::OrganizarConfiguracion($Constructor['Cabecera'], $this->ConfiguracionFormulario);
             $CantidadCampos = count($this->Campo);
             if ($CantidadCampos >= 1) {
                 if (isset($this->Fieldset)) {
                     $Formulario[] = $ConfiguracionFormulario;
                     for ($i = 0; $i < $CantidadCampos; $i++) {
                         $Tipo = $this->Campo[$i]['Tipo'];
                         $Formulario[] = SysMiscNeuralForm::ConstructorCampos($Constructor[$Tipo], $this->Campo[$i]);
                     }
                     $Formulario[] = $Constructor['Fin'];
                     return implode("\n", $Formulario);
                 } else {
                     $Formulario[] = $ConfiguracionFormulario;
                     $Formulario[] = SysMiscNeuralForm::ConstructorFieldsetOpen($Constructor['Fieldset_Open'], array('name' => false, 'id' => 'Neural_Fieldset', 'class' => 'Neural_Fieldset', 'style' => false));
                     for ($i = 0; $i < $CantidadCampos; $i++) {
                         $Tipo = $this->Campo[$i]['Tipo'];
                         $Formulario[] = SysMiscNeuralForm::ConstructorCampos($Constructor[$Tipo], $this->Campo[$i]);
                     }
                     $Formulario[] = $Constructor['Fieldset_Close'];
                     $Formulario[] = $Constructor['Fin'];
                     return implode("\n", $Formulario);
                 }
             } else {
                 return 'Faltan Los Campos del Formulario';
             }
         } else {
             return 'Falta la Configuración del Formulario';
         }
     }
 }
Exemplo n.º 4
0
 private static function ConstructorLoader($Aplicacion)
 {
     $ArrayApp = SysNeuralNucleo::CargarArchivoJsonConfiguracion('ConfigScripts.json');
     $ClassContenedor = $ArrayApp[$Aplicacion]['LOADER']['CLASS']['CONTENEDOR']['CLASS'] == 'DESACTIVADO' ? '' : ' class="' . $ArrayApp[$Aplicacion]['LOADER']['CLASS']['CONTENEDOR']['CLASS'] . '"';
     $ClassImagen = $ArrayApp[$Aplicacion]['LOADER']['CLASS']['IMAGEN']['CLASS'] == 'DESACTIVADO' ? '' : ' class="' . $ArrayApp[$Aplicacion]['LOADER']['CLASS']['IMAGEN']['CLASS'] . '"';
     $StyleContenedor = $ArrayApp[$Aplicacion]['LOADER']['CLASS']['CONTENEDOR']['STYLE'] == 'DESACTIVADO' ? '' : ' ' . SysMiscNeuralForm::OrganizarStyle($ArrayApp[$Aplicacion]['LOADER']['STYLE']['CONTENEDOR']);
     $StyleImagen = $ArrayApp[$Aplicacion]['LOADER']['CLASS']['IMAGEN']['STYLE'] == 'DESACTIVADO' ? '' : ' ' . SysMiscNeuralForm::OrganizarStyle($ArrayApp[$Aplicacion]['LOADER']['STYLE']['IMAGEN']);
     return '<div' . $ClassContenedor . $StyleContenedor . '><img src="' . __NeuralUrlRoot__ . $ArrayApp[$Aplicacion]['LOADER']['LOADER'] . '" alt=""' . $ClassImagen . $StyleImagen . ' /></div>';
     unset($Aplicacion, $ArrayApp, $ClassContenedor, $ClassImagen, $StyleContenedor, $StyleImagen);
 }