예제 #1
0
function verifica($email, $senha)
{
    //ver o extends
    include "../dao/conexao.php";
    $link = new conexao();
    $conexao = $link->conecta();
    $sql = "SELECT id, tipo FROM pessoa WHERE email = '" . $email . "' AND senha = '" . $senha . "'";
    $query = $conexao->prepare($sql);
    $query->execute();
    $retorno = $query->fetchAll(PDO::FETCH_ASSOC);
    session_start();
    if (isset($retorno[0])) {
        $_SESSION["email"] = $email;
        $_SESSION["tipo"] = $retorno[0]['tipo'];
        header("Location: ../view/dash.php");
    } else {
        header("Location: ../view/index.php?email=" . $email);
    }
    $conexao = $link->desconecta($conexao);
}
<?php

include "cabecalho.php";
?>

<div class="container">

	<?php 
include "../dao/conexao.php";
$link = new conexao();
$conexao = $link->conecta();
$sql = "SELECT id, nome FROM pessoa";
$pessoas = $conexao->query($sql);
?>
	
	<div style="margin:20px;">
		<center> 
			<h5>Filtro - Solicitações do sistema</h5>
			
			<form>
		  		<label>Aluno</label>
	  			<select id="nome" required>
	      			<option value="" disabled selected>Selecione</option>
	      			<?php 
while ($pessoa = $pessoas->fetch(PDO::FETCH_OBJ)) {
    echo "<option value='" . $pessoa->id . "''>" . utf8_encode($pessoa->nome) . "</option>";
}
?>
	    		</select>
	   		
	    		<div style="width:40%; float:left; margin-right:20%;">
예제 #3
0
include "../../includes/versao.php";
include "../../includes/languages/" . LANGUAGE . "";
//TEMPORARIAMENTE
include "../../includes/menu/menu.php";
include "../../includes/queries/queries.php";
print "<style>";
//type='text/css'
?>
	<!--
		@import url('../../includes/css/estilos.css.php');
	//-->
	<?php 
print "</style>";
print "<link rel='shortcut icon' href='../../includes/icons/favicon.ico'>";
$conec = new conexao();
$conec->conecta('MYSQL');
if (isset($_SESSION['s_uid'])) {
    $qry = "SELECT * FROM temas t, uthemes u  WHERE u.uth_uid = " . $_SESSION['s_uid'] . " and t.tm_id = u.uth_thid";
    $exec = mysql_query($qry) or die('ERRO NA TENTATIVA DE RECUPERAR AS INFORMAÇÕES DO TEMA!<BR>' . $qry);
    $row = mysql_fetch_array($exec);
    $regs = mysql_num_rows($exec);
    if ($regs == 0) {
        //SE NÃO ENCONTROU TEMA ESPECÍFICO PARA O USUÁRIO
        $qry = "SELECT * FROM styles";
        $exec = mysql_query($qry);
        $row = mysql_fetch_array($exec);
    }
} else {
    $qry = "SELECT * FROM styles";
    $exec = mysql_query($qry);
    $row = mysql_fetch_array($exec);