aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/include/base
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
parent2a219b9ea312fb88703a33ea2450e32af40be64a (diff)
downloadmayor-e6988247360fa98b85915a38803d018dd353df00.tar.gz
mayor-e6988247360fa98b85915a38803d018dd353df00.zip
Rev: 4412
Diffstat (limited to 'mayor-orig/www/include/base')
-rw-r--r--mayor-orig/www/include/base/base.php16
-rw-r--r--mayor-orig/www/include/base/config.php2
2 files changed, 12 insertions, 6 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
}
diff --git a/mayor-orig/www/include/base/config.php b/mayor-orig/www/include/base/config.php
index 4a234fcf..28f711cb 100644
--- a/mayor-orig/www/include/base/config.php
+++ b/mayor-orig/www/include/base/config.php
@@ -31,7 +31,7 @@ if (!defined('_SECURECOOKIE')) define('_SECURECOOKIE', true);
define('_BASE_URL',( ($_SERVER['HTTPS']=='on')?"https://".$_SERVER['SERVER_NAME']:"http://".$_SERVER['SERVER_NAME'] ));
/* classic, blue, ajax + rpc, + cron kiegészítés */
-$SKINS = @array_unique(array_merge($SKINS,array('classic','blue','ajax','rpc','gray','cron')));
+$SKINS = @array_unique(array_merge($SKINS,array('classic','blue','ajax','rpc','gray','cron','api')));
$SKINSSHOW = @array_unique(array_merge($SKINSSHOW,array('classic','vakbarat','gray')));
if (is_array($POLICIES) && defined('_CONFIGDIR')) {