-
Notifications
You must be signed in to change notification settings - Fork 1
/
pages.php
executable file
·80 lines (78 loc) · 1.88 KB
/
pages.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
<?php
session_start();
?>
<html>
<head>
<?php
include("header.php");
$page = $_GET['page'];
$type = $_GET['type'];
?>
<script src="./js/logoslide.js"></script>
<script src="./js/imgPreview.js"></script>
<script src="./js/imgDisplay.js"></script>
</head>
<div class="container">
<section class="main">
<?php
include("slider.php");
?>
<header role="banner"> <!-- begin content for the page -->
<?php
echo "<h1>$page</h1>";
if ($_SESSION['username']) {
if ($type == "image_page") {
echo "<a class=\"edit_imgs\" href=\"./edit_imgs.php?page=$page\">Manage Images</a>";
} elseif ($type == "text_page") {
echo "<a class=\"edit_imgs\" href=\"./edit_text.php?page=$page\">Manage Page</a>";
}
}
echo "</header> <!-- end [role=\"banner\"] -->";
include("./pages/$type/display.php");
/*
if ($type == "image_page") {
?>
<section class="img-display">
<div class="display-container">
<?php
// include first 16 lines of images.php
$array = file("./pages/$page/images.php");
$count = count($array);
for($i = 0; $i < $count; $i++) {
echo $array[$i];
}
// create blank images so total fills 4 by 4 grid
$line_count = count($array);
if($line_count[1] == '') {
$line_count--;
}
if($line_count <= 15) {
for($i = $line_count; $i < 15; $i++) {
echo "<div class=\"img-container\"><img src=\"./img/noimage.png\" title=\"\" /></div>";
}
}
?>
</div>
<section class="full-display">
</section>
</section> <!-- end section.img-display -->
<?php
} else {
?>
<section class="text-display">
<?php
$content = file_get_contents("./pages/$page/content.txt");
echo "<h1>$page</h1>
<div class=\"text-content\">
$content
</div>";
?>
</secion>
<?php
}
*/
?>
</section> <!-- end section.main -->
</div> <!-- end div.container -->
</body>
</html>