-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.php
More file actions
188 lines (163 loc) · 5.94 KB
/
Copy patherror.php
File metadata and controls
188 lines (163 loc) · 5.94 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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?php
session_start();
require ('includes/config.php');
$_SESSION['theme'] = $theme;
if (!isset($_SESSION['mode'])) {
$_SESSION['mode'] = 'user';
}
if(!isset($_SESSION['user'])) {
$_SESSION['user'] = 'Guest';
}
$filterPref = $_SESSION['filterPref'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Blag Test</title>
<?php
echo '<link rel="stylesheet" href="css/blag-light.css">';
if ($usecustombg == "true") {
echo '<style type="text/css">body{background: url("' . $custombg . '")}</style>';
}
echo '<link rel="stylesheet" href="css/blag-' . $_SESSION['theme'] . '.css">';
if ($usepace === 'true') {
echo '<link rel="stylesheet" href="css/pace/pace-centerbar.css">';
echo '<script src="js/pace/pace.min.js"></script>';
}
?>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, minimum-scale=1, user-scalable=no">
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<style type="text/css">
.error {
text-align: center;
font-size: 250px;
margin: auto;
position: absolute;
left: 0;right: 0;
height: auto;
}
.message {
font-size: 30px;
margin: auto;
position: absolute;
}
</style>
<!-- <link rel="stylesheet" href="css/fancy-buttons.css"> -->
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/blag.js"></script>
<script src="js/jquery.smoothscroll.js"></script>
</head>
<body>
<div class="alert-error" id="errordiv">
Error goes here
</div>
<?php
function checkMode($type) {
global $unamesub;
if ($_SESSION['mode'] === 'admin') {
?>
<script type="text/javascript">
$('.header').remove();
</script>
<div class="header-admin">
<span class="header-content">
<a href="index.html" class="btn homebtn"><i class="fa fa-home"></i></a>
<a href="#" type="submit" name="Logout" class="btn-lock" onclick="document.logout.submit();"><i class="fa fa-lock"></i></a>
<a href="user.php?u=<?php echo $_SESSION['user']; ?>" class="btn btn-random"><i class="fa fa-user"></i></a>
<a href="admin/admin.php" class="btn btn-random"><i class="fa fa-dashboard"></i></a>
<a href="edit.php" class="btn btn-random"><i class="fa fa-pencil"></i></a>
<span class='msg-welcome'>Heyo, <?php echo strtok($_SESSION['username'], ' '); ?>!</span>
</span>
</div>
<?php
//echo "pagemode = admin<br> ";
} else if ($_SESSION['mode'] === 'user') {
$_SESSION['user'] = 'Guest';
?>
<script type="text/javascript">
$('.header-admin').remove();
</script>
<div class="header">
<span class="header-content">
<a href="index.html" class="btn homebtn"><i class="fa fa-home"></i></a>
<a href="#" class="btn-unlock" data-toggle="modal" data-target="#myModal"><i class="fa fa-unlock-alt"></i></a>
</span>
</div>
<?php
} else { //loggeduser
?>
<script type="text/javascript">
$('.header').remove();
</script>
<div class="header-admin">
<span class="header-content">
<a href="index.html" class="btn homebtn"><i class="fa fa-home"></i></a>
<a href="user.php?u=<?php echo $_SESSION['user']; ?>" class="btn btn-random"><i class="fa fa-user"></i></a>
<a href="#" type="submit" name="Logout" class="btn-lock" onclick="document.logout.submit();"><i class="fa fa-lock"></i></a>
<span class='msg-welcome'>Heyo, <?php echo strtok($_SESSION['username'], ' '); ?>!</span>
</span>
</div>
<?php
}
}
require('includes/user.php');
checkMode('init');
?>
<div class="error">
<?php
$errorcode = $_GET['http_error'];
echo $errorcode . '<br>';
if ($errorcode == '404') {
//echo '<div class="message">Something broke!</div>';
echo ':(';
}
?>
</div>
<div class="footer" style="position: absolute; bottom: 0px">
<div class="pagn" style="float:left;margin-top:3px">This page is like a Windows 8 BSOD.</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<form action="login.php" method="post" name="login" id="login" onsubmit="">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel"><i class="fa fa-unlock"></i> Site unlock</h4>
</div>
<div class="modal-body">
<p>
<input class="editpage-content" name="unamesub" type="text" id="uname" value="" placeholder="Username">
</p>
<p>
<input class="editpage-content" name="upasssub" type="password" id="upass" placeholder="Password">
</p>
<!-- <input type="submit" name="Login" value="Login"> -->
</div>
<div class="modal-footer">
<a href="register.php" class="reg" style="float: left">Sign up</a>
<button type="submit" name="Login" class="btn btn-submit" onclick="document.login.submit();">Unlock</button>
<!-- <input type="submit" name="login" value="Login"> -->
</div>
</form>
</div>
</div>
</div>
<form action="login.php" method="post" name="logout" id="logout">
<input type="hidden" value="logout">
</form>
<!--<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-48081162-1', 'villa7.github.io');
ga('send', 'pageview');
</script> -->
</body>
</html>