-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
116 lines (95 loc) · 2.9 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<title>Autentificacion</title>
<?php session_start();
$count = 1;
if (isset($_REQUEST['vari'])) {
unset($_SESSION['user']);
unset($_SESSION['rol']);
}
$_SESSION['modo'] = 'login';
if (isset($_REQUEST['modo'])) {
$_SESSION['modo'] = $_REQUEST['modo'];
if (isset($_SESSION['user'])) {
header("Location:Autentificacion.php");
$count = 0;
}
}
//Entering from the menu directly
if ((isset($_SESSION['user'])) && ($count == 1)) {
$_SESSION['sesionIniciada'] = '¡Ya estas logeado!';
header("Location:menuEntrada.php");
}
//Direct menu
include 'Extras/css.php'; ?>
<style>
.registro {
background-color: red;
box-shadow: 0 5px 0 darkred;
color: white;
padding: 1em 1.5em;
position: relative;
text-decoration: none;
text-transform: uppercase;
}
.registro:hover {
background-color: #ce0606;
cursor: pointer;
text-decoration: none;
}
.registro:active {
box-shadow: none;
top: 5px;
}
.registro:hover {
cursor: pointer;
}
</style>
</head>
<body>
<?php include 'Extras/menu.php'; ?>
<div class="container-contact100">
<div class="wrap-contact100">
<form class="contact100-form validate-form" action="Autentificacion.php" method="POST">
<span class="contact100-form-title">
Login
</span>
<div class="wrap-input100 validate-input" data-validate="DNI">
<input class="input100" type="text" name="dni" placeholder="DNI">
<span class="focus-input100"></span>
</div>
<?php if (isset($_SESSION['errDni'])) {
echo " <p style='color:red;'> " . $_SESSION['errDni'] . "</p> ";
unset($_SESSION['errDni']);
} ?>
<div class="wrap-input100 validate-input" data-validate="Contraseña">
<input class="input100" type="password" name="contraseña" placeholder="Contraseña">
<span class="focus-input100"></span>
</div>
<?php if (isset($_SESSION['err'])) {
echo " <p style='color:red;'> " . $_SESSION['err'] . "</p> ";
unset($_SESSION['err']);
} ?>
<div class="container-contact100-form-btn">
<button class="contact100-form-btn">
<span>
<i class="fa fa-paper-plane-o m-r-6" aria-hidden="true"></i>
Confirmar
</span>
</button>
<a class="registro" href="vistaAltaVotante.php">¡Registrate si aun no lo estas!</a>
</div>
</div>
</div>
<div><br>
<div class="center-column">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<a href="menuEntrada.php" class="btn btn-success">Atras</a>
</div>
</div>
</form>
<div id="dropDownSelect1"></div>
<?php include 'Extras/scripts.php'; ?>
</body>
</html>