-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.php
More file actions
151 lines (120 loc) · 4.45 KB
/
index.php
File metadata and controls
151 lines (120 loc) · 4.45 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
/*******************************************************************************
*
* @author : Dominik Bonsch <[email protected]>
* @date :
* @copyright : Webfrap Developer Network <[email protected]>
* @project : Webfrap Web Frame Application
* @projectUrl : http://webfrap.net
*
* @licence : BSD License see: LICENCE/BSD Licence.txt
*
* @version: @package_version@ Revision: @package_revision@
*
* Changes:
*
*******************************************************************************/
define('PHP_TAG', '<?php');
define('BUIZ',false);
// geshi einbinden
if (file_exists('./core/vendor/geshi/geshi.php'))
include './core/vendor/geshi/geshi.php';
include './core/vendor/dflydev/markdown/IMarkdownParser.php';
include './core/vendor/dflydev/markdown/MarkdownParser.php';
include './core/vendor/dflydev/markdown/MarkdownExtraParser.php';
use dflydev\markdown\MarkdownParser;
include './conf/conf.php';
include './core/functions.php';
include './core/grid/SimpleGrid.php';
include './core/tree/TreeSimple.php';
?><!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<title>WebFrap Dokumentation</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-Script-Type" content="application/javascript" />
<meta http-equiv="content-Style-Type" content="text/css" />
<meta http-equiv="content-language" content="de" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link href="./css/normalize.css" rel="stylesheet" type="text/css" />
<link href="./css/main.css" rel="stylesheet" type="text/css" />
<link href="./css/doc.css" rel="stylesheet" type="text/css" />
<link href="./css/jquery.treeview.css" rel="stylesheet" type="text/css" />
<link type="text/plain" rel="author" href="./humans.txt" />
</head>
<body>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser.
Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<div id="docu-head" class="lbox" >
<div class="headBox" >
<h1>
<a href="index.php" target="menu" >Web<span>Frap</span></a>
<a href="index.php" target="menu" class="erDoc" >The Web Frame Application</a>
</h1>
<!-- <h3> just a placeholder for the space here </h3>-->
</div>
<ul class="topMenu" >
<?php echo renderTopMenu( Conf::$modules, Conf::$topMenu ) ?>
</ul>
</div>
<div id="docu-menu" class="lbox" >
<?php echo renderPageMenu( isset($_GET['page'])?$_GET['page']:null ); ?>
</div>
<div id="docu-content" class="content lbox" >
<div style="width:900px;" >
<?php
if (isset($_GET ['page'])) {
$page = '../doc/de/' . str_replace(array (
'/', '.'
), array (
'', '/'
), $_GET ['page']) . '.php';
} else {
$page = './doc/de/start.php';
}
if (file_exists($page)) {
start_md();
include $page;
echo render_md();
} elseif ('127.0.0.1' == $_SERVER ['SERVER_NAME']) {
if (!is_dir(dirname($page)))
mkdir(dirname($page), 0777, true);
$tmp = explode('.', $_GET['page']);
$key = ucfirst(array_pop($tmp));
file_put_contents( $page, <<<HTML
#{$key}
Hier könnte ihre Dokumentation stehen... Wenn sie endlich jemand schreiben würde...
## Codebeispiel
<?php start_highlight(); ?>
<_..._>
</_..._>
<?php display_highlight( 'xml' ); ?>
HTML
);
start_md();
include $page;
render_md();
} else {
include '../doc/de/errors/404.php';
}
?>
</div>
</div>
<div id="docu-footer" class="lbox" >
Copyright usw.
</div>
<script type="application/javascript" src="./js/vendor/jquery-1.9.0.min.js"></script>
<script type="application/javascript" src="./js/vendor/modernizr-2.6.2.min.js"></script>
<script type="application/javascript" src="./js/plugins.js"></script>
<script type="application/javascript" src="./js/main.js"></script>
<script type="application/javascript" src="./js/jquery.treeview.js"></script>
<script type="application/javascript" src="./js/d3.js"></script>
<script type="application/javascript" src="./js/graphs.js"></script>
<script type="application/javascript" src="./js/documentor.js"></script>
</body>
</html>