forked from grimelinse/FOS-Streaming
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
139 lines (118 loc) · 5.16 KB
/
index.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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
echo '<div align="right"><H1><a href="lang/choose-lang.php"> Language </a></H1></div>';
include('lang/lang.php');
include('config.php');
if(isset($_SESSION['user_id'])){
header("location: dashboard.php");
}
$error='';
if (isset($_POST['submit'])) {
if (empty($_POST['username']) || empty($_POST['password'])) {
$error = TXT_USERNAME_PASSWOR_INVALID;
}
else
{
$username = stripslashes($_POST['username']);
$password = stripslashes($_POST['password']);
$userfind = Admin::where('username', '=', $username)->where('password', '=', md5($password))->count();
if ($userfind > 0) {
$_SESSION['user_id'] = $username;
header("location: dashboard.php");
} else {
$error = TXT_USERNAME_PASSWOR_INVALID;
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php echo TXT_FOS_STREAMING_CONTROL_PANEL; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link id="bootstrap-style" href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link id="base-style" href="css/style.css" rel="stylesheet">
<link id="base-style-responsive" href="css/style-responsive.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,cyrillic-ext,latin-ext' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link id="ie-style" href="css/ie.css" rel="stylesheet">
<![endif]-->
<!--[if IE 9]>
<link id="ie9style" href="css/ie9.css" rel="stylesheet">
<![endif]-->
<link rel="shortcut icon" href="favicon.ico">
<style type="text/css">
body { background: #eee }
</style>
</head>
<body>
<div class="container-fluid-full">
<div class="row-fluid">
<div class="row-fluid">
<div class="login-box">
<div class="box span12">
<?php
if($error != "") {
echo "<div class=\"alert alert-error\">
" . $error . "
</div>";
}
?>
<h1><b><?php echo TXT_FOS_STREAMING_CONTROL_PANEL; ?></b></h1>
</div>
<h2><?php echo TXT_LOGIN_YOUR_ACCOUNT; ?></h2>
<form class="form-horizontal" action="" method="post">
<fieldset>
<div class="input-prepend" title="Username">
<span class="add-on"><i class="halflings-icon user"></i></span>
<input class="input-large span10" name="username" id="username" type="text" placeholder="<?php echo TXT_TYPE_USERNAME; ?>"/>
</div>
<div class="clearfix"></div>
<div class="input-prepend" title="Password">
<span class="add-on"><i class="halflings-icon lock"></i></span>
<input class="input-large span10" name="password" id="password" type="password" placeholder="<?php echo TXT_TYPE_PASSWORD; ?>"/>
</div>
<div class="clearfix"></div>
<div class="button-login">
<button type="submit" name="submit" class="btn btn-primary"><?php echo TXT_LOGIN; ?></button>
</div>
<div class="clearfix"></div>
</form>
</div><!--/span-->
</div><!--/row-->
</div>
</div>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery-migrate-1.0.0.min.js"></script>
<script src="js/jquery-ui-1.10.0.custom.min.js"></script>
<script src="js/jquery.ui.touch-punch.js"></script>
<script src="js/modernizr.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src='js/fullcalendar.min.js'></script>
<script src='js/jquery.dataTables.min.js'></script>
<script src="js/excanvas.js"></script>
<script src="js/jquery.flot.js"></script>
<script src="js/jquery.flot.pie.js"></script>
<script src="js/jquery.flot.stack.js"></script>
<script src="js/jquery.flot.resize.min.js"></script>
<script src="js/jquery.chosen.min.js"></script>
<script src="js/jquery.uniform.min.js"></script>
<script src="js/jquery.cleditor.min.js"></script>
<script src="js/jquery.noty.js"></script>
<script src="js/jquery.elfinder.min.js"></script>
<script src="js/jquery.raty.min.js"></script>
<script src="js/jquery.iphone.toggle.js"></script>
<script src="js/jquery.uploadify-3.1.min.js"></script>
<script src="js/jquery.gritter.min.js"></script>
<script src="js/jquery.imagesloaded.js"></script>
<script src="js/jquery.masonry.min.js"></script>
<script src="js/jquery.knob.modified.js"></script>
<script src="js/jquery.sparkline.min.js"></script>
<script src="js/counter.js"></script>
<script src="js/retina.js"></script>
<script src="js/custom.js"></script>
</body>
</html>