-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
108 lines (92 loc) · 3.35 KB
/
functions.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
<?php
include_once("globals.php");
function pageStart($pagename, $printBar=true, $include="") {
echo "<!DOCTYPE html>\n";
echo "<html>\n";
echo " <head>\n";
/*
echo " <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n";
echo " <meta charset=\"UTF-8\">\n";
echo " <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n";
echo " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n";
echo " <meta name=\"description\" content=\"TODO\" />\n";
echo " <meta name=\"keywords\" content=\"TODO\" />\n";
echo " <meta name=\"author\" content=\"Sorin Marti\" />\n";
*/
echo " <title>FrueCHTeKorB - Korpus studentischer Arbeiten</title>\n";
echo " <link rel=\"shortcut icon\" href=\"images/favicon.ico\" type=\"image/x-icon\">";
echo " <link rel=\"icon\" href=\"images/favicon.ico\" type=\"image/x-icon\">";
if($include=="pieChart") {
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"css/pieChart.css\" />\n";
echo " <script type=\"text/javascript\" src=\"js/pie-chart-js.js\"></script>";
echo " <script>
window.onload= function() {
var c1 = document.getElementById(\"pieChart1\");
c1.resize();
var c2 = document.getElementById(\"pieChart2\");
c2.resize();
var c3 = document.getElementById(\"pieChart3\");
c3.resize();
var c4 = document.getElementById(\"pieChart4\");
c4.resize();
}
</script>";
}
if($include=="wordCloud") {
}
if($include=="markdown") {
echo " <script src=\"https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js\"></script>";
echo " <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css\">";
}
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"css/korpus.css\" />\n";
echo " </head>\n";
// BODY
echo " <body>\n";
echo " <div id=\"content\">\n";
if($printBar) {
printTitleBar($pagename);
}
echo " <div id=\"content_text\">\n";
}
function pageEnd() {
echo " </div>\n";
echo " <div id=\"footer\"><i>Ein Projekt der germanistischen Linguistik der Universität Basel.</i></div>\n";
echo " </div>\n";
echo " </body>\n";
echo "</html>\n";
}
function printTitleBar($pagename) {
$split = explode("/", $pagename);
$pagename = $split[sizeof($split)-1];
$pages = array(array("Startseite", "index.php"),
array("Korpus", "korpus.php"),
array("Kontakt", "kontakt.php"),
array("Intern", "intern.php"));
echo " <div id=\"navigation1\">\n";
echo " <ul class=\"nav\">\n";
foreach($pages as $page) {
if($page[1]==$pagename) {
$active = "class=\"active1\"";
}
else {
$active = "class=\"inactive1\"";
}
echo " <li class=\"nav\"><a $active href=\"".$page[1]."\">".$page[0]."</a></li>\n";
}
echo " </ul>\n";
echo " </div>\n";
echo " <div id=\"navigation2\">\n";
echo " <ul class=\"nav\">\n";
foreach($pages as $page) {
if($page[1]==$pagename) {
$active = "class=\"active2\"";
}
else {
$active = "class=\"inactive2\"";
}
echo " <li class=\"nav\"><a $active href=\"".$page[1]."\">".$page[0]."</a></li>\n";
}
echo " </ul>\n";
echo " </div>\n";
}
?>