| Server IP : 20.75.53.88 / Your IP : 216.73.217.72 [ Web Server : Apache System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29+esm15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Domains : 3 Domains MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/portais/controller/publicacao/ |
Upload File : |
<!DOCTYPE html>
<html>
<head>
<title>G&T Controller | Login</title>
<link rel="stylesheet" href="css/csslogin.css">
<meta name="viewport" content="width=device-width">
<!-- <link rel="icon" href="img/favicon.png"/>-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
</head>
<style>
a {
text-decoration: none;
color: #3498DB;
}
</style>
<body style="margin-top: 20px;">
<?php
ini_set('display_errors', 1);
ini_set('display_startup_erros', 1);
error_reporting(E_ALL);
function __autoload($classe)
{
@include_once "{$classe}.php";
}
$db = new conexaoBanco();
$db = $db->connectDB();
function ObterLogin($login, $password)
{
global $db;
$user = $db->select('users', 'user_nome, user_fone',
array('user_fone' => $login, 'user_senha' => md5($password)))->fetch();
if ($user) {
return $user;
} else {
return false;
}
}
?>
<form action="" method="post">
<div class="login">
<div class="login-screen">
<div class="app-title">
<!-- <h1><img class="hidden-xs" alt="" src="files/cliente/1/1.jpg" width="120px"></h1>-->
</div>
<div class="login-form">
<div class="control-group">
<input type="text" name="username" class="login-field" placeholder="usuário" id="login-name">
<label class="login-field-icon fui-user" for="login-name"></label>
</div>
<div class="control-group">
<input type="password" name="password" class="login-field" placeholder="senha" id="login-pass">
<label class="login-field-icon fui-lock" for="login-pass"></label>
</div>
<button class="btn btn-primary btn-large btn-block" type="submit">Entrar</button>
<h4 style="color: lightgray;"></h4>
<h4 style="color: #6d6c73; font-family: 'Ubuntu Mono', monospace; font-size: 12px;" class="hidden-xs">
G&T Controller | Publicações
</h4>
<h5 style="color: darkred;">
<?php
if ($_POST) {
if ($user = ObterLogin($_POST['username'], $_POST['password'])) {
session_start();
$_SESSION['user_nome'] = $user->user_nome;
$_SESSION['user_fone'] = $user->user_fone;
header('Location: add.php');
} else {
echo 'Login ou senha incorreta!';
}
}
?>
</h5>
</div>
</div>
</div>
</form>
</body>
</html>