예제 #1
0
 public function getNavegador(Templates $tem = null, $separador = " > ")
 {
     $lI = new ListaIdiomas();
     if (isset($this->session['lang'])) {
         if ($lI->condicoes('', $this->session['lang'], ListaIdiomas::SIGLA)->getTotal() > 0) {
             $idioma = $lI->listar();
         } else {
             $idioma = new Idioma();
         }
     } else {
         $idioma = new Idioma();
     }
     return self::createNavegador($this, $idioma, $tem, $separador);
 }
예제 #2
0
 public function inserir(Idioma &$i)
 {
     if ($i->getImagem()->nome != '') {
         $i->getImagem()->open();
         $nomeImagem = $i->getImagem()->saveImage(Sistema::$caminhoDiretorio . Sistema::$caminhoDataIdiomas);
     }
     try {
         $this->con->executar("INSERT INTO " . Sistema::$BDPrefixo . $this->tabela . "(" . self::SIGLA . ", " . self::NOME . ", " . self::IMAGEM . ") VALUES('" . $i->sigla . "','" . $i->nome . "','" . $nomeImagem . "')");
         $id = $this->con->getId();
         $l = new ListaIdiomas();
         $l->condicoes('', $id, self::ID);
         $i = $l->listar();
         $tr[count($tr)] = 'E-mail ou senha inválidos';
         $tr[count($tr)] = 'Resgate de senha';
         $tr[count($tr)] = 'E-mail com sua senha enviado com sucesso';
         $tr[count($tr)] = 'não cadastrado';
         $tr[count($tr)] = 'Contato enviado com sucesso';
         $tr[count($tr)] = 'Em breve entraremos em contato';
         $tr[count($tr)] = 'Dados Cadastrais alterados com sucesso';
         $tr[count($tr)] = 'já cadastrado';
         $tr[count($tr)] = 'Cadastro realizado com sucesso';
         $tr[count($tr)] = 'Desde já agradecemos por seu cadastro. Abaixo os dados de seu cadastro';
         $tr[count($tr)] = 'Nome';
         $tr[count($tr)] = 'Data de Nascimento';
         $tr[count($tr)] = 'R.G.';
         $tr[count($tr)] = 'Razão Social';
         $tr[count($tr)] = 'Nome Fantasia';
         $tr[count($tr)] = 'Estado';
         $tr[count($tr)] = 'Cidade';
         $tr[count($tr)] = 'Endereço';
         $tr[count($tr)] = 'Número';
         $tr[count($tr)] = 'Complemento';
         $tr[count($tr)] = 'Bairro';
         $tr[count($tr)] = 'CEP';
         $tr[count($tr)] = 'Telefone';
         $tr[count($tr)] = 'Celular';
         $tr[count($tr)] = 'Senha';
         $tr[count($tr)] = 'Atenciosamente';
         $tr[count($tr)] = 'busca realizada por';
         $tr[count($tr)] = 'nenhum item encontrado por';
         $tr[count($tr)] = 'Encomendar';
         $tr[count($tr)] = 'Sob Consulta';
         $tr[count($tr)] = 'Cor';
         $tr[count($tr)] = 'Tamanho';
         $tr[count($tr)] = 'Pedra';
         $tr[count($tr)] = 'Não há nenhum item';
         $tr[count($tr)] = 'Há';
         $tr[count($tr)] = 'item(s)';
         $tr[count($tr)] = 'Produtos';
         $tr[count($tr)] = 'Encomenda efetuada com sucesso';
         $tr[count($tr)] = 'Pedido de orçamento';
         $tr[count($tr)] = 'Usuário Anônimo';
         $tr[count($tr)] = 'Pedido de Orçamento enviado com sucesso';
         $tr[count($tr)] = 'indicou um produto para você';
         $tr[count($tr)] = 'E-mail de indicação enviado com sucesso';
         $tr[count($tr)] = 'Usuário Anônimo';
         $tr[count($tr)] = 'Aberto';
         $tr[count($tr)] = 'Cancelado';
         $tr[count($tr)] = 'Aguardando Pagamento';
         $tr[count($tr)] = 'Pagamento Concluído';
         $tr[count($tr)] = 'Produto Enviado';
         $tr[count($tr)] = 'Pagamento em Análise';
         $tr[count($tr)] = 'Aguardando Contato';
         $tr[count($tr)] = 'Pedido gerado com sucesso';
         $tr[count($tr)] = 'Status de Pedido alterado';
         foreach ($tr as $v) {
             if (empty($i->getTraducaoByConteudo($v, '', false)->traducao)) {
                 $t = new Traducao();
                 $t->conteudo = $v;
                 $t->traducao = $v;
                 $i->addTraducao($t);
             }
         }
     } catch (Exception $e) {
         throw new Exception($e->getMessage());
     }
 }
예제 #3
0
 public function concluir()
 {
     $this->trocar('nomeBotao', $this->nomeBotao);
     $cont = $this->getListaTraducoes();
     if (count($cont) > 0) {
         $lI = new ListaIdiomas();
         $lI->condicoes('', $this->SESSION['lang'], ListaIdiomas::SIGLA);
         if ($lI->getTotal() > 0) {
             $i = $lI->listar();
         } else {
             $i = new Idioma();
         }
         foreach ($cont as $v) {
             $this->trocar('traduzir->' . $v, $i->getTraducaoByConteudo($v)->traducao);
         }
     }
     return parent::concluir();
 }
예제 #4
0
<?php

importar("Geral.Idiomas.Lista.ListaIdiomas");
$tituloPagina = 'Configurações > Idiomas';
$iLI = new IFAdmin(new Arquivos(Sistema::$adminLayoutCaminhoDiretorio . "/SistemaConfiguracoes/listarIdiomas.html"));
$lI = new ListaIdiomas();
if (!empty($_GET['deletar'])) {
    $lI = new ListaIdiomas();
    $i = $lI->condicoes('', $_GET['deletar'], ListaIdiomas::ID)->listar();
    if ($lI->getTotal() > 0) {
        $lI->deletar($i);
        $javaScript .= Aviso::criar('Idioma deletado com sucesso!');
    } else {
        $javaScript .= Aviso::criar('Erro ao remover idioma!');
    }
    $lI->resetCondicoes();
    $lI->setParametros(0);
}
$iLI->trocar("linkCadastrarIdioma", "?p=" . $_GET['p'] . "&a=cadastrarIdioma");
$iLI->trocar("linkDeletar.Idioma", "?p=" . $_GET['p'] . "&a=" . $_GET['a'] . "&");
$iLI->trocar("linkVoltar.Idioma", "?p=" . $_GET['p'] . "&a=configuracoes");
$iLI->createRepeticao('repetirIdiomas');
while ($i = $lI->listar()) {
    $iLI->repetir();
    $iLI->enterRepeticao()->trocar('nomeIdioma', $i->nome);
    $iLI->enterRepeticao()->trocar('idIdioma', $i->getId());
    $iLI->enterRepeticao()->trocar('linkAlterarIdioma', "?p=" . $_GET['p'] . "&a=alterarIdioma&id=" . $i->getId());
    $iLI->enterRepeticao()->trocar('linkVisualizar.Traducoes.Idioma', "?p=" . $_GET['p'] . "&a=listarTraducoes&idioma=" . $i->getId());
}
$iLI->createJavaScript();
$javaScript .= $iLI->javaScript->concluir();
예제 #5
0
<?php

importar("Geral.Idiomas.Lista.ListaIdiomas");
$tituloPagina = 'Configurações > Idiomas > Alterar Idioma';
$iAI = new IFAdmin(new Arquivos(Sistema::$adminLayoutCaminhoDiretorio . "/SistemaConfiguracoes/idioma.html"));
$iAI->trocar('linkVoltar', "?p=" . $_GET['p'] . "&a=listarIdiomas");
$lI = new ListaIdiomas();
$lI->condicoes('', $_GET['id'], 'id');
if ($lI->getTotal() > 0) {
    $i = $lI->listar();
} else {
    $i = new Idioma();
}
if (!empty($_POST)) {
    $erro = '';
    if (empty($_POST['nome'])) {
        $erro = "<b>Nome</b> não preenchido!<br><br>";
    }
    if (empty($_POST['sigla'])) {
        $erro = "<b>Sigla</b> não preenchido!<br><br>";
    }
    if (empty($erro)) {
        $i->nome = $_POST['nome'];
        $i->sigla = $_POST['sigla'];
        if (!empty($_FILES['imagem']['name'])) {
            $i->setImagem(new Image(Arquivos::__OpenArquivoByTEMP($_FILES['imagem'])));
        }
        $lI = new ListaIdiomas();
        if ($i->getId() != '') {
            $lI->alterar($i);
            $javaScript .= Aviso::criar("Idioma salvo com sucesso!");
예제 #6
0
<?php

importar("Geral.Idiomas.Lista.ListaIdiomas");
$tituloPagina = 'Configurações > Idiomas > Traduções';
$iTLT = new IFAdmin(new Arquivos(Sistema::$adminLayoutCaminhoDiretorio . "/SistemaConfiguracoes/listarTraducoes.html"));
$iTLT->trocar("linkDeletar.Traducao", "?p=" . $_GET['p'] . "&a=" . $_GET['a'] . "&");
$iTLT->trocar("linkBuscar.Traducao", "?p=" . $_GET['p'] . "&");
$lI = new ListaIdiomas();
$lI->condicoes('', $_GET['idioma'], ListaIdiomas::ID);
if ($lI->getTotal() > 0) {
    $i = $lI->listar();
} else {
    $i = new Idioma();
}
if (!empty($_GET['deletar'])) {
    $lT = new ListaTraducoes();
    $lT->condicoes('', $_GET['deletar'], ListaTraducoes::ID);
    if ($lT->getTotal() > 0) {
        try {
            $lT->deletar($lT->listar());
            $javaScript .= Aviso::criar("Tradução removida com sucesso!");
        } catch (Exception $e) {
            $javaScript .= Aviso::criar($e->getMessage());
        }
    }
}
$iTLT->createRepeticao("repetir->Traducoes");
if (!empty($_GET['busca'])) {
    $i->getTraducoes()->condicoes('', "%" . $_GET['busca'] . "%", 'empresa', 'LIKE');
}
$iTLT->condicao("condicaoBusca", !empty($_SESSION['nivel']));