-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
95 lines (86 loc) · 3.27 KB
/
index.php
File metadata and controls
95 lines (86 loc) · 3.27 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
session_start();
// Class's "Checker" "checkInstallation" method checks if the vLine PHP example has been successfully installed and configured
include('./classes/Checker.php');
$chk = new Checker();
if(!$chk->checkInstallation("./"))
header("Location: ./install/index.php");
else{
// All authenticated users have $_SESSION['plainuserauth'] == 1
// If the user is already authenticated by the system then he/she is been redirected straight to the main.php page where the main
// application runs. Otherwise the user stays and has to provide username & password in order to get authenticated
if($_SESSION['plainuserauth'] == 1)
header("Location: ./main.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Sign in</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link type="image/png" href="./images/favicon.png" rel="shortcut icon"/>
<!-- Le styles -->
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
container{ margin: 0 auto;
width: 50px;}
.form-signin {
max-width: 300px;
padding: 19px 29px 29px;
margin: 0 auto 20px;
background-color: #fff;
border: 1px solid #e5e5e5;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin input[type="text"],
.form-signin input[type="password"] {
font-size: 16px;
height: auto;
margin-bottom: 15px;
padding: 7px 9px;
}
</style>
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href="./css/style.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="bootstrap/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<h2 style="float:left;"><img src="images/logo.png" width="100px" height="200px"></h2>
<h2 style="float:left;"><img src="images/Video.jpg" width="100px" height="200px"></h2>
<form class="form-signin C" method="post" action="./actions/login.php">
<!--<h2><img src="images/logo.png"></h2>-->
<h2 class="form-signin-heading">Ace Novo</h2>
<input type="text" class="input-block-level" placeholder="Username" name="username">
<input type="password" class="input-block-level" placeholder="Password" name="password">
<button class="btn btn-large btn-primary" type="submit">Sign in</button>
<?php
if(array_key_exists('failed', $_GET)){
if($_GET['failed'] == 1){ ?>
<div class="authfailure">Wrong username and password</div>
<?php }} ?>
</form>
<center><a href="register.php" class="form-signin" >Register</a></center>
</div> <!-- /container -->
</body>
</html>