-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
executable file
·84 lines (62 loc) · 2.06 KB
/
header.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
<?php
require 'functions.php';
session_start();
if (isset($_SESSION['user'])) {
$djname = $_SESSION['user'];
$loggedin = TRUE;
} else {
$loggedin = FALSE;
}
if (isset($_SESSION['admin'])) {
$admin = TRUE;
} else {
$admin = FALSE;
}
function htmlheader($title, $meta, $scripts = array()) {
echo <<<END
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset=UTF-8">
<title>$title</title>
<meta name="robots" content="7chanradio, 7chan, Radio, $meta" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/vnd.microsoft.icon" />
END;
foreach ($scripts as $x) {
echo "$x\n\n";
}
echo <<<_END
<link rel="stylesheet" href="css/burichan.css" type="text/css" />\n
</head>
<body>
_END;
}
function bar($page) {
echo <<<_END
<div class="replymode">
<h2>$page</h2>
</div>
_END;
}
function tail() {
echo <<<_END
</body>
</html>
_END;
}
if ($loggedin) {
$navigation = "<div class='navbar'>
[<a href='index.php' title='7chan Radio'>7chan Radio</a> / <a href='schedule.php' title='Schedule'>Schedule</a> / <a href='djs.php' title='DJ Lineup'>DJ Lineup</a>]
[<a href='https://7chan.org/ch7/' title='Channel 7'>ch7</a> / <a href='https://7chan.org' title='7chan'>7chan</a>]
[<a href='djpanel.php' title='DJ Panel'>DJ Panel</a> / <a href='logout.php' title='Logout'>Logout</a>]
</div>\n";
$logo = "<div class='logo'><h1 title='7chan Radio'>7chan Radio</h1></div>\n";
} else {
$navigation = "<div class='navbar'>
[<a href='index.php' title='7chan Radio'>7chan Radio</a> / <a href='schedule.php' title='Schedule'>Schedule</a> / <a href='djs.php' title='DJ Lineup'>DJ Lineup</a>]
[<a href='https://7chan.org/ch7/' title='Channel 7'>ch7</a> / <a href='https://7chan.org' title='7chan'>7chan</a>]
[<a href='login.php' title='DJ Panel'>DJ Panel</a>]
</div>\n";
$logo = "<div class='logo'><h1 title='7chan Radio'>7chan Radio</h1></div>\n";
}
?>