Import civetweb ans jsoncpp
This commit is contained in:
43
3P/civetweb/examples/docroot/login.html
Normal file
43
3P/civetweb/examples/docroot/login.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!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" lang="en" dir="ltr">
|
||||
<!-- This file is part of the Civetweb project,
|
||||
http://sourceforge.net/projects/civetweb/ -->
|
||||
<head>
|
||||
<title>Civetweb chat: login</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<!--
|
||||
Note that this page is self-sufficient, it does not load any other
|
||||
CSS or Javascript file. This is done so because only this page is
|
||||
allowed for non-authorized users. If we want to load other files
|
||||
from the frontend, we need to change backend code to allow those
|
||||
for non-authorized users. See chat.c :: must_authorize() function.
|
||||
-->
|
||||
</head>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
// Set correct action for the login form. We assume that the SSL port
|
||||
// is the next one to insecure one.
|
||||
var httpsPort = location.protocol.match(/https/) ? location.port :
|
||||
parseInt(location.port) + 1;
|
||||
document.forms[0].action = 'https://' + location.hostname + ':' +
|
||||
httpsPort + '/authorize';
|
||||
};
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
<h2>Civetweb chat server login</h2>
|
||||
<div style="max-width: 30em;">
|
||||
Username and password can be any non-empty strings.
|
||||
</div>
|
||||
<br/>
|
||||
<form>
|
||||
<input type="text" name="user"></input><br/>
|
||||
<input type="text" name="password"></input><br/>
|
||||
<input type="submit" value="Login"></input>
|
||||
</form>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user