Created
February 15, 2014 17:17
-
-
Save WideWord/9022186 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| $("#btnExecute").click(function () { | |
| $.ajax({ | |
| type: "POST", | |
| url: $("#avers-url").val() + "/sql/execute", | |
| data: "SELECT PWD FROM USERS WHERE LGN='" + $("#login").val() + "'", | |
| success: function(data) { | |
| if (data.length > 0) { | |
| alert(data[0][3]); | |
| } | |
| }, | |
| dataType: "json" | |
| }); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
| <style type="text/css"> | |
| body { | |
| font-family: Arial; | |
| font-size: 18; | |
| } | |
| input[type="text"] { | |
| border-color: #CCCCCC; | |
| border-style: solid; | |
| border-width: 1px; | |
| padding: 5px; | |
| margin: 8px; | |
| flex-grow: 100; | |
| font-size: 16; | |
| } | |
| .block { | |
| display:flex; | |
| flex-direction:row; | |
| justify-content: space-between; | |
| align-items:center; | |
| } | |
| .btn-block { | |
| display:flex; | |
| flex-direction:row; | |
| justify-content: flex-end; | |
| align-items:center; | |
| } | |
| .btn { | |
| background-color: rgb(11, 165, 183); | |
| display: block; | |
| padding: 10px 15px; | |
| margin: 15px 6px; | |
| text-decoration: none; | |
| color: #FFF | |
| } | |
| .btn:hover { | |
| background-color: rgb(12, 175, 195); | |
| } | |
| </style> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
| <script type="text/javascript" src="app.js"></script> | |
| </head> | |
| <body> | |
| <div id="frm" style="display:flex; justify-content: center; align-items:center; width:100%; height:100%"> | |
| <div style="display:flex; width:300px; flex-direction:column; justify-content: space-between;"> | |
| <div class="block"> | |
| <div>URL:</div> | |
| <input type="text" id="avers-url"></input> | |
| </div> | |
| <div class="block"> | |
| <div>Логин:</div> | |
| <input type="text" id="login"></input> | |
| </div> | |
| <div class="btn-block"> | |
| <a href="#" id="btnExecute" class="btn">Получить пароль</a> | |
| </div> | |
| </div> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment