forked from parkov/openhtml
-
Notifications
You must be signed in to change notification settings - Fork 13
/
login.php
25 lines (19 loc) · 906 Bytes
/
login.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
//instantiate if needed
include("auth.php");
include('logger.php');
$log = new logmein();
$log->encrypt = true; //set encryption
if($_REQUEST['action'] == 'login'){
if($log->login("ownership", $_POST['username'], $_POST['password']) == true){
//do something on successful login
// logger('login');
header('Location: ./list');
}else{
//do something on FAILED login
$pre = '<!DOCTYPE html><html><head><title>openHTML - Login</title><link rel="stylesheet" href="css/style.css" type="text/css" /></head><body><div id="control"><div class="control"><div class="buttons"><div id="auth"><span id="logo">openHTML</span></div></div></div></div><div id="bin" class="stretch">';
$post = '<div class="warning">Login failed. Please try again.</div></div></body></html>';
$log->loginform("loginformname", "loginformid", "login.php", $pre, $post);
}
}
?>