-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
executable file
·134 lines (98 loc) · 3.9 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
<!DOCTYPE html>
<?php require_once("misc/language.php"); ?>
<?php require_once("misc/config.php"); ?>
<?php require_once("misc/ssl.php"); ?>
<?php require_once("blog/view.php"); ?>
<HTML lang="<?= $locale["language-code"] ?>">
<HEAD>
<!--[if IE]>
<META http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<![endif]-->
<![if !IE]>
<META charset="UTF-8" />
<![endif]>
<META name="author" content="TLPR developers" />
<META name="description" content="<?= $locale["brand-description-short"] ?>" />
<META name="viewport" content="width=device-width, initial-scale=1.0" />
<TITLE><?= $locale["brand-name"] ?> — <?= $locale["page-index"] ?></TITLE>
<LINK rel="stylesheet" type="text/css" media="all" href="style.css" />
<SCRIPT type="text/javascript" src="scripts/main.js"></SCRIPT>
</HEAD>
<BODY>
<DIV id="banner">
<A href=".">
<IMG src="media/logo/logo-optimized.png" alt="<?= $locale["brand-name"] ?>" />
</A>
</DIV>
<DIV id="navigation">
<NAV>
<A href="index.php"><?= $locale["page-index"] ?></A>
<A href="about.php"><?= $locale["page-about"] ?></A>
<A href="community.php"><?= $locale["page-community"] ?></A>
<A href="contact.php"><?= $locale["page-contact"] ?></A>
</NAV>
</DIV>
<DIV id="noscriptwarning">
<?= $locale[ "noscript-warn" ] ?>
</DIV>
<DIV id="panels">
<DIV id="postcontainer">
<?php
$all_posts = array_reverse( list_all_posts()[ "id" ] );
if (sizeof($all_posts) > 6)
$all_posts = array_slice($all_posts, 0, $max_posts_count_in_index);
foreach ($all_posts as $post_id):
$post_information = get_post_by_id($post_id);
# Cut first X characters.
$contents = substr($post_information[ "contents" ], 0, $index_max_post_content_length);
?>
<DIV class="post">
<H2 class="titlebar">
<A href="view_post.php?id=<?= $post_id ?>"><?= $post_information[ "metadata" ][ "title" ] ?></A>
</H2>
<P class="titlebar"><?= $post_information[ "metadata" ][ "date" ] ?></P>
<HR />
<DIV class="content"><?= $contents ?></DIV>
<A href="view_post.php?id=<?= $post_id ?>" class="readmore"><?= $locale["blog-read-more"] ?></A>
</DIV>
<?php
endforeach;
?>
</DIV>
<DIV id="rightpanel">
<H4><?= $locale[ "user-panel-name" ] ?></H4>
<HR />
<P>User accounts are scheduled for development.</P>
<BR />
<H4><?= $locale[ "playback-history-name" ] ?></H4>
<HR />
<NOSCRIPT><?= $locale[ "playback-history-noscript" ] ?></NOSCRIPT>
<DIV id="playbackhistory"></DIV>
<HR />
<P id="footer"><?= $copyright ?> <BR /> <A href="<?= $source_code_url ?>"><?= $locale[ "source-code" ] ?></A></P>
</DIV>
</DIV>
<DIV style="text-align:center">
<DIV id="playercontainer" style="text-align:left">
<?php foreach ($icecast_streams as $id => $stream): ?>
<DIV class="switchstream" id="streamswitcher-<?= $id ?>" style="left: <?= ($id * 125) + 10 ?>px;"> <?= $id ?> - <?= $stream[ "info" ] ?> </DIV>
<?php endforeach; ?>
<DIV id="hideplayer"><?= $locale[ "player-hide" ] ?></DIV>
<?php foreach ($icecast_streams as $id => $stream): ?>
<DIV class="player" id="stream-<?= $id ?>">
<IMG src="media/albums/default-album-cover.jpg" alt="<?= $locale[ "player-cover-art-image-alt" ] ?>" id="coverart" />
<AUDIO controls volume="40" preload="none" autobuffer="none">
<SOURCE src="<?= $stream["url"] ?>" type="<?= $stream["type"] ?>" codecs="opus" />
<P><?= $locale["player-html5-no-support"] ?> <?= $stream["playlist_dl"] ?></P>
</AUDIO>
</DIV>
<?php endforeach; ?>
<DIV id="playbackinformation">
<P><?= $locale[ "song-loading" ] ?></P>
</DIV>
<NOSCRIPT><P><?= $locale[ "song-noscript_song_information" ] ?></P></NOSCRIPT>
</DIV>
</DIV>
<DIV id="showplayer"><?= $locale[ "player-show" ] ?></DIV>
</BODY>
</HTML>