public static function view() { html_lista_idiomas(); html_topo_pagina(ucfirst(self::$tabela)); $metodo = get_op_modo(); $conexao = new Conexao(); $nova_t = empty($_GET['criar_tabela']) ? false : true; $verifica_tabela = $conexao->verifica_tabela(self::$tabela, self::cria_tebelas(), $nova_t); if ($verifica_tabela == false) { echo "<h3>A tabela " . self::$tabela . " não existe, deseja criar uma nova tabela</h3>"; echo "<a href='" . adiciona_ao_get(array('criar_tabela' => 1)) . "' class='btn btn-default'><i class='glyphicon glyphicon-upload'></i> CRIAR TABELA</a>"; } else { self::$metodo($conexao); self::scripts(); } }
$db_tex = $base->seleciona('textos', $where2, null); $up_where = json_encode($where2); } else { $db_tex = $base->seleciona('textos', $where1, null); $up_where = json_encode($where1); } } } $ln = $db_tex[0]; } } } else { $tipo = false; } if (!empty($ln)) { html_lista_idiomas(); html_topo_pagina('Texto:' . ucfirst($ln->tipo)); $form = new WGform(); $img_atual = !empty($ln->foto) ? "../uploads/textos/" . $ln->foto : ""; $form::$nome = 'formulario'; $form::$action = 'io/update.php'; $form::$method = "POST"; if ($img_atual) { $form::$html_botao = html_upload_foto($largura, $altura, $tamnaho_k_bytes, $img_atual) . "<br><button type='submit' class='btn btn-primary'> SALVAR </button>"; } else { $form::$html_botao = "<br><button type='submit' class='btn btn-primary'> SALVAR </button>"; } $form::$ajax = array('enviado_redireciona', 'erro', 'antes_enviar', 'completo'); $paramtros_obj = array(); /*CAMPOS*/ /*campo 'tabela' obrigatorio */