Exemplo n.º 1
0
 public static function inscrever($post, $tipo)
 {
     self::$date = date("Y-m-d H:i:s");
     global $database;
     $codigo = md5($_POST['email']);
     if ($tipo == "cpfsenior") {
         $sql = "INSERT INTO " . self::$table_name . " (name,name_cracha,email,pass,birth,genero,tshirt,country,cpf,estado,cidade,phone,type,empresa,cargo,segmento,date,confirm,cep,bairro,rua,numero,complemento,celular,codigo) VALUES ('{$post['name']}','{$post['name_cracha']}','{$post['email']}','{$post['pass']}','{$post['birth']}','{$post['genero']}','{$post['tshirt']}','{$post['country']}','{$post['cpf']}','{$post['estado']}','{$post['cidade']}','{$post['phone']}','{$post['type']}','{$post['empresa']}','{$post['cargo']}','{$post['segmento']}','" . self::$date . "','false','{$post['cep']}','{$post['bairro']}','{$post['rua']}','{$post['numero']}','{$post['complemento']}','{$post['cel_phone']}','" . $codigo . "')";
     }
     if ($tipo == "cpfjunior") {
         $sql = "INSERT INTO " . self::$table_name . " (name,name_cracha,email,pass,birth,genero,tshirt,country,cpf,estado,cidade,phone,type,federacao,ej,cargo_jr,tempo,date,confirm,cep,bairro,rua,numero,complemento,celular,codigo) VALUES ('{$post['name']}','{$post['name_cracha']}','{$post['email']}','{$post['pass']}','{$post['birth']}','{$post['genero']}','{$post['tshirt']}','{$post['country']}','{$post['cpf']}','{$post['estado']}','{$post['cidade']}','{$post['phone']}','{$post['type']}','{$post['federacao']}','{$post['ej']}','{$post['cargo_jr']}','{$post['tempo']}','" . self::$date . "','false','{$post['cep']}','{$post['bairro']}','{$post['rua']}','{$post['numero']}','{$post['complemento']}','{$post['cel_phone']}','" . $codigo . "')";
     }
     if ($tipo == "passaportesenior") {
         $sql = "INSERT INTO " . self::$table_name . " (name,name_cracha,email,pass,birth,genero,tshirt,country,cpf,estado,cidade,phone,type,empresa,cargo,segmento,date,confirm,cep,bairro,rua,numero,complemento,celular,codigo) VALUES ('{$post['name']}','{$post['name_cracha']}','{$post['email']}','{$post['pass']}','{$post['birth']}','{$post['genero']}','{$post['tshirt']}','{$post['country']}','{$post['passport']}','{$post['estado']}','{$post['cidade']}','{$post['phone']}','{$post['type']}','{$post['empresa']}','{$post['cargo']}','{$post['segmento']}','" . self::$date . "','false','{$post['cep']}','{$post['bairro']}','{$post['rua']}','{$post['numero']}','{$post['complemento']}','{$post['cel_phone']}','" . $codigo . "')";
     }
     if ($tipo == "passaportejunior") {
         $sql = "INSERT INTO " . self::$table_name . " (name,name_cracha,email,pass,birth,genero,tshirt,country,cpf,estado,cidade,phone,type,federacao,ej,cargo_jr,tempo,date,confirm,cep,bairro,rua,numero,complemento,celular,codigo) VALUES ('{$post['name']}','{$post['name_cracha']}','{$post['email']}','{$post['pass']}','{$post['birth']}','{$post['genero']}','{$post['tshirt']}','{$post['country']}','{$post['passport']}','{$post['estado']}','{$post['cidade']}','{$post['phone']}','{$post['type']}','{$post['federacao']}','{$post['ej']}','{$post['cargo_jr']}','{$post['tempo']}','" . self::$date . "','false','{$post['cep']}','{$post['bairro']}','{$post['rua']}','{$post['numero']}','{$post['complemento']}','{$post['cel_phone']}','" . $codigo . "')";
     }
     if (!$database->query($sql)) {
         echo mysql_error();
         return mysql_error();
     }
     // seta a session para aparecer na index
     $_SESSION['mensagem'] = "Aguarde seu email";
     header("Location: ../views/index.php");
 }
Exemplo n.º 2
0
include_once "../classes/DB.php";
include_once "../classes/Inscrito.php";
include_once "../classes/Curso.php";
include_once "../classes/Campus.php";
include_once "../classes/Localprova.php";
include_once "../classes/UnidadeFederativa.php";
include_once "../classes/Municipio.php";
//$cpf = addslashes($_POST['cpf']);
//$id = $_POST['id'];
foreach ($_POST as $key => $valor) {
    ${$key} = addslashes(strtoupper($valor));
}
/* Acesso ao banco de dados */
$banco = DB::getInstance();
$conexao = $banco->ConectarDB();
$inscrito = new Inscrito();
if ($id) {
    $objinscrito = $inscrito->SelectById($conexao, $id);
} elseif ($cpf) {
    $objinscrito = $inscrito->SelectByCpf($conexao, $cpf);
}
if (empty($objinscrito[0])) {
    $_SESSION['flashMensagem'] = 'CPF não encontrado na nossa base de dados.';
    header("Location:" . $_SERVER['HTTP_REFERER']);
    exit;
}
// Obter Campus
$campus = new Campus(null, null);
$campusInscrito = $objinscrito[0]->getcampus();
$vetorCampusIncrito = $campus->SelectNomeCampus($conexao, $campusInscrito);
$nomeCampus = $vetorCampusIncrito->getNome();
Exemplo n.º 3
0
<?php

require_once "../models/inscrito.php";
Inscrito::confirma_cadastro($_GET['codigo'], $_GET['email']);
Exemplo n.º 4
0
?>

<?php 
//session_start();
require_once "../classes/DB.php";
require_once "../classes/Inscrito.php";
require_once "../classes/Campus.php";
require_once "../classes/Localprova.php";
$cpf = addslashes($_POST['cpf']);
$senha = addslashes($_POST['pwd']);
$mensagem = addslashes($_POST['mensagem']);
/* Acesso ao banco de dados */
$banco = DB::getInstance();
$conexao = $banco->ConectarDB();
//$inscrito = new Inscrito(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null); //36
$inscrito = new Inscrito();
$objinscrito = $inscrito->SelectByPrimaryKey($conexao, $cpf, $senha);
//if (empty($objinscrito[0])) {
//	$_SESSION['flashMensagem'] = 'Inscri&ccedil;&atilde;o n&atilde;o cadastrada na base de dados ou CPF e Senha n&atilde;o conferem.';
//	header("Location:" . $_SERVER['HTTP_REFERER']);
//}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title> <?php 
echo $_SESSION["Gnomeprocessoseletivo"];
?>
 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<link href="../../estilo_selecao.css" rel="stylesheet" type="text/css" />
Exemplo n.º 5
0
<?php

session_start("SELECAO");
session_start();
include "../classes/DB.php";
include "../classes/Inscrito.php";
$id = addslashes($_POST['id']);
/*Acesso ao banco de dados */
$banco = DB::getInstance();
$conexao = $banco->ConectarDB();
$inscrito = new Inscrito(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
$inscrito_eliminado = $inscrito->apagar($conexao, $id);
if ($inscrito_eliminado) {
    $_SESSION['flashMensagem'] = 'Inscrito exclu&iacute;do com sucesso.';
} else {
    $_SESSION['flashMensagem'] = 'Problemas ao efetuar o transa&ccedil;&atilde;o.';
}
header('Location: ../login/menu.php');
exit;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="pt-br" xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title> <?php 
echo $_SESSION["Gnomeprocessoseletivo"];
?>
 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<link href="../../estilo_selecao.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
	function delayer(){
Exemplo n.º 6
0
	</script>
</head>
<body>
<?php 
include_once "../classes/DB.php";
include_once "../classes/Inscrito.php";
include_once "../classes/Curso.php";
include_once "../classes/Campus.php";
include_once "../classes/Localprova.php";
include_once "../classes/UnidadeFederativa.php";
include_once "../classes/Municipio.php";
$id = $_POST['id'];
/* Acesso ao banco de dados */
$banco = DB::getInstance();
$conexao = $banco->ConectarDB();
$inscrito = new Inscrito();
$objinscrito = $inscrito->SelectById($conexao, $id);
if (count($objinscrito) == 0) {
    echo "<div align=" . '"' . "center" . '"' . ">";
    echo "<img src=" . '"' . "../../imgs/topo2/topo_formulario.png" . '"' . " alt=" . '"' . "Instituto Federal Baiano" . '"' . " />";
    echo "<h2>Formul&aacute;rio de Inscri&ccedil;&atilde;o</h2>";
    echo "<table border='0'>";
    echo "\t<tr>";
    echo "\t\t<td><div>Inscri&ccedil;&atilde;o n&atilde;o cadastrada na base de dados ou CPF e Senha n&atilde;o conferem.</div></td>";
    echo "\t</tr>";
    echo "\t<tr>";
    echo "\t\t<td><br /><div><a href=" . "javascript:window.history.go(-1)" . ">Voltar</a>" . " - " . "<a href=" . "../../index.php" . ">P&aacute;gina Inicial</a></div></td>";
    echo "\t</tr>";
    echo "</table>";
    echo "</div>";
} else {
Exemplo n.º 7
0
}
?>
			</table>
			<br />
			<form action="homologar.php" method="post">
				<input type="hidden" value="1" id="homologar" name="homologar" />
				<input type="hidden" value="<?php 
echo htmlspecialchars(serialize($ids));
?>
" id="ids" name="ids" />
				<input type="submit" value="Homologar Isentos" />
			</form>
			<?php 
if (isset($_POST['homologar']) && !empty($_POST['homologar'])) {
    $ids = implode(',', unserialize($_POST['ids']));
    $inscrito = new Inscrito();
    $resultado = $inscrito->homologarIsento($conexao, $ids);
    if ($resultado == true) {
        $_SESSION['flashMensagem'] = 'Isentos homologados com sucesso.';
    } else {
        $_SESSION['flashMensagem'] = 'Problemas ao efetuar o transa&ccedil;&atilde;o.';
    }
    header('Location: ../login/menu.php');
    exit;
}
?>
			<div class="voltar"><form><input type="button" value=" Voltar " onclick="history.go(-1)" /></form></div>
		</div>
	</div>
</body>
</html>
Exemplo n.º 8
0
include_once "../classes/DB.php";
include_once "../classes/Inscrito.php";
include_once "../classes/Curso.php";
include_once "../classes/Campus.php";
include_once "../classes/Localprova.php";
include_once "../classes/UnidadeFederativa.php";
include_once "../classes/Municipio.php";
foreach ($_POST as $key => $valor) {
    ${$key} = addslashes(strtoupper($valor));
}
/*Acesso ao banco de dados */
$banco = DB::getInstance();
$conexao = $banco->ConectarDB();
/*Verificar se possui cadastrado na base*/
$banco->startTransaction();
$inscrito = new Inscrito();
$inscrito->setid($id);
$inscrito->setnome($nome);
$inscrito->setendereco($endereco);
$inscrito->setbairro($bairro);
$inscrito->setcep($cep);
$inscrito->setcidade($municipio);
$inscrito->setestado($uf);
$inscrito->setemail($email);
$inscrito->setcpf($cpf);
$inscrito->setrg($rg);
$inscrito->setespecial($especial);
$inscrito->setsenha($senha);
$inscrito->setnacionalidade($nacionalidade);
$inscrito->settelefone($telefone);
//$inscrito->settelefone2($telefone2);
Exemplo n.º 9
0
$name_cracha = $_POST['name_cracha'];
$birth = $_POST['birth'];
$genero = $_POST['genero'];
$tshirt = $_POST['tshirt'];
$country = $_POST['country'];
if ($country == "Brasil") {
    $cpf = $_POST['cpf'];
    $funcao = "cpf";
} else {
    $passport = $_POST['passport'];
    $funcao = "passaporte";
}
$estado = $_POST['estado'];
$cidade = $_POST['cidade'];
$phone = $_POST['phone'];
$type = $_POST['type'];
if ($type == "senior") {
    $empresa = $_POST['empresa'];
    $cargo = $_POST['cargo'];
    $segmento = $_POST['segmento'];
    $funcao .= "senior";
} else {
    $federacao = $_POST['federacao'];
    $ej = $_POST['ej'];
    $cargo_jr = $_POST['cargo_jr'];
    $tempo = $_POST['tempo'];
    $funcao .= "junior";
}
Inscrito::inscrever($_POST, $funcao);
Inscrito::mandar_email($email);
Exemplo n.º 10
0
 public function mostrarAlunosPorNecessidade($necessidade)
 {
     $inscrito = new Inscrito(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
     $vetorinscrito = $inscrito->SelectByComNecessidade($this->conexao, $necessidade);
     /* Varaveis auxiliares */
     $i = 0;
     $contador = 1;
     $total = count($vetorinscrito);
     echo "<table style='width: 100%'>";
     echo "<tr>";
     echo "<th colspan='4' style='text-align:left'>Necessidade Especial :    " . $necessidade . "</th>";
     echo "</tr>";
     while ($total > $i) {
         $localProva = new Localprova(null, null);
         $vetorLocalProva = $localProva->SelectByPrimaryKey($this->conexao, $vetorinscrito[$i]->getlocalprova());
         echo "<tr>";
         echo "<td><b>Nome </b>";
         echo "</td>";
         echo "<td>" . ($contador + $i) . "-" . $vetorinscrito[$i]->getnome() . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td><b>Endereco </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->getendereco() . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td><b>Bairro </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->getbairro() . "</td>";
         echo "<td><b>CEP </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->getcep() . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td><b>Cidade </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->getcidade() . "</td>";
         echo "<td><b>Estado </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->getcidade() . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td><b>Email </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->getemail() . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td><b>Telefone </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->gettelefone() . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td><b>Celular </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->getcelular() . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td><b>RG </b>";
         echo "</td>";
         echo "<td align='left'>" . $vetorinscrito[$i]->getrg() . "</td>";
         echo "<td><b>CPF </b>";
         echo "</td>";
         echo "<td>" . $vetorinscrito[$i]->getcpf() . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td><b>Local de Prova </b>";
         echo "</td>";
         echo "<td>" . $vetorLocalProva[0]->getnome() . "</td>";
         echo "</tr>";
         $inscrito_curso = new Inscrito_Curso(null, null, null);
         $vetor_inscrito_curso = $inscrito_curso->ListarCurso($this->conexao, $vetorinscrito[0]->getid());
         $curso = $vetor_inscrito_curso[0]->getnome();
         echo "<tr>";
         echo "<td><b>Curso </b>";
         echo "</td>";
         echo "<td>" . $curso . "</td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td colspan='4' bgcolor='#000000'>";
         echo "</td>";
         $i = $i + 1;
     }
     echo "<tr>";
     echo "<td colspan='3' align='center'>";
     echo "<td>";
     echo "<tr>";
     echo "</table>";
 }
Exemplo n.º 11
0
			<div id="topo2" align="left">
				<img src="../../imgs/topo2/topo2.png" alt="Instituto Federal Baiano" />
					<div id="topo2Texto">
						<?php 
    echo $_SESSION["Gnomeprocessoseletivo"];
    ?>
					</div>
					
			</div>	
			<div align="right" class="admin_logout"><p><a href="../login/logout.php" target="_self">Logout</a></p></div>
			<div align='center'><h2>&Aacute;rea Administrativa - Inscritos</h2></div>
			<?php 
    /* Acesso ao banco de dados */
    $banco = DB::getInstance();
    $conexao = $banco->ConectarDB();
    $inscrito = new Inscrito(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
    $vetorinscrito = $inscrito->SelectByAll($conexao);
    print_r($vetorinscrito[0]);
    //exit();
    /* Varaveis auxiliares */
    $i = 0;
    $total = count($vetorinscrito);
    echo '<body>';
    echo '  <table width="100%" border="1">';
    echo '  <tr>';
    echo '    <td width="35%"><strong>Nome</strong></td>';
    echo '    <td width="35%"><strong>CPF</strong></td>';
    echo '    <td width="35%"><strong>RG</strong></td>';
    echo '    <td width="35%"><strong>Editar</strong></td>';
    echo '    <td width="35%"><strong>Excluir</strong></td>';
    echo '  </tr>';