-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (56 loc) · 2.11 KB
/
index.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="Sitio/images/favicon.ico">
<title>Login Sistema Vides</title>
<!-- Bootstrap core CSS -->
<link href="Sitio/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="Sitio/dist/css/signin.css" rel="stylesheet">
</head>
<body class="text-center">
<form id="loginform" class="form-signin">
<img class="mb-4" src="Sitio/images/grapes_1f347.png" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Sistema Vides</h1>
<label for="inputName" class="sr-only">Nombre Usuario</label>
<input type="text" id="inputName" class="form-control" placeholder="Nombre Usuario" required autofocus>
<label for="inputPassword" class="sr-only">Contraseña</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Contraseña" required>
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me"> Recordar cuenta
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit" >Ingresar</button>
<p class="mt-5 mb-3 text-muted">© 2017-2018</p>
</form>
<script src="Sitio/vendor/jquery/jquery.js"></script>
<script>
$(document).ready(function() {
$('#loginform').submit(function(e) {
var username = $("#inputName").val();
var password = $("#inputPassword").val();
e.preventDefault();
$.ajax({
type: "POST",
url: '/controlador/login.php',
data: 'username='+ username + '&password=' + password,
success: function(data)
{
if (data === 'true') {
window.location = 'Sitio/rutas.html';
}
else {
alert('Contraseña Incorrecta');
}
}
});
});
});
</script>
</body>
</html>