-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathview.php
38 lines (30 loc) · 929 Bytes
/
view.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
<?php
require("../../global/library.php");
use FormTools\Core;
use FormTools\General;
use FormTools\Modules;
$module = Modules::initModulePage("admin");
$LANG = Core::$L;
$L = $module->getLangStrings();
$page_id = $request["page_id"];
$page_info = $module->getPage($page_id);
$content = $page_info["content"];
switch ($page_info["content_type"]) {
case "php":
ob_start();
eval($page_info["content"]);
$content = ob_get_contents();
ob_end_clean();
break;
case "smarty":
$content = General::evalSmartyString($page_info["content"]);
break;
}
$page_vars = array(
"page_id" => $page_id,
"phrase_edit_page" => $L["phrase_edit_page"],
"head_title" => "{$L["word_page"]} - {$page_info["heading"]}",
"page_info" => $page_info,
"content" => $content
);
$module->displayPage("templates/view.tpl", $page_vars);