Created
March 16, 2017 21:06
-
-
Save zr0n/223426a26a84c1972886e4798ff35962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("Banco.php"); | |
class Cadastro extends Banco { | |
private $titulo; | |
private $categoria; | |
private $descricao; | |
private $endereco; | |
private $telefone; | |
private $celular; | |
private $upload; | |
public function setTitulo($string) { | |
$this->titulo = $string; | |
} | |
public function setCategoria($string) { | |
$this->categoria = $string; | |
} | |
public function setDescricao($string) { | |
$this->descricao = $string; | |
} | |
public function setEndereco($string) { | |
$this->endereco = $string; | |
} | |
public function setTelefone($string) { | |
$this->telefone = $string; | |
} | |
public function setCelular($string) { | |
$this->celular = $string; | |
} | |
public function setUpload($boolean) { | |
$this->upload= $boolean; | |
} | |
public function getTitulo() { | |
return $this->titulo; | |
} | |
public function getCategoria() { | |
return $this->categoria; | |
} | |
public function getDescricao() { | |
return $this->descricao; | |
} | |
public function getEndereco() { | |
return $this->endereco; | |
} | |
public function getTelefone() { | |
return $this->telefone; | |
} | |
public function getCelular() { | |
return $this->celular; | |
} | |
public function getUpload() { | |
return $this->upload; | |
} | |
public function incluir() { | |
$this->tabela = "cadastro"; | |
$this->campos = array("titulo", "categoria", "descricao","endereco","telefone","celular", "upload"); | |
$this->setUpload(file_get_contents($_FILES['upload']['tmp_name'])); | |
$this->valores = array($this->getTitulo(),$this->getCategoria(),$this->getDescricao(),$this->getEndereco(),$this->getTelefone(),$this->getCelular(),$this->getUpload()); | |
$result = $this->inserirRegistro(); | |
return $result; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment