-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnews.php
59 lines (48 loc) · 1.16 KB
/
news.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
<?php include_once("./includes/config.inc"); ?>
<!DOCTYPE html>
<html>
<head>
<title>simpleLifter news</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./resources/newstyles.css">
</head>
<body>
<!-- navbar -->
<?php include(ROOT_PATH."/header.php"); ?>
<!-- end navbar -->
<!-- Content -->
<div class="content">
<!-- Header -->
<div class="heading">News and updates</div>
<!-- End Header -->
<!-- Add updates here -->
<?php
$c=glob("./news/*.txt");
rsort($c, SORT_NATURAL);
foreach($c as $f) {
$content = file($f);
$d=date_create_from_format("ymd",basename($f,".txt"));
$d=date_format($d,'d M Y');
echo "<div class='news-entry'>";
echo "<div class='news-title'>".$content[0]."</div>";
echo "<p>".$d."</p>";
array_shift($content);
foreach($content as $lines) {
echo $lines;
};
echo "<a href='#top'>Top</a>";
echo "</div>";
}
?>
<div class="heading"></div>
<img class="footer-image" src="./resources/happyevan.jpg"></img>
<!-- End Content -->
</div>
<!-- Footer -->
<?php include(ROOT_PATH."/footer.php"); ?>
<!-- End Footer -->
</body>
<script>
</script>
</html>