<?php try { require_once "src/config/constants.php"; require_once "zurc.php"; //include("includes/lock.php"); $zurc = new Zurc(); $zurc->loadClass(); $tpl = new Template("view/templates/blank_bootstrap_lteadmin.html"); if (isset($_REQUEST['tabela']) && count($_REQUEST['tabela'] > 0)) { if ($_REQUEST['password'] == 'rodharley1231*12') { $zurc->updateDb(); Message::setMensagem(35); } else { Message::setMensagem(2); } } if (isset($_FILES['arquivo'])) { if ($_REQUEST['password'] == 'rodharley1231*12') { $zurc->executaScript(); Message::setMensagem(35); } else { Message::setMensagem(2); } } include_once "includes/mensagem.php"; $tpl->addFile("CONTENT", "view/architecture/updateDb.html"); $xml = simplexml_load_file(URI . "/src/config/dao.xml"); foreach ($xml->class as $class) { $tpl->nome_tabela = $class['name']; $tpl->block("block_tabela");
<?php session_start(); date_default_timezone_set('America/Sao_Paulo'); setlocale(LC_ALL, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.iso-8859-1', 'portuguese'); header('Content-Type: text/html; charset=iso-8859-1'); //setando a funcao de tratamento de erros geral function handleError($errno, $errstr, $errfile, $errline, array $errcontext) { // error was suppressed with the @-operator if (0 === error_reporting()) { return false; } throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler('handleError', E_ALL); try { require_once "src/config/constants.php"; require_once "zurc.php"; $zurc = new Zurc(); $zurc->loadClass(); $zurc->start(); $zurc->controllers(); $zurc->end(); } catch (Exception $e) { $tpl = new Template("view/templates/blank_bootstrap_lteadmin.html"); $tpl->addFile("CONTENT", "view/padrao/erro.html"); $tpl->error_code = $e->getCode(); $tpl->error_message = $e->getMessage(); $tpl->show(); }
<?php try { require_once "src/config/constants.php"; require_once "zurc.php"; //include("includes/lock.php"); $zurc = new Zurc(); $zurc->loadClass(); $tpl = new Template("view/templates/blank_bootstrap_lteadmin.html"); if (isset($_REQUEST['tabela']) && count($_REQUEST['tabela'] > 0)) { $zurc->updateDb(); Message::setMensagem(35); } if (isset($_REQUEST['arquivo']) && count($_REQUEST['arquivo'] > 0)) { $retorno = $zurc->runSqlFiles(); $respostas = ""; foreach ($retorno as $key => $value) { $respostas .= $value . "<br/>"; } Message::setMensagem(36, $respostas); } include_once "includes/mensagem.php"; $tpl->addFile("CONTENT", "view/architecture/updateDb.html"); $xml = simplexml_load_file(URI . "/src/config/dao.xml"); foreach ($xml->class as $class) { $tpl->nome_tabela = $class['name']; $tpl->block("block_tabela"); } $dir = URI . "/sqls"; $files = $zurc->dirToArray($dir); foreach ($files as $key => $file) {