jtad

wbittorrent gui

Dec 7th, 2019
1,010
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.94 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="de">
  3.  
  4. <head>
  5.     <meta charset="UTF-8" />
  6.     <title>qBittorrent Weboberfläche</title>
  7.     <link rel="icon" type="image/png" href="images/skin/qbittorrent32.png" />
  8.     <link rel="stylesheet" type="text/css" href="css/login.css" />
  9.     <script src="scripts/lib/mootools-1.2-core-yc.js"></script>
  10.     <noscript>
  11.         <link rel="stylesheet" type="text/css" href="css/noscript.css?v=v4.1.8" />
  12.     </noscript>
  13.     <script>
  14.         window.onload = function() {
  15.             $('username').focus();
  16.             $('username').select();
  17.         };
  18.  
  19.         window.addEvent('domready', function() {
  20.             $('loginform').addEvent('submit', function(e) {
  21.                 new Event(e).stop();
  22.                 submitLoginForm();
  23.             });
  24.         });
  25.  
  26.         function submitLoginForm() {
  27.             new Request({
  28.                 url: 'api/v2/auth/login',
  29.                 method: 'post',
  30.                 data: $('loginform').toQueryString(),
  31.                 onComplete: function() {
  32.                     $('password').set('value', '');
  33.                 },
  34.                 onFailure: function(xhr) {
  35.                     if (xhr.responseText !== "") {
  36.                         $('error_msg').set('html', xhr.responseText);
  37.                     }
  38.                     else {
  39.                         $('error_msg').set('html', 'Fehler beim Einloggen – vermutlich ist qBittorrent nicht erreichbar.');
  40.                     }
  41.                 },
  42.                 onSuccess: function(text) {
  43.                     if (text == "Ok.") {
  44.                         // Session started. Simply reload page.
  45.                         window.location.reload();
  46.                     }
  47.                     else {
  48.                         $('error_msg').set('html', 'Ungültiger Benutzername oder Passwort.');
  49.                     }
  50.                 }
  51.             }).send();
  52.         }
  53.     </script>
  54. </head>
  55.  
  56. <body>
  57.     <noscript id="noscript">
  58.         <h1>JavaScript Required! You must enable JavaScript for the Web UI to work properly</h1>
  59.     </noscript>
  60.     <div id="main">
  61.         <h1>qBittorrent Weboberfläche</h1>
  62.         <div id="logo" class="col">
  63.             <img src="images/skin/qbittorrent-tray.svg" alt="qBittorrent logo" />
  64.         </div>
  65.         <div id="formplace" class="col">
  66.             <form id="loginform" method="post">
  67.                 <div class="row">
  68.                     <label for="username">Benutzername</label><br />
  69.                     <input type="text" id="username" name="username" /></div>
  70.                 <div class="row">
  71.                     <label for="password">Passwort</label><br />
  72.                     <input type="password" id="password" name="password" /></div>
  73.                 <div class="row">
  74.                     <input type="submit" id="login" value="Anmelden" />
  75.                 </div>
  76.             </form>
  77.         </div>
  78.         <div id="error_msg"></div>
  79.     </div>
  80. </body>
  81.  
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment