]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr"> | |
4 | <!-- This file is part of the Civetweb project, | |
5 | http://sourceforge.net/projects/civetweb/ --> | |
6 | <head> | |
7 | <title>Civetweb chat: login</title> | |
8 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
9 | <!-- | |
10 | Note that this page is self-sufficient, it does not load any other | |
11 | CSS or Javascript file. This is done so because only this page is | |
12 | allowed for non-authorized users. If we want to load other files | |
13 | from the frontend, we need to change backend code to allow those | |
14 | for non-authorized users. See chat.c :: must_authorize() function. | |
15 | --> | |
16 | </head> | |
17 | ||
18 | <script> | |
19 | window.onload = function() { | |
20 | // Set correct action for the login form. We assume that the SSL port | |
21 | // is the next one to insecure one. | |
22 | var httpsPort = location.protocol.match(/https/) ? location.port : | |
23 | parseInt(location.port) + 1; | |
24 | document.forms[0].action = 'https://' + location.hostname + ':' + | |
25 | httpsPort + '/authorize'; | |
26 | }; | |
27 | </script> | |
28 | ||
29 | <body> | |
30 | <center> | |
31 | <h2>Civetweb chat server login</h2> | |
32 | <div style="max-width: 30em;"> | |
33 | Username and password can be any non-empty strings. | |
34 | </div> | |
35 | <br/> | |
36 | <form> | |
37 | <input type="text" name="user"></input><br/> | |
38 | <input type="text" name="password"></input><br/> | |
39 | <input type="submit" value="Login"></input> | |
40 | </form> | |
41 | </center> | |
42 | </body> | |
43 | </html> |