-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.php
More file actions
93 lines (85 loc) · 2.99 KB
/
app.php
File metadata and controls
93 lines (85 loc) · 2.99 KB
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
<?php
/**
* Loads the controller to run the site
* @package ctrl
* @filesource ./core/ctrl.php
*/
require("./core/ctrl.php"); ?>
<!DOCTYPE html>
<html lang="<?= LANG; ?>">
<head>
<title><?= SEITENTITEL ?> » <?php
// fetches the individual title
// @link routes.php
foreach($Sites as $HtmlTitle){
if ($App == $HtmlTitle['url']){
echo $HtmlTitle['site_title'];
break;
}
} ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="keywords" content="<?php
// fetches the individual keywords
// @link routes.php
foreach($Sites as $HtmlTitle){
if ($App == $HtmlTitle['url']){
echo $HtmlTitle['site_key'];
break;
}
} ?>">
<meta name="description" content="<?php
// fetches the individual description
// @link routes.php
foreach($Sites as $HtmlTitle){
if ($App == $HtmlTitle['url']){
echo $HtmlTitle['site_description'];
break;
}
} ?>">
<meta name="robots" content="index,follow">
<!-- iOS Support -->
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="no">
<link rel="apple-touch-icon" sizes="72x72" href="<?= WEBROOT; ?>app/img/{logo.png}.png">
<link rel="apple-touch-icon" sizes="114x114" href="<?= WEBROOT; ?>app/img/{logo@2x.png}.png">
<!-- end iOS Support -->
<link rel="stylesheet" type="text/css" href="<?= WEBROOT; ?>app/css/ui.min.css">
<link type="text/plain" rel="author" href="<?= WEBROOT; ?>humans.txt">
<!-- Google Webfont Support -->
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<!-- end Google Webfont Support -->
</head>
<body>
<?php
/**
* Renders the header template file from the tpl directory
* @filesource app/tpl/header.php
*/
include("app/tpl/header.php"); ?>
<section>
<?php
/**
* Reads the html content from the sites directory
* @param string $App is the acutal site helper
* @param string $AppSite is the site file (e.g. home.php)
* @param string $html reads entire file into a string
* @link PHP Documentation (http://php.net/manual/de/function.file-get-contents.php)
*/
$AppSite = "./app/sites/".$App.".php";
if (file_exists($AppSite)){
// include the PHP/HTML content
include $AppSite;
} else {
echo "<div class=\"e404\"><iframe src=\"http://giphy.com/embed/GK2zBA4xXqIPS\" width=\"240\" height=\"180\" frameBorder=\"0\" class=\"giphy-embed\" allowFullScreen></iframe><p><a href=\"http://giphy.com/gifs/loop-space-lost-GK2zBA4xXqIPS\">via GIPHY</a></p></div>";
} ?>
</section>
<?php
/**
* Renders the footer template file from the tpl directory
* @filesource app/tpl/footer.php
*/
include("app/tpl/footer.php"); ?>
<script src="<?= WEBROOT; ?>app/js/app.min.js"></script>
</body>
</html>