forked from resnostyle/mediafrontpage
-
Notifications
You must be signed in to change notification settings - Fork 8
/
auth.php
executable file
·65 lines (65 loc) · 1.69 KB
/
auth.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
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
<?php
require_once("config.php");
If (!$authsecured) {
echo "<script>window.location = 'index.php';</script>";
exit;
}
if (isset($_POST['user']) && isset($_POST['password'])) {
if ($_POST['user']==$authusername && $_POST['password']==$authpassword) {
// OK
$_SESSION['loggedin'] = true;
echo "<script>window.location = 'index.php';</script>";
exit;
} else {
?>
<html>
<head>
<title>Media Center</title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="css/front.css" />
<style type="text/css">
.widget {
border:1px solid black;
-moz-border-radius:6px 6px 6px 6px;
border-radius:6px 6px 6px 6px;
margin:0px 0px;
box-shadow: 3px 3px 3px #000;
background:#2C2D32;
}
.widget-head {
-moz-border-radius:6px 6px 0px 0px;
border-radius:6px 6px 0px 0px;
background:#3d3d3d;
border-bottom:1px solid black;
width: 100%;
height: 30px;
line-height: 30px;
font-weight:bold;
}
</style>
<center><br><br><br>
<form action="auth.php" method="post">
<table class="widget" width=259 cellpadding=0 cellspacing=0 id=1>
<tr style=cursor: move;>
<td align=center height=25><div class="widget-head">MediaFrontPage Authentication</div></td>
<tr>
<td align=center height=25><br>Invalid Username and/or Password.</td>
<tr>
<td align=center height=25> </td>
<tr>
<td align=center height=25>Please try again.</td>
<tr>
<td align=center height=25>
<input type="button" value="<< Back" onclick="history.go(-1);return false;" /><br><br>
</td>
</table>
</form>
</center>
<?php
}
} else {
// not logging in
echo "<script>window.location = 'login.php';</script>";
exit;
}
?>