2018-06-16 00:22:19 +00:00
|
|
|
<!DOCTYPE html>
|
2018-06-12 02:53:47 +00:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2018-06-16 00:22:19 +00:00
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Home - Hotel Service</title>
|
2018-06-12 02:53:47 +00:00
|
|
|
|
2018-06-16 00:22:19 +00:00
|
|
|
<link type="text/css" rel="stylesheet" href="./css/Diseno.css">
|
|
|
|
<link type="text/css" rel="stylesheet" href="./css/materialize.min.css">
|
|
|
|
|
|
|
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
2018-06-12 02:53:47 +00:00
|
|
|
<meta name="google-signin-client_id" content="746890482047-c734fgap3p3vb6bdoquufn60bsh2p8l9.apps.googleusercontent.com">
|
|
|
|
|
2018-06-16 00:22:19 +00:00
|
|
|
<style>
|
|
|
|
#mainHeader{
|
|
|
|
background: url('http://www.hotelimperialeroma.it/data/mobile/hotel-imperiale-roma-camere-01-2.jpg') no-repeat local center;
|
|
|
|
height: 40%;
|
|
|
|
text-align: center;
|
|
|
|
padding: 100px;
|
|
|
|
background-size: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
transition: opacity 500ms, max-height 250ms,padding 500ms;
|
|
|
|
}
|
|
|
|
body{
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
background-color: white;
|
|
|
|
font-family: Roboto, serif;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
2018-06-12 02:53:47 +00:00
|
|
|
<script src="https://apis.google.com/js/platform.js" async defer></script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-06-16 00:22:19 +00:00
|
|
|
<div id="mainHeader">
|
|
|
|
<h1 style="font-size: 50px; color: white; display: inline; font-weight: bold; font-family: 'Product Sans',serif">Hotel Services</h1>
|
|
|
|
</div>
|
|
|
|
<nav style="background-color: #67c9b3">
|
|
|
|
<div class="nav-wrapper">
|
|
|
|
<a href="./" class="brand-logo" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif">Hotel Services</a>
|
|
|
|
</div>
|
|
|
|
</nav>
|
2018-06-12 02:53:47 +00:00
|
|
|
|
|
|
|
<br />
|
2018-06-16 00:22:19 +00:00
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<div style="font-size: x-large">
|
|
|
|
<span id="mainText">Welcome! Log In to Start:</span>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<div class="g-signin2" data-onsuccess="onSignIn"></div>
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<hr />
|
|
|
|
Developed by:<br />
|
2018-06-16 21:46:12 +00:00
|
|
|
Fernando Araoz, 20173373<br />
|
|
|
|
Jose Rodriguez, 20101650<br />
|
|
|
|
Gustavo Turpo, 20173374<br />
|
2018-06-16 00:22:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2018-06-12 02:53:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
function onSignIn(googleUser) {
|
|
|
|
var profile = googleUser.getBasicProfile();
|
2018-06-16 00:22:19 +00:00
|
|
|
|
|
|
|
document.getElementById("mainText").innerText = "Logged In. Redirecting...";
|
|
|
|
|
|
|
|
document.getElementById("mainHeader").style.maxHeight = "0";
|
|
|
|
document.getElementById("mainHeader").style.padding = "0";
|
|
|
|
|
|
|
|
setTimeout(function () {
|
|
|
|
postRedirect("/users/add",{
|
|
|
|
userEmail : profile.getEmail(),
|
|
|
|
userName : profile.getName(),
|
|
|
|
userImg : profile.getImageUrl(),
|
|
|
|
userRole : "admin",
|
|
|
|
action : "logIn"
|
|
|
|
});
|
|
|
|
},500);
|
2018-06-15 02:24:40 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function postRedirect(url, postData){
|
2018-06-12 02:53:47 +00:00
|
|
|
|
|
|
|
var postForm = document.createElement("form");
|
2018-06-15 02:24:40 +00:00
|
|
|
postForm.action = url;
|
2018-06-12 02:53:47 +00:00
|
|
|
postForm.method = "POST";
|
|
|
|
|
2018-06-15 02:24:40 +00:00
|
|
|
postForm.style.display = "none";
|
|
|
|
|
|
|
|
for (var key in postData){
|
|
|
|
if (postData.hasOwnProperty(key)){
|
|
|
|
var input = document.createElement("input");
|
|
|
|
input.type = "hidden";
|
|
|
|
input.name = key;
|
|
|
|
input.value = postData[key];
|
|
|
|
postForm.appendChild(input);
|
|
|
|
}
|
|
|
|
}
|
2018-06-12 02:53:47 +00:00
|
|
|
|
|
|
|
document.body.appendChild(postForm);
|
2018-06-15 02:24:40 +00:00
|
|
|
|
2018-06-12 02:53:47 +00:00
|
|
|
postForm.submit();
|
2018-06-15 02:24:40 +00:00
|
|
|
|
2018-06-12 02:53:47 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
function signOut() {
|
|
|
|
var auth2 = gapi.auth2.getAuthInstance();
|
|
|
|
auth2.signOut().then(function () {
|
|
|
|
console.log('User signed out.');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
2018-06-07 21:50:55 +00:00
|
|
|
</html>
|