aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/include/alert/base.php
diff options
context:
space:
mode:
authorM.Gergo2018-07-06 11:14:41 +0200
committerM.Gergo2018-07-06 11:14:41 +0200
commit43de9af71f7f4ca5731b94a06d688ae8412ba427 (patch)
tree54835de1dfcda504c02da261f0dc26885aed2e89 /mayor-orig/www/include/alert/base.php
parent50310b0e4513ee3fcce67351ae61e8fff851130e (diff)
downloadmayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.tar.gz
mayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.zip
2018/Feb/28 -i állapot hozzáadva, mint a módosítások kiindulási állapota
Diffstat (limited to 'mayor-orig/www/include/alert/base.php')
-rw-r--r--mayor-orig/www/include/alert/base.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/mayor-orig/www/include/alert/base.php b/mayor-orig/www/include/alert/base.php
new file mode 100644
index 00000000..3c886dcf
--- /dev/null
+++ b/mayor-orig/www/include/alert/base.php
@@ -0,0 +1,38 @@
+<?php
+#
+# MaYoR keretrendszer - figyelmeztető üzenetek
+#
+
+// Base
+if (file_exists('include/alert/'.$lang.'/base.php')) {
+ require_once('include/alert/'.$lang.'/base.php');
+} elseif (file_exists('include/alert/'._DEFAULT_LANG.'/base.php')) {
+ require_once('include/alert/'._DEFAULT_LANG.'/base.php');
+}
+
+// Policy - Backend
+if (file_exists('include/alert/'.$lang.'/'.$AUTH[$policy]['backend'].'.php')) {
+ require_once('include/alert/'.$lang.'/'.$AUTH[$policy]['backend'].'.php');
+} elseif (file_exists('include/alert/'._DEFAULT_LANG.'/'.$AUTH[$policy]['backend'].'.php')) {
+ require_once('include/alert/'._DEFAULT_LANG.'/'.$AUTH[$policy]['backend'].'.php');
+}
+
+// Module(s) - 2016
+try {
+ $_dirlist = scandir('include/alert/'.$lang.'/');
+ for ($i=0; $i<count($_dirlist); $i++) {
+ list($_filename,$_ext) = explode('.',$_dirlist[$i]);
+ list($_prefix,$_module) = explode('-',$_filename);
+ if (substr($_filename,0,7)==='module-' && $_ext == 'php' && in_array($_module,$VALID_MODULES)) {
+ if (file_exists('include/alert/'.$lang.'/module-'.$_module.'.php')) {
+ require_once('include/alert/'.$lang.'/module-'.$_module.'.php');
+ } elseif (file_exists('include/alert/'._DEFAULT_LANG.'/module-'.$_module.'.php')) {
+ require_once('include/alert/'._DEFAULT_LANG.'/module-'.$_module.'.php');
+ }
+ }
+ }
+} catch (Exception $e) {
+ $_SESSION['alert'][] = 'info:'.$e->getMessage();
+}
+
+?>