aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/include/base/base.php
diff options
context:
space:
mode:
authorM.Gergo2018-12-16 16:35:17 +0100
committerM.Gergo2018-12-16 16:35:17 +0100
commite6988247360fa98b85915a38803d018dd353df00 (patch)
tree24f42628f6cdaedacc06ce033378173a0e561be9 /mayor-orig/www/include/base/base.php
parent2a219b9ea312fb88703a33ea2450e32af40be64a (diff)
downloadmayor-e6988247360fa98b85915a38803d018dd353df00.tar.gz
mayor-e6988247360fa98b85915a38803d018dd353df00.zip
Rev: 4412
Diffstat (limited to 'mayor-orig/www/include/base/base.php')
-rw-r--r--mayor-orig/www/include/base/base.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/mayor-orig/www/include/base/base.php b/mayor-orig/www/include/base/base.php
index dd620a41..378b31fd 100644
--- a/mayor-orig/www/include/base/base.php
+++ b/mayor-orig/www/include/base/base.php
@@ -126,13 +126,20 @@ function page($page, $sub, $f, $lang, $skin, $policy = _DEFAULT_POLICY) {
global $_JSON;
if (html_alert($_SESSION['alert'])) { // A figyelmeztető üzenet letilthatja az oldal további megjelenítését.
-
if ($sub != '') {
$load = "$sub/$f";
} else {
$load = $f;
}
+ // --TEST $API_DICTIONARY['api']['naplo']['orarend']['orarend'] = true;
+ if ($skin=='api') {
+ $_JSON['api']['version'] = '1.0';
+ if (isset($API_DICTIONARY[$skin][$page][$sub][$f])===false) { // --TODO API_DICTIONARY
+ return false;
+ }
+ }
+
if (file_exists("policy/$policy/$page/$load.php")) {
if (file_exists("lang/$lang/module-$page/base.php")) {
require_once("lang/$lang/module-$page/base.php");
@@ -146,20 +153,19 @@ function page($page, $sub, $f, $lang, $skin, $policy = _DEFAULT_POLICY) {
}
if (file_exists("skin/$skin/module-$page/html/base.phtml")) {
require_once("skin/$skin/module-$page/html/base.phtml");
- } elseif (file_exists("skin/"._DEFAULT_SKIN."/module-$page/html/base.phtml")) {
+ } elseif ($skin!=='api' && file_exists("skin/"._DEFAULT_SKIN."/module-$page/html/base.phtml")) { // api esetén nem töltjük be a default skin phtml-t
require_once("skin/"._DEFAULT_SKIN."/module-$page/html/base.phtml");
}
if (file_exists("skin/$skin/module-$page/html/$load.phtml")) {
require_once("skin/$skin/module-$page/html/$load.phtml");
- } elseif (file_exists("skin/"._DEFAULT_SKIN."/module-$page/html/$load.phtml")) {
+ } elseif ($skin!=='api' && file_exists("skin/"._DEFAULT_SKIN."/module-$page/html/$load.phtml")) { // api esetén nem töltjük be a default skin phtml-t
require_once("skin/"._DEFAULT_SKIN."/module-$page/html/$load.phtml");
}
+ $_JSON['api']['debug'] = serialize($page.$load);
include("policy/$policy/$page/$load.php");
- //szamlal($policy,$page);
} elseif (file_exists("static/$lang/$page/$load.html")) {
include("static/$lang/$page/$load.html");
- //szamlal($policy,$page);
} else {
//??? ha már kiírtuk a hibaüzeneteket, újabbat nem írhatunk ki sajnos :( html_alert(array('page:page_missing:'."[$page]:[$sub]:[$f]")); --> rights.php
}