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); }
} if ($rs['posicaovertical'] == 1) { $y = 0; } elseif ($rs['posicaovertical'] == 2) { $y = $img->getImage()->altura / 2 - $ma->altura / 2; } elseif ($rs['posicaovertical'] == 3) { $y = $img->getImage()->altura - $ma->altura; } $img->getImage()->combineImage($ma, 0, 0, $x, $y, 50); } } $lIM = new ListaImagens(); $lIM->caminhoEscrita = Sistema::$caminhoDiretorio . Sistema::$caminhoDataProdutos; $lIM->caminhoLeitura = Sistema::$caminhoURL . Sistema::$caminhoDataProdutos; $img->getImage()->redimensionar(1500, 1500); $lIM->inserir($img); exit; } $iAP->condicao("condicaoBotoes", true); $iAP->trocar("linkCadastrarVariacao", "?p=" . $_GET['p'] . "&a=cadastrarProduto&produtoPai=" . $p->getId()); $botoes = $iAP->cutParte('botoes'); $iAP->condicao('condicao->alterar.Produto', false); $iAP->trocar("linkVoltar", "?p=" . $_GET['p'] . "&a=listarProdutos"); $iAP->condicao("condicao->ProdutoPai", $produtoPai->getId() != 0); $iAP->trocar("nome.ProdutoPai", $produtoPai->nome); $iAP->trocar("linkAlterar.ProdutoPai", "?p=" . $_GET['p'] . "&a=" . $_GET['a'] . "&produto=" . $produtoPai->getId()); $iAP->trocar("nome", $p->nome); $lPM = new ListaProdutoMarcas(); $iAP->createRepeticao("repetir->ProdutoMarcas"); while ($pM = $lPM->listar("ASC", ListaProdutoMarcas::NOME)) { $iAP->repetir();
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(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); }