public static function view() { $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(); } }
include "s_lib/funcoes_basicas.php"; require_once "s_lib/raelgc/view/Template.php"; include "s_php/linguagem/textos.php"; define('URL_SITE', UrlAmigavel::url_padrao('http')); $tpl = new Template("s_html/index.html"); $base = new Conexao(); $lingua = ""; #DEFINE O CAMIHO DE URL PADRAO img,css,href etc {BASE} if ($tpl->exists('BASE')) { $tpl->BASE = URL_SITE; } #VERIFICA SE AS TEBELAS EXISTEM $tabelas = array('idiomas', 'sistema', 'usuarios', 'textos'); $verif_banco = true; foreach ($tabelas as $valor) { if ($base->verifica_tabela($valor) == false) { $verif_banco = false; } } if ($verif_banco == false) { die(header("Location: " . URL_SITE . "instalar/")); } #VERIFICA SE O IDIOMA EXISTE if (UrlAmigavel::campo_url()) { $lg = $base->seleciona('idiomas', array('status' => "1")); $db_idioma = array(); foreach ($lg as $v) { $db_idioma[] = $v->sigla; } if (in_array(UrlAmigavel::campo_url(0), $db_idioma)) { $lingua = UrlAmigavel::campo_url(0);