-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.php
75 lines (54 loc) · 1.38 KB
/
template.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
<?php
$_GET['link'];
$Link = isset($_GET['link']) ?
$_GET['link'] : null;
$Err = $Link;
if (file_exists('php-files/page/' . $Link . '.php')) {
} else {
$Link = '404_not_found';
}
$fileDir = 'php-files/page/' . $Link . '.php';
$Link = preg_replace('/[^a-zA-Z0-9]+/', ' ', $Link);
$Err = preg_replace('/[^a-zA-Z0-9]+/', ' ', $Err);
include $fileDir;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo'<title>TRPS | ' . $Link . '</title>' ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" media="only screen and (max-width: 710px)" href="css/small.css" />
</head>
<body>
<header>
<h1> That Raspberry Pi Server </h1>
<nav>
<?php include 'php-files/nav.php'; ?>
</nav>
</header>
<section class="top2">
<div class="body-outter">
<div class="body-inner-dark">
<?php echo'<h1>' . $Title . '</h1>' ?>
<!-- <p> Welcome to TRPS, the web server running on a raspberry pi </p> -->
</div>
</div>
</section>
<main>
<section class="body">
<div class="body-outter">
<?php echo '<h1>' . $Header . '</h1> <span>' . $SubHead . '</span>' ?>
<div class="body-inner-light ">
<?php
if ( $Link == '404 not found'){
echo'<h2> Oh No! </h2>';
echo '<h3> We could not find "' . $Err . '"</h3>';
}
body();
?>
</div>
</section>
</main>
</body>
</html>