Example #1
0
<?php

/**
 * Saúde na Copa
 * @package principal
 * @author César Martins
 * @version 1.0
 */
include "php/class.Auth.php";
$auth = new Auth();
$mostrar = false;
if (isset($_POST['login']) && isset($_POST['senha'])) {
    $login = $_POST['login'];
    $senha = $_POST['senha'];
    $usuarioAutenticado = $auth->validaLogin();
    if ($usuarioAutenticado) {
        header("Location: index.php");
    } else {
        $mostrar = true;
    }
} else {
    $auth->logged("index.php");
}
?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Sa&uacute;de na Copa</title>
	<link rel="stylesheet" href="bibliotecas/bootstrap/css/bootstrap.min.css">	
	<link href="css/style.css" rel="stylesheet" media="screen">
Example #2
0
<?php

/**
 * Amber
 * @package principal
 * @author César Martins
 * @version 1.0
 */
include "../php/class.MySQL.php";
include "../php/class.Auth.php";
$conn = new MySQL();
$auth = new Auth();
header("Content-type: application/json; charset=utf-8");
echo $auth->validaLogin();