public function alterar(Vendedor $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; if ($t->getImagem()->getImage()->nome != '') { $lI = new ListaImagens(); $lI->caminhoEscrita = Sistema::$caminhoDiretorio . Sistema::$caminhoDataTextos; $lI->caminhoLeitura = Sistema::$caminhoURL . Sistema::$caminhoDataTextos; $img = $t->getImagem(); if ($img->getId() != '') { $lI->alterar($img); } else { $t->getImagem()->setSessao($this->getTabela(), $t->getId()); $lI->inserir($img); } $t->setImagem($img); } $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::IMAGEM, $t->getImagem()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOME, $t->nome, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::EMAIL, $t->email, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::MSN, $t->msn, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SKYPE, $t->skype, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VOIP, $t->voip, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TELEFONE, $t->telefone, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::RAMAL, $t->ramal, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); }
public function alterar(Mailing $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::STATUS, $t->getStatus(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATA, $t->getData()->mostrar("YmdHi"), $where); }
public function alterar(PerguntaCategoria $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); }
public function alterar(UploadDownloadArquivo $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::PRODUTOS, $t->produtos, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); }
public function alterar(Texto $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; if ($t->getImagem()->getImage()->nome != '') { $lI = new ListaImagens(); $lI->caminhoEscrita = Sistema::$caminhoDiretorio . Sistema::$caminhoDataTextos; $lI->caminhoLeitura = Sistema::$caminhoURL . Sistema::$caminhoDataTextos; $img = $t->getImagem(); if ($img->getId() != '') { $lI->alterar($img); } else { $t->getImagem()->setSessao($this->getTabela(), $t->getId()); $lI->inserir($img); } $t->setImagem($img); } $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::URL, $t->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::IMAGEM, $t->getImagem()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SUBTITULO, $t->subTitulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TEXTOPEQUENO, str_replace("'", "\\'", $t->textoPequeno), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TEXTO, str_replace("'", "\\'", $t->texto), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); }
public function alterar(BannerCategoria $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LARGURA, $t->getLargura()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ALTURA, $t->getAltura()->formatar(), $where); }
public function alterar(NoticiaUrgente $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOTICIA, $t->noticia, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATA, $t->getData()->mostrar("YmdHi"), $where); }
public function alterar(Noticia $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::URL, $t->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TEXTO, $t->getTexto()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATA, $t->getData()->mostrar("YmdHi"), $where); }
public function alterar(NoticiaCategoria $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, parent::URL, $t->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, parent::TEXTO, $t->getTexto()->getId(), $where); }
public function alterar(Email $email) { parent::alterar($email); $where = "WHERE " . self::ID . " = '" . $email->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCRICAO, $email->descricao, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::EMAIL, $email->email, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::PRINCIPAL, $email->principal ? self::VALOR_PRINCIPAL_TRUE : self::VALOR_PRINCIPAL_FALSE, $where); }
public function alterar(Telefone $tel) { parent::alterar($tel); $where = "WHERE " . self::ID . " = '" . $tel->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LOCAL, $tel->local, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DDD, $tel->ddd, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TELEFONE, $tel->telefone, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::RAMAL, $tel->ramal, $where); }
public function alterar(Ticket $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $dT = new DataHora(); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NIVEL, $t->getNivel(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::STATUS, $t->getStatus(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SATISFACAO, $t->getSatisfacao(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATAHORA_ALTERACAO, $dT->mostrar("YmdHi"), $where); }
public function alterar(Musica $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; if ($t->getMusica()->nome != "") { $arquivo = $t->getMusica()->saveArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataDiscografia); } $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::MUSICA, $arquivo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); }
public function alterar(TicketPost $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; if ($t->getArquivo()->nome != '') { $arquivo = $t->getArquivo()->saveArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataTickets); } $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TEXTO, $t->texto, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOME, $t->nome, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ARQUIVO, $arquivo, $where); }
public function alterar(Recado $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SESSAO, $t->getSessao(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::IDSESSAO, $t->getIdSessao(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TEXTO, $t->getTexto()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATA, $t->getData()->mostrar("YmdHi"), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LOCAL, $t->local, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOME, $t->nome, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::EMAIL, $t->email, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LIBERADO, $t->getSituacao() ? self::VALOR_LIBERADO_TRUE : self::VALOR_LIBERADO_FALSE, $where); }
public function alterar(Galeria $g) { parent::alterar($g); $where = "WHERE " . self::ID . " = '" . $g->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::URL, $g->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $g->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCRICAO, $g->descricao, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LOCAL, $g->local, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TIPO, $g->tipo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATA, $g->getData()->mostrar("YmdHi"), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VIDEO, $g->getVideo(), $where); //$this->con->alterar(Sistema::$BDPrefixo.$this->tabela, self::DESCRICAO, $p->descricao, $where); }
public function alterar(MusicaCategoria $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; if ($t->getCapa()->nome != "") { $imagem = $t->getCapa()->saveImage(Sistema::$caminhoDiretorio . Sistema::$caminhoDataDiscografia); } $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SUBTITULO, $t->subTitulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::GRAVADORA, $t->gravadora, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATALANCAMENTO, $t->getDataLancamento()->mostrar("Ymd"), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CAPA, $imagem, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); }
public function alterar(ProdutoMarca $m) { parent::alterar($m); $disponivel = $m->disponivel ? self::VALOR_DISPONIVEL_TRUE : self::VALOR_DISPOINVEL_FALSE; $where = "WHERE " . self::ID . " = '" . $m->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOME, $m->nome, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::URL, $m->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCRICAO, $m->descricao, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ENDERECOURL, $m->enderecoURL, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DISPONIVEL, $disponivel, $where); if (!empty($m->getImagem()->url)) { $m->getImagem()->open(); $imagem = $m->getImagem()->saveImage(Sistema::$caminhoDiretorio . Sistema::$caminhoDataProdutoMarcas, $m->getId()); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::IMAGEM, $imagem, $where); } }
public function alterar(Pergunta $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; if ($t->getImagem()->getImage()->nome != '') { $lI = new ListaImagens(); $lI->caminhoEscrita = Sistema::$caminhoDiretorio . Sistema::$caminhoDataFAQ; $lI->caminhoLeitura = Sistema::$caminhoURL . Sistema::$caminhoDataFAQ; $img = $t->getImagem(); $lI->inserir($img); $t->setImagem($img); } $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CATEGORIA, $t->getIdCategoria(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::URL, $t->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::IMAGEM, $t->getImagem()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TEXTO, $t->texto, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); }
public function alterar(ProdutoCategoria $pC) { parent::alterar($pC); $where = "WHERE " . self::ID . " = '" . $pC->getId() . "'"; $disponivel = $pC->disponivel ? self::VALOR_DISPONIVEL_TRUE : self::VALOR_DISPONIVEL_FALSE; $visaoUnica = $pC->visaoUnica ? self::VALOR_VISAOUNICA_TRUE : self::VALOR_VISAOUNICA_FALSE; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOME, $pC->nome, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::URL, $pC->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $pC->ordem, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DISPONIVEL, $pC->disponivel, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VISAOUNICA, $pC->visaoUnica, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCRICAOPEQUENA, $pC->descricaoPequena, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCRICAO, $pC->descricao, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SUBREFERENCIA, $pC->subreferencia, $where); if (!empty($pC->getImagem()->url)) { $pC->getImagem()->open(); $imagem = $pC->getImagem()->saveImage(Sistema::$caminhoDiretorio . Sistema::$caminhoDataProdutoCategorias, $pC->getId()); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::IMAGEM, $imagem, $where); } }
public function alterar(OfertaColetiva $p) { parent::alterar($p); $where = "WHERE " . self::ID . " = '" . $p->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::EMPRESA, $p->getEmpresa()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $p->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SUBTITULO, $p->subTitulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESTAQUES, $p->destaques, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::REGULAMENTO, $p->regulamento, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VALORORIGINAL, $p->valorOriginal->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCONTO, $p->desconto->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ECONOMIA, $p->economia->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VALOR, $p->valor->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::QUANTIDADE, $p->quantidade, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::COMPRASMINIMA, $p->comprasMinima, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::COMPRASMAXIMA, $p->comprasMaxima, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::COMPRASEFETUADAS, $p->comprasEfetuadas, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATAINICIO, $p->getDataInicio()->mostrar("YmdHi"), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATAFIM, $p->getDataFim()->mostrar("YmdHi"), $where); }
public function alterar(Slide $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; if ($t->getImagem()->nome != '') { $t->getImagem()->open(); $imagem = $t->getImagem()->saveImage(Sistema::$caminhoDiretorio . Sistema::$caminhoDataSlides); } $ativo = $t->ativo ? self::VALOR_ATIVO_TRUE : self::VALOR_ATIVO_FALSE; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::IMAGEM, $imagem, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::FLASH, $t->getFlash(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SEGUNDOS, $t->segundos, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ENDERECOURL, $t->enderecoURL, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ATIVO, $ativo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TIPO, $t->tipo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LEGENDA, $t->legenda, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CORFUNDO, $t->corfundo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $t->ordem, $where); }
public function alterar(Pedido $p) { $where = "WHERE " . self::ID . " = '" . $p->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::QUANTIDADE, $p->quantidade, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::OBSERVACOES, $p->observacoes, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TIPOPAGAMENTO, $p->getTipoPagamento(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATA, $p->getData()->mostrar("YmdHi"), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::STATUS, $p->getStatus()->getStatus(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VALOR, $p->getValor()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCONTO, $p->getDesconto()->num, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ESTOQUE, $p->estoque, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VENDEDOR, $p->getVendedor(), $where); $lPEE = new ListaPedidoEnderecoEntregas(); $lPEE->condicoes('', $p->getId(), ListaPedidoEnderecoEntregas::IDSESSAO); if ($lPEE->getTotal() > 0) { $lPEE->alterar($p->getEndereco(), $p); } else { $lPEE->inserir($p->getEndereco(), $p); } parent::alterar($p); }
public function alterar(Banner $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; if ($t->getImagem()->nome != '') { $t->getImagem()->open(); $imagem = $t->getImagem()->saveImage(Sistema::$caminhoDiretorio . Sistema::$caminhoDataBanners); } $ativo = $t->ativo ? self::VALOR_ATIVO_TRUE : self::VALOR_ATIVO_FALSE; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::IMAGEM, $imagem, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::FLASH, $t->getFlash(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATAINICIO, $t->getDataInicio()->mostrar("YmdHis"), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATAFIM, $t->getDataFim()->mostrar("YmdHis"), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CLICKS, $t->clicks, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ENDERECOURL, $t->enderecoURL, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ATIVO, $ativo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TIPO, $t->tipo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LARGURA, $t->getLargura()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ALTURA, $t->getAltura()->formatar(), $where); }
public function alterar($pes) { parent::alterar($pes); $where = "WHERE " . self::ID . " = '" . $pes->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::RAZAOSOCIAL, $pes->razaoSocial, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CNPJ, $pes->cnpj, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SEXO, $pes->sexo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::RG, $pes->rg, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CPF, $pes->cpf, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATANASC, $tipo == self::VALOR_TIPO_PESSOA_FISICA ? $pes->getDataNasc()->mostrar("Ymd") : '', $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::USUARIO, $pes->usuario, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOME, $pes->nome, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::EMAIL, $pes->emailPrimario, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SENHA, $pes->senha, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::EMAILSECUNDARIO, $pes->emailSecundario, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SITE, $pes->site, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATACADASTRO, $pes->getDataCadastro()->mostrar("YmdHi"), $where); if ($pes->getFoto()->nome != '') { $foto = $pes->getFoto()->saveImage(Sistema::$caminhoDiretorio . Sistema::$caminhoDataPessoasPerfil); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::FOTO, $foto, $where); } }
public function alterar(GaleriaCategoria $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::PROTEGIDO, $t->protegido ? self::VALOR_PROTEGIDO_TRUE : self::VALOR_PROTEGIDO_FALSE, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ALTURA, $t->getAltura()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LARGURA, $t->getLargura()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ALTURAMEDIA, $t->getAlturaMedia()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LARGURAMEDIA, $t->getLarguraMedia()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ALTURAPEQUENA, $t->getAlturaPequena()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LARGURAPEQUENA, $t->getLarguraPequena()->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, parent::URL, $t->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, parent::TEXTO, $t->getTexto()->getId(), $where); if (!file_exists(Sistema::$caminhoDiretorio . Sistema::$caminhoDataGalerias . $t->getLargura()->formatar('', '', 0))) { mkdir(Sistema::$caminhoDiretorio . Sistema::$caminhoDataGalerias . $t->getLargura()->formatar('', '', 0)); } if (!file_exists(Sistema::$caminhoDiretorio . Sistema::$caminhoDataGalerias . $t->getLarguraMedia()->formatar('', '', 0))) { mkdir(Sistema::$caminhoDiretorio . Sistema::$caminhoDataGalerias . $t->getLarguraMedia()->formatar('', '', 0)); } if (!file_exists(Sistema::$caminhoDiretorio . Sistema::$caminhoDataGalerias . $t->getLarguraPequena()->formatar('', '', 0))) { mkdir(Sistema::$caminhoDiretorio . Sistema::$caminhoDataGalerias . $t->getLarguraPequena()->formatar('', '', 0)); } }
public function alterar(PacoteMailing $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TITULO, $t->titulo, $where); }
public function alterar(Endereco $end) { parent::alterar($end); $where = "WHERE " . self::ID . " = '" . $end->getId() . "'"; $e = $end->getEstado(); if ($e->getId() <= 0) { $lE = new ListaEstados(); $lE->inserir($e); $end->setEstado($e); } $c = $end->getCidade(); if ($c->getId() <= 0) { $lC = new ListaCidades(); $lC->inserir($c); $end->setCidade($c); } else { $lC = new ListaCidades(); $lC->condicoes('', $c->getId(), ListaCidades::ID); if ($lC->getTotal() <= 0) { if ($c->getPais()->getId() <= 0) { $c->setPais($end->getPais()); } if ($c->getEstado()->getId() <= 0) { $c->setEstado($end->getEstado()); } $this->con->executar("INSERT INTO " . Sistema::$BDPrefixo . $lC->getTabela() . "(" . ListaCidades::ID . ", " . ListaCidades::PAIS . ", " . ListaCidades::ESTADO . ", " . ListaCidades::NOME . ", " . ListaCidades::DDD . ") VALUES('" . $c->getId() . "','" . $c->getPais()->getId() . "','" . $c->getEstado()->getId() . "','" . $c->nome . "','" . $c->ddd . "')"); $id = $this->con->getId(); $end->setCidade(new Cidade($id)); } } $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LOGRADOURO, $end->logradouro, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NUMERO, $end->numero, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::COMPLEMENTO, $end->complemento, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::BAIRRO, $end->bairro, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CIDADE, $end->getCidade()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ESTADO, $end->getEstado()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::PAIS, $end->getPais()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CEP, $end->getCep(), $where); }
public function alterar(Produto $p) { parent::alterar($p); $where = "WHERE " . self::ID . " = '" . $p->getId() . "'"; $disponivel = $p->disponivel ? self::VALOR_DISPONIVEL_TRUE : self::VALOR_DISPONIVEL_FALSE; $promocao = $p->promocao ? self::VALOR_DISPONIVEL_TRUE : self::VALOR_DISPONIVEL_FALSE; $lancamento = $p->lancamento ? self::VALOR_DISPONIVEL_TRUE : self::VALOR_DISPONIVEL_FALSE; $destaque = $p->destaque ? self::VALOR_DISPONIVEL_TRUE : self::VALOR_DISPONIVEL_FALSE; $removido = $p->removido ? self::VALOR_DISPONIVEL_TRUE : self::VALOR_DISPONIVEL_FALSE; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::URL, $p->getURL()->getId(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOME, addslashes(str_replace("\"", "'", $p->nome)), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::PESO, $p->peso->formatar(".", "", 3), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LARGURA, $p->largura->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ALTURA, $p->altura->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::COMPRIMENTO, $p->comprimento->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VALORCUSTO, $p->valorCusto->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VALORREAL, $p->valorReal->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VALORVENDA, $p->valorVenda->formatar(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ESTOQUE, $p->estoque, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCRICAOPEQUENA, addslashes($p->descricaoPequena), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESCRICAO, addslashes($p->descricao), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DISPONIVEL, $disponivel, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::PROMOCAO, $promocao, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::LANCAMENTO, $lancamento, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DESTAQUE, $destaque, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::REMOVIDO, $removido, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORDEM, $p->ordem, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CODIGO, $p->codigo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::FRETE, $p->frete, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TIPOPEDIDO, $p->tipoPedido, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::TIPOUNIDADE, addslashes(str_replace("\"", "'", $p->tipoUnidade)), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::QUANTIDADEU, $p->quantidadeu, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VIDEO, $p->getVideo(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::MARCA, $p->getMarca()->getId(), $where); }
public function alterar($pes) { parent::alterar($pes); $where = "WHERE " . self::ID . " = '" . $pes->getId() . "'"; $atacadista = $pes->atacadista ? self::VALOR_ATACADISTA_TRUE : self::VALOR_ATACADISTA_FALSE; $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::RAZAOSOCIAL, $pes->razaoSocial, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CNPJ, $pes->cnpj, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SEXO, $pes->sexo, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::RG, $pes->rg, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::CPF, $pes->cpf, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ATACADISTA, $atacadista, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::ORIGEMCADASTRO, $pes->origemCadastro, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::VENDEDOR, $pes->getVendedor(), $where); if (is_a($pes, "PessoaFisica")) { $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATANASC, $pes->getDataNasc()->mostrar("Ymd"), $where); } $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::USUARIO, $pes->usuario, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NOME, $pes->nome, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SOBRENOME, $pes->sobreNome, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::EMAIL, $pes->emailPrimario, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SENHA, $pes->senha, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::EMAILSECUNDARIO, $pes->emailSecundario, $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SITE, $pes->site, $where); //$this->con->alterar(Sistema::$BDPrefixo.$this->tabela, self::DATACADASTRO, $pes->getDataCadastro()->mostrar("YmdHi"), $where); if ($pes->getFoto()->nome != '') { $foto = $pes->getFoto()->saveImage(Sistema::$caminhoDiretorio . Sistema::$caminhoDataPessoasPerfil); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::FOTO, $foto, $where); } }