-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sistema de gerenciamento de vídeo educacional
- Loading branch information
root
committed
Jul 14, 2014
0 parents
commit 7571c9b
Showing
1,009 changed files
with
141,092 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
<?php | ||
|
||
class Aluno{ | ||
|
||
public $idaluno; | ||
public $nome; | ||
public $cpf; | ||
public $email; | ||
public $senha; | ||
public $tel; | ||
public $cel; | ||
public $endereco; | ||
public $complemento; | ||
public $cep; | ||
public $bairro; | ||
public $cidade; | ||
public $estado; | ||
public $cliente_idcliente; | ||
|
||
protected function setidaluno($idaluno){ | ||
$this->idaluno = $idaluno; | ||
} | ||
|
||
protected function setnome($nome){ | ||
$this->nome = $nome; | ||
} | ||
|
||
protected function setcpf($cpf){ | ||
$this->cpf = $cpf; | ||
} | ||
|
||
protected function setemail($email){ | ||
$this->email = $email; | ||
} | ||
|
||
protected function setsenha($senha){ | ||
$this->senha = $senha; | ||
} | ||
|
||
protected function settel($tel){ | ||
$this->tel = $tel; | ||
} | ||
|
||
protected function setcel($cel){ | ||
$this->cel = $cel; | ||
} | ||
|
||
protected function setendereco($endereco){ | ||
$this->endereco = $endereco; | ||
} | ||
|
||
protected function setcomplemento($complemento){ | ||
$this->complemento = $complemento; | ||
} | ||
|
||
protected function setbairro($bairro){ | ||
$this->bairro = $bairro; | ||
} | ||
|
||
protected function setcep($cep){ | ||
$this->cep = $cep; | ||
} | ||
|
||
protected function setcidade($cidade){ | ||
$this->cidade = $cidade; | ||
} | ||
|
||
protected function setestado($estado){ | ||
$this->estado = $estado; | ||
} | ||
|
||
protected function setcliente_idcliente($cliente_idcliente){ | ||
$this->cliente_idcliente = $cliente_idcliente; | ||
} | ||
|
||
public function all($id, $cliente){ | ||
|
||
$arr = array(); | ||
|
||
if($id == ''){ | ||
$sql = "SELECT * FROM `aluno` WHERE cliente_idcliente=$cliente;"; | ||
$vai = new MySQLDB(); | ||
$result = $vai->executeQuery($sql); | ||
}else{ | ||
$sql = "SELECT `idaluno`, `nome`, `email`, `senha`, `cpf`, `tel`, `cel`, `endereco`, `complemento`, `bairro`, `cep`, `cidade`, `estado`, `cliente_idcliente` FROM `aluno` WHERE `idaluno` = $id;"; | ||
$vai = new MySQLDB(); | ||
$result = $vai->executeQuery($sql); | ||
} | ||
|
||
while($dados = mysql_fetch_array($result)){ | ||
$cliente = new Aluno(); | ||
$cliente->setidaluno(array('idaluno' => $dados['idaluno'])); | ||
$cliente->setnome(array('nome' => $dados['nome'])); | ||
$cliente->setcpf(array('cpf' => $dados['cpf'])); | ||
$cliente->setemail(array('email' => $dados['email'])); | ||
$cliente->setsenha(array('senha' => $dados['senha'])); | ||
$cliente->settel(array('tel' => $dados['tel'])); | ||
$cliente->setcel(array('cel' => $dados['cel'])); | ||
$cliente->setendereco(array('endereco' => $dados['endereco'])); | ||
$cliente->setcomplemento(array('complemento' => $dados['complemento'])); | ||
$cliente->setbairro(array('bairro' => $dados['bairro'])); | ||
$cliente->setcep(array('cep' => $dados['cep'])); | ||
$cliente->setcidade(array('cidade' => $dados['cidade'])); | ||
$cliente->setestado(array('estado' => $dados['estado'])); | ||
$cliente->setcliente_idcliente(array('cliente_idcliente' => $dados['cliente_idcliente'])); | ||
$arr[] = $cliente; | ||
} | ||
return $arr; | ||
} | ||
|
||
public function PASSAluno($idaluno, $senha, $cliente){ | ||
$sql = "UPDATE `aluno` SET `senha`='$senha' WHERE `idaluno`=$idaluno;"; | ||
$vai = new MySQLDB(); | ||
$vai->executeQuery($sql); | ||
header ("Location: edit_aluno.php?vi=senha&nu=$idaluno&ed=$cliente"); | ||
} | ||
|
||
public function Cad($nome, $cpf, $email, $senha, $tel, $cel, $endereco, $complemento, $bairro, $cep, $cidade, $estado, $cliente_idcliente){ | ||
$sql = "INSERT INTO `aluno` (`nome`, `cpf`, `email`, `senha`, `tel`, `cel`, `endereco`, `complemento`, `bairro`, `cep`, `cidade`, `estado`, `cliente_idcliente`) VALUES ('$nome', '$cpf', '$email', '$senha', '$tel', '$cel', '$endereco', '$complemento', '$bairro', '$cep', $cidade, $estado, $cliente_idcliente);"; | ||
$vai = new MySQLDB(); | ||
$vai->executeQuery($sql); | ||
header ("Location: aluno.php?vi=cad&ed=$cliente_idcliente"); | ||
} | ||
|
||
public function Edit($idaluno, $nome, $cpf, $email, $tel, $cel, $endereco, $complemento, $bairro, $cep, $cidade, $estado, $cliente_idcliente){ | ||
$sql = "UPDATE `aluno` SET `nome`='$nome', `cpf`='$cpf', `email`='$email', `tel`='$tel', `cel`='$cel', `endereco`='$endereco', `complemento`='$complemento', `bairro`='$bairro', `cep`='$cep', `cidade`=$cidade, `estado`=$estado WHERE `idaluno`=$idaluno;"; | ||
$vai = new MySQLDB(); | ||
$vai->executeQuery($sql); | ||
header ("Location: edit_aluno.php?vi=edit&nu=$idaluno&ed=$cliente_idcliente"); | ||
} | ||
|
||
public function Del($id, $cliente){ | ||
$sql = "DELETE FROM `aluno` WHERE `idaluno` = $id;"; | ||
$vai = new MySQLDB(); | ||
$vai->ExecuteQuery($sql); | ||
header ("Location: aluno.php?vi=del&ed=$cliente"); | ||
} | ||
|
||
} | ||
|
||
?> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?php | ||
|
||
class Aula{ | ||
|
||
public $idaula; | ||
public $nome; | ||
public $endereco_video; | ||
public $descricao; | ||
public $curso_idcurso; | ||
public $cliente_idcliente; | ||
public $disciplina; | ||
|
||
|
||
protected function setidaula($idaula){ | ||
$this->idaula = $idaula; | ||
} | ||
|
||
protected function setnome($nome){ | ||
$this->nome = $nome; | ||
} | ||
|
||
protected function setendereco_video($endereco_video){ | ||
$this->endereco_video = $endereco_video; | ||
} | ||
|
||
protected function setdescricao($descricao){ | ||
$this->descricao = $descricao; | ||
} | ||
|
||
protected function setcurso_idcurso($curso_idcurso){ | ||
$this->curso_idcurso = $curso_idcurso; | ||
} | ||
|
||
protected function setcliente_idcliente($cliente_idcliente){ | ||
$this->cliente_idcliente = $cliente_idcliente; | ||
} | ||
|
||
protected function setdisciplina($disciplina){ | ||
$this->disciplina = $disciplina; | ||
} | ||
|
||
public function all($id, $cliente){ | ||
|
||
$arr = array(); | ||
|
||
if($id == ''){ | ||
$sql = "SELECT `aula`.`idaula`, `aula`.`nome`, `aula`.`endereco_video`, `aula`.`descricao`, `aula`.`curso_idcurso`, `aula`.`cliente_idcliente`, `curso`.`nome` AS `disciplina` FROM `aula` | ||
INNER JOIN `curso` ON `curso_idcurso`=`idcurso` WHERE `aula`.`cliente_idcliente`=$cliente;"; | ||
$vai = new MySQLDB(); | ||
$result = $vai->executeQuery($sql); | ||
}else{ | ||
$sql = "SELECT `aula`.`idaula`, `aula`.`nome`, `aula`.`endereco_video`, `aula`.`descricao`, `aula`.`curso_idcurso`, `aula`.`cliente_idcliente`, `curso`.`nome` AS `disciplina` FROM `aula` | ||
INNER JOIN `curso` ON `curso_idcurso`=`idcurso` WHERE `aula`.`idaula` = $id;"; | ||
$vai = new MySQLDB(); | ||
$result = $vai->executeQuery($sql); | ||
} | ||
while($dados = mysql_fetch_array($result)){ | ||
$cliente = new Aula(); | ||
$cliente->setidaula(array('idaula' => $dados['idaula'])); | ||
$cliente->setnome(array('nome' => $dados['nome'])); | ||
$cliente->setendereco_video(array('endereco_video' => $dados['endereco_video'])); | ||
$cliente->setdescricao(array('descricao' => $dados['descricao'])); | ||
$cliente->setcurso_idcurso(array('curso_idcurso' => $dados['curso_idcurso'])); | ||
$cliente->setcliente_idcliente(array('cliente_idcliente' => $dados['cliente_idcliente'])); | ||
$cliente->setdisciplina(array('disciplina' => $dados['disciplina'])); | ||
$arr[] = $cliente; | ||
} | ||
return $arr; | ||
} | ||
|
||
public function Cad($nome, $endereco_video, $descricao, $curso_idcurso, $cliente_idcliente){ | ||
$sql = "INSERT INTO `aula` (`nome`, `endereco_video`, `descricao`, `curso_idcurso`, `cliente_idcliente`) VALUES ('$nome', '$endereco_video', '$descricao', $curso_idcurso, $cliente_idcliente);"; | ||
$vai = new MySQLDB(); | ||
$vai->executeQuery($sql); | ||
header ("Location: aula.php?vi=cad&ed=$cliente_idcliente"); | ||
} | ||
|
||
public function Edit($idaula, $nome, $endereco_video, $descricao, $curso_idcurso, $cliente_idcliente){ | ||
$sql = "UPDATE `aula` SET `nome`='$nome', `endereco_video`='$endereco_video', `descricao`='$descricao', `curso_idcurso`=$curso_idcurso WHERE `idaula`=$idaula;"; | ||
$vai = new MySQLDB(); | ||
$vai->executeQuery($sql); | ||
header ("Location: vi_aula.php?vi=edit&nu=$idaula&ed=$cliente_idcliente"); | ||
} | ||
|
||
public function Del($id, $cliente){ | ||
$sql = "DELETE FROM `aula` WHERE `idaula` = $id;"; | ||
$vai = new MySQLDB(); | ||
$vai->ExecuteQuery($sql); | ||
header ("Location: aula.php?vi=del&ed=$cliente"); | ||
} | ||
|
||
} | ||
|
||
?> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
class Cidades{ | ||
|
||
public $estados_cod_estados; | ||
public $cod_cidades; | ||
public $nome; | ||
public $cep; | ||
public $cidade; | ||
public $estado; | ||
|
||
protected function setestados_cod_estados($estados_cod_estados){ | ||
$this->estados_cod_estados = $estados_cod_estados; | ||
} | ||
|
||
protected function setcod_cidades($cod_cidades){ | ||
$this->cod_cidades = $cod_cidades; | ||
} | ||
|
||
protected function setnome($nome){ | ||
$this->nome = $nome; | ||
} | ||
|
||
protected function setcep($cep){ | ||
$this->cep = $cep; | ||
} | ||
|
||
protected function setcidade($cidade){ | ||
$this->cidade = $cidade; | ||
} | ||
|
||
protected function setestado($estado){ | ||
$this->estado = $estado; | ||
} | ||
|
||
public function all($id_cidades){ | ||
|
||
if($id_cidades == ''){ | ||
$sql = "SELECT * FROM `cidades`;"; | ||
$vai = new MySQLDB(); | ||
$result = $vai->ExecuteQuery($sql); | ||
while($dados = mysql_fetch_array($result)){ | ||
$cliente = new Cidades; | ||
$cliente->setestados_cod_estados(array('estados_cod_estados' => $dados['estados_cod_estados'])); | ||
$cliente->setcod_cidades(array('cod_cidades' => $dados['cod_cidades'])); | ||
$cliente->setnome(array('nome' => $dados['nome'])); | ||
$cliente->setcep(array('cep' => $dados['cep'])); | ||
$arr[] = $cliente; | ||
} | ||
return $arr; | ||
}else{ | ||
$sql = "SELECT `estados_cod_estados`, `cod_cidades`, `cidades`.`nome` AS cidade, `estados`.`nome` AS estado FROM `cidades` | ||
INNER JOIN `estados` ON `cod_estados` = `estados_cod_estados` | ||
WHERE `cod_cidades` = $id_cidades;"; | ||
$vai = new MySQLDB(); | ||
$result = $vai->ExecuteQuery($sql); | ||
while($dados = mysql_fetch_array($result)){ | ||
$cliente = new Cidades; | ||
$cliente->setestados_cod_estados(array('estados_cod_estados' => $dados['estados_cod_estados'])); | ||
$cliente->setcod_cidades(array('cod_cidades' => $dados['cod_cidades'])); | ||
$cliente->setcidade(array('cidade' => $dados['cidade'])); | ||
$cliente->setestado(array('estado' => $dados['estado'])); | ||
$arr[] = $cliente; | ||
} | ||
return $arr; | ||
} | ||
} | ||
|
||
} | ||
|
||
?> |
Oops, something went wrong.