diff options
author | M.Gergo | 2018-07-06 11:14:41 +0200 |
---|---|---|
committer | M.Gergo | 2018-07-06 11:14:41 +0200 |
commit | 43de9af71f7f4ca5731b94a06d688ae8412ba427 (patch) | |
tree | 54835de1dfcda504c02da261f0dc26885aed2e89 /mayor-orig/www/skin/cron | |
parent | 50310b0e4513ee3fcce67351ae61e8fff851130e (diff) | |
download | mayor-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/skin/cron')
-rw-r--r-- | mayor-orig/www/skin/cron/base/html/alert.phtml | 6 | ||||
-rw-r--r-- | mayor-orig/www/skin/cron/base/html/base.phtml | 56 |
2 files changed, 62 insertions, 0 deletions
diff --git a/mayor-orig/www/skin/cron/base/html/alert.phtml b/mayor-orig/www/skin/cron/base/html/alert.phtml new file mode 100644 index 00000000..bf97d3c5 --- /dev/null +++ b/mayor-orig/www/skin/cron/base/html/alert.phtml @@ -0,0 +1,6 @@ +<?php + function html_alert($alert='') { + $_SESSION['alert'] = array(); + return true; + } +?>
\ No newline at end of file diff --git a/mayor-orig/www/skin/cron/base/html/base.phtml b/mayor-orig/www/skin/cron/base/html/base.phtml new file mode 100644 index 00000000..e12cefb3 --- /dev/null +++ b/mayor-orig/www/skin/cron/base/html/base.phtml @@ -0,0 +1,56 @@ +<?php + +function html_base($sessionID,$policy,$page,$sub,$f,$lang,$skin,$MENU) { + + global $_JSON; + +# _httpHeader(); + + define('_UNIQUE', uniqid()); + + page($page,$sub,$f,$lang,$skin,$policy); + + if (is_array($_SESSION['alert']) && count($_SESSION['alert'])>0) { + _html_base_alert($_SESSION['alert']); + } + $_SESSION['alert'] = array(); + +} + +function _html_base_alert($alert) { + if (is_array($alert)) + foreach($alert as $a) { + $param = array(); + $tmp = explode(':', $a); + $aType = readVariable($tmp[0], 'enum', 'message', array('message','info','page')); $aCode = $tmp[1]; + for ($p = 2; $p < count($tmp); $p++) $param[] = htmlspecialchars($tmp[$p]); + $pstr = ''; + // preparing $msg + if (!isset($ALERT_MSG[$aCode]) || $ALERT_MSG[$aCode] == '') + $msg = $ALERT_MSG['default'].' ('.$aType.':'.$aCode.')'; + else $msg = $ALERT_MSG[$aCode]; + + // paraméter behelyettesítés + for($i = 0; $i < count($param); $i++) { + $_msg = $msg; + $msg = @str_replace("%$i%",':'.($param[$i]).':',$msg); + if ($param[$i] != '' and $_msg == $msg) $pstr .= ':'.($param[$i]).':,'; + } + if ($pstr != '') $msg .= ' (' . substr($pstr,0,-1) . ')'; + if (($aType == 'message') or ($aType == 'page')) { + $title = _ERROR; + $class = 'errorMsg'; + if ($aType == 'page') $showPage = false; + } else { + $title = _INFORMATION; + $class = 'infoMsg'; + } + $msg = ''.$title.': ' . $msg; + $showPage .= ''. $msg .''."\n"; + } + + return $showPage; + +} + +?> |