Advertisement
fahmihilmansyah

Untitled

Nov 11th, 2018
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 7.74 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <script type="text/javascript">
  3. function Browser()
  4. {
  5.   var ua, s, i;
  6.  
  7.   this.isIE    = false;  // Internet Explorer
  8.   this.isOP    = false;  // Opera
  9.   this.isNS    = false;  // Netscape
  10.   this.version = null;
  11.  
  12.   ua = navigator.userAgent;
  13.  
  14.   s = "Opera";
  15.   if ((i = ua.indexOf(s)) >= 0) {
  16.     this.isOP = true;
  17.     this.version = parseFloat(ua.substr(i + s.length));
  18.     return;
  19.   }
  20.  
  21.   s = "Netscape6/";
  22.   if ((i = ua.indexOf(s)) >= 0) {
  23.     this.isNS = true;
  24.     this.version = parseFloat(ua.substr(i + s.length));
  25.     return;
  26.   }
  27.  
  28.   // Treat any other "Gecko" browser as Netscape 6.1.
  29.  
  30.   s = "Gecko";
  31.   if ((i = ua.indexOf(s)) >= 0) {
  32.     this.isNS = true;
  33.     this.version = 6.1;
  34.     return;
  35.   }
  36.  
  37.   s = "MSIE";
  38.   if ((i = ua.indexOf(s))) {
  39.     this.isIE = true;
  40.     this.version = parseFloat(ua.substr(i + s.length));
  41.     return;
  42.   }
  43. }
  44.  
  45. function checkscreen()
  46. {
  47.     this.browser = new Browser();
  48.     if (!((this.browser.isNS) || (this.browser.isIE) || (this.browser.isOP))) {
  49.         return (confirm("This page only work correctly with Internet Explorer, Firefox, Opera browser!  \r\nClick \"OK\" to view the page anyway. Click \"CANCEL\" to leave.") != 0);
  50.     }
  51.     if (screen.width < 1024) {
  52.        if (screen.height < 768) {
  53.            alert("This page better with minimal 1024x768 resolution.\r\nIt appears you aren't operating at that resolution.");
  54.        }
  55.    }
  56. }
  57.  
  58. function focused()
  59. {
  60.     document.form['user'].focus();
  61. }
  62.  
  63. window.onload = focused;
  64.  
  65. </script>
  66. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  67. <html xmlns="http://www.w3.org/1999/xhtml">
  68.     <!--Start of Zopim Live Chat Script-->
  69.     <script type="text/javascript">
  70. window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
  71. d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
  72. _.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute("charset","utf-8");
  73. $.src="//v2.zopim.com/?3wLAQY3AjlbdybSYBhZgXJnLOijc0Fqc";z.t=+new Date;$.
  74. type="text/javascript";e.parentNode.insertBefore($,e)})(document,"script");
  75. </script>
  76.     <!--End of Zopim Live Chat Script-->
  77.     <head>
  78.         <base href="http://demo.versatech.co.id//index.php" />
  79.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  80.         <title>VERSA DEMO</title>
  81.     </head>
  82.     <style type="text/css">
  83. body {background-image:url(Background.jpg);  background-repeat:no-repeat; background-attachment:fixed;
  84. background-size: 100% 100%;
  85.             background-position:center;}
  86. #main-container {width:1000px; margin-left:auto; margin-right:auto;}
  87. #logo-container {width:1000px; height:100px;}
  88. #logo {background-image:url(logo.png); width:405px; height:53px; margin:auto; margin-top:24px;}
  89. #main-page {width:1000px; height:400px; margin:auto;}
  90.  
  91. form {height:310px; width:370px; margin-top:60px; margin-left:auto; margin-right:auto;}
  92. .form-login  {width:170px; border: 1px solid #0d2c52;background-color:#1e4f8a;font-size: 16px;color:#ebebeb; margin-top:10px;}
  93. #loginbox {width:370px; height:310px; color:#ebebeb; font: 12px Arial, Helvetica, sans-serif; display: block;
  94. background:url(login-box-backg.png) no-repeat left top;}
  95. #loginheader {width:370px; height:110px; text-align:center;}
  96. .loginboxmain {width: 370px;height: 50px; float:left;}
  97. .loginboxname {width: 100px; text-align: center;margin: 18px 10px 18px 10px; float:left;}
  98. .loginboxfield {width: 250px; float:left; height: 50px;}
  99. .loginbutton {margin-left: 100px;}
  100. #boxbutton {float:left; width:370px; height:80px;}
  101. .loginbutton {margin-left: 130px; margin-top: 20px;}
  102.  
  103. </style>
  104.     <body OnLoad="document.form.user.focus();">
  105.         <div id="container">
  106.             <div id="main-container">
  107.                 <div id="logo-container">
  108.                     <div id="logo">
  109.     </div>
  110.                 </div>
  111.             </div>
  112.             <div id="main-page">
  113.                 <form method="post" name="form" action="http://rits.versatech.co.id/admin">
  114.                     <div class="login-form">
  115.                         <div id="loginbox">
  116.                             <div id="loginheader">
  117.                                 <br />
  118.                                 <h1>Login</h1>
  119.                         Please Input Username and Password
  120.                                 <br />
  121.                         for Entry to System
  122.                             </div>
  123.                             <div class="loginboxmain">
  124.                                 <div class="loginboxname"> Username :</div>
  125.                                 <div class="loginboxfield">
  126.                                     <input class="form-login" title="Username" maxlength="2048" size="30" name="user" type="text" />
  127.                                 </div>
  128.                             </div>
  129.                             <div class="loginboxmain">
  130.                                 <div class="loginboxname"> Password :</div>
  131.                                 <div class="loginboxfield">
  132.                                     <input class="form-login" title="Password" maxlength="2048" size="30" name="password" type="password" />
  133.                                 </div>
  134.                             </div>
  135.                             <div id="boxbutton">
  136.                                 <input class="loginbutton" src="login-btn.png" type="image" />
  137.                                 <!--  <p  onclick = "loginAtris();" > Login Atris</p> -->
  138.    
  139.                             </div>
  140.                         </div>
  141.                         <!-- a href="http://www.pesawat.pw">Back to Home Page</a -->
  142.    
  143.                     </div>
  144.                 </form>
  145.             </div>
  146.             <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
  147.             <script>
  148.    
  149.    
  150.     function checklogin()
  151.     {
  152.         $.ajax({
  153.         url: 'http://atris.versatech.co.id/api/admin/isonlogin',
  154.         data: '',
  155.         type: 'GET',
  156.     //  beforeSend:function(){
  157.     //      main_loading = true;
  158.         //  $('#loginbutton').addClass('disabled');
  159.         //  $('#loginLoading').removeClass('hidden');
  160.     //  },
  161.         success: function(postresult){
  162.             var result_json = $.parseJSON(postresult);
  163.             switch (result_json.status) {
  164.                 case 'failed':
  165.                     console.log('login null');
  166.                     break;
  167.                 case 'success':
  168.                     window.location.href = "http://atris.versatech.co.id/";
  169.                     break;
  170.                 default:
  171.                     alert('unknown error, hubungi admin !');
  172.             }
  173.             console.log('success kk');
  174.         },
  175.         error: function (xhr, ajaxOptions, thrownError) {
  176.             alert('unknown error, hubungi admin !');
  177.         },
  178.    });
  179.     }
  180.    
  181.     function loginAtris(){
  182.         var user_name = $( "input[name='user']" ).val();
  183.         var password = $( "input[name='password']" ).val();
  184.         var params = "user="+user_name+"&password="+password;
  185.         checklogin();
  186.         $.ajax({
  187.         url: 'http://atris.versatech.co.id/api/admin',
  188.         data: params,
  189.         type: 'POST',
  190.     //  beforeSend:function(){
  191.     //      main_loading = true;
  192.         //  $('#loginbutton').addClass('disabled');
  193.         //  $('#loginLoading').removeClass('hidden');
  194.     //  },
  195.         success: function(postresult){
  196.         //  var result_json = $.parseJSON(postresult);
  197.             switch (postresult.status) {
  198.                 case 'success':
  199.                     window.location.href = "http://atris.versatech.co.id/";
  200.                     break;
  201.                 case 'failed':
  202.                     alert(postresult.content.alert);
  203.                     break;
  204.                 default:
  205.                     alert('unknown error, hubungi admin !');
  206.             }
  207.         },
  208.         error: function (xhr, ajaxOptions, thrownError) {
  209.             alert('unknown error, hubungi admin !');
  210.         },
  211.    });
  212.     }
  213.  </script>
  214.         </body>
  215.     </html>
  216.     <!--
  217. PT. Versa Technology
  218. Visit our website at www.versatech.co.id
  219. -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement