Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0">
- <title>Online News Application</title>
- <link rel="stylesheet" href="css/style_acc.css" type="text/css" />
- <link rel="stylesheet" href="css/fb-buttons.css">
- <link href="css/fb-1.css" rel="stylesheet" type="text/css" />
- <link href="css/fb-3.css" rel="stylesheet" type="text/css" />
- <link href="css/jquery.alerts.css" rel="stylesheet" type="text/css" />
- <script src="js/jquery-1.7.1.min.js"></script>
- <script src="js/jquery.mobile-1.1.0.min.js"></script>
- <script src="js/jquery.alerts.js"></script>
- <script language="javascript">
- $(document).ready(function(){
- $("#submit").click( function (){
- var username = $('#username').val();
- var password = $('#password').val();
- $.ajax({
- type: "POST",
- url : 'http://www.myurl.com/login.php',
- cache: false,
- data: {
- username:$('#username').val(),
- password:$('#password').val(),
- },
- dataType: "json",
- success: function (data) {
- if (data.response=='Success') {
- self.location="admin.html";
- } else {
- jAlert('Username dan Password wrong', 'Login Failed');
- ClearForm();
- }
- },
- error : function(data) {
- jAlert('Check your connection', 'Connection');
- }
- });
- });
- });
- function ClearForm(){
- document.forms["login"]["username"].value = ""
- document.forms["login"]["password"].value = ""
- document.login.username.focus();
- }
- </script>
- </head>
- <body style="background-color:#e6eae9" OnLoad="document.login.username.focus();">
- <div class="uibutton-toolbar" style="background-color:#FFF;text-align:center">
- <a class="uibutton confirm" rel="external" href="index.html">Home</a>
- <a class="uibutton confirm" rel="external" href="news_list.html">Online News</a>
- <a class="uibutton confirm" rel="external" href="report.html">Report Application</a>
- <a class="uibutton confirm" rel="external" href="about.html">About Application</a>
- <a class="uibutton special" rel="external" href="login.html">Login</a>
- </div>
- <ul class="acc" id="acc" >
- <li>
- <h3>Login Form</h3>
- <div class="acc-section_hitam">
- <div class="acc-content_hitam">
- <div class="section">
- <p>Silahkan masukan username dan password untuk mendapatkan akses ke menu administrator. Aplikasi akan memeriksa data anda.</p>
- <br />
- <div id="message_ajax"></div>
- <form name="login" method="post">
- <table id="mytable" style="width:425px;">
- <tr>
- <td width="141" style="text-align:right">Username</td>
- <td width="10">:</td>
- <td width="258"><input name="username" type="text" class="inputtext" id="username" ></td>
- </tr>
- <tr>
- <td class="alt" style="text-align:right">Password</td>
- <td width="10">:</td>
- <td class="alt"><input name="password" type="password" class="inputtext" id="password" ></td>
- </tr>
- <tr>
- <td class="alt"></td>
- <td class="alt"></td>
- <td class="alt">
- <input style="width:74px;" class="uibutton confirm" id="submit" value="Login">
- <input style="width:74px;" class="uibutton" onClick="ClearForm();" value="Reset" >
- </td>
- </tr>
- </table>
- </form>
- </div>
- <br />
- <div class="uibutton-toolbar">
- Created By : Bertho Joris
- </div>
- </div>
- </div>
- </div>
- </div>
- </li>
- </ul>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement