From 43de9af71f7f4ca5731b94a06d688ae8412ba427 Mon Sep 17 00:00:00 2001
From: M.Gergo
Date: Fri, 6 Jul 2018 11:14:41 +0200
Subject: 2018/Feb/28 -i állapot hozzáadva, mint a módosítások kiindulási
állapota
---
mayor-orig/www/skin/classic/base/html/alert.phtml | 85 +++
mayor-orig/www/skin/classic/base/html/base.phtml | 618 ++++++++++++++++++++++
2 files changed, 703 insertions(+)
create mode 100644 mayor-orig/www/skin/classic/base/html/alert.phtml
create mode 100644 mayor-orig/www/skin/classic/base/html/base.phtml
(limited to 'mayor-orig/www/skin/classic/base/html')
diff --git a/mayor-orig/www/skin/classic/base/html/alert.phtml b/mayor-orig/www/skin/classic/base/html/alert.phtml
new file mode 100644
index 00000000..ae3379cb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/html/alert.phtml
@@ -0,0 +1,85 @@
+'.$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;
+ $sign='';
+ $hasError = true;
+ } else {
+ $title = _INFORMATION;
+ $class = 'infoMsg';
+ $sign='';
+ $hasInfo = true;
+ }
+ $class .= ' hidden';
+
+ $msg = ''.$title.' ['.$j.']: ' . $msg;
+ //echo '
'.str_replace('***','
',$msg).'
'."\n";
+
+ $x .= $sign.str_replace('***',' ',str_replace('
',' ',$msg))."
\n";
+
+ // Függetlenül attól, hogy milyen paramétert kaptunk a $_SESSION['alert']-et üresre állítjuk
+ $_SESSION['alert'] = array();
+ }
+
+ if ($hasInfo==true && $hasError==false) {
+ echo '';
+ } else {
+ echo '';
+ }
+
+ return $showPage;
+
+ }
+
+?>
\ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/base/html/base.phtml b/mayor-orig/www/skin/classic/base/html/base.phtml
new file mode 100644
index 00000000..e482d4e6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/html/base.phtml
@@ -0,0 +1,618 @@
+ base.php
+ putValidXHTML()
+
+ Felhasználtuk: http://projects.lukehaas.me/css-loaders/
+
+*/
+
+ require('skin/blue/base/color_schemes.php'); // blue? !!!!!!!!!!!!????????????????
+ if (!defined('__COLOR_SCHEME') || !is_array($_COLOR_SCHEMES[__COLOR_SCHEME]))
+ $_COLORS = $_COLOR_SCHEMES['blue'];
+ else
+ $_COLORS = $_COLOR_SCHEMES[__COLOR_SCHEME];
+
+
+// -------------------------------------------------------------------
+// html_base() : a html oldal szerkezete
+// -------------------------------------------------------------------
+
+function html_base($sessionID,$policy,$page,$sub,$f,$lang,$skin,$MENU) {
+
+ _httpHeader();
+
+ if ($MENU['set'][$policy][$page][$sub][$f]['refresh'] > 0) {
+ @header("Refresh:".intval($MENU['set'][$policy][$page][$sub][$f]['refresh']));
+ }
+
+ html_head($page,$sub,$f,$lang,$skin);
+ _debugLayer();
+ html_mayor_head($sessionID,$page,$sub,$f,$lang,$MENU,$skin);
+ echo '';
+ $_defaultPageLayout = ($_SESSION['pageLayout']==0) ? 'leftpad' : 'toppad';
+ echo '';
+ page($page,$sub,$f,$lang,$skin,$policy);
+ echo '
';
+ html_mayor_foot();
+}
+
+// -------------------------------------------------------------------
+// html_head() : html fejlec kiirasa
+// -------------------------------------------------------------------
+
+function html_head($page,$sub,$f,$lang,$skin) {
+
+ global $INCLUDES, $SSSHH, $SSSBB;
+
+ if ($f == '') $f = $page;
+ ## ----------------------------------------------
+ ## Note http://hixie.ch/advocacy/xhtml
+ ## But this is crazy! Using Doctype sniffing instead...
+ ## Also read: http://www.mozilla.org/docs/web-developer/faq.html
+ ## header('Content-type: application/xhtml+xml');
+ ## -----------------------------------------------
+
+ // debug üzenetek layer-ének lezárása
+// if (defined('__START_DEBUG') && __START_DEBUG === true) echo "\n";
+
+ echo ''."\n";
+ echo ''."\n";
+ echo ''."\n";
+ echo ''."\n";
+ echo ''."\n";
+ echo ''."\n";
+ echo '';
+ if (defined('_SITE')) echo _SITE.' - ';
+ echo _MAIN_TITLE;
+ echo '.';
+ echo _MAYORREV;
+ echo ''."\n";
+ includeCSS($page,$sub,$f,$skin);
+ includeCSS($page,$sub,$f,$skin,'handheld'); // install css for handheld devices
+ includeJS($page,$sub,$f,$skin);
+ includeSocial($page,$sub,$f);
+
+ if (is_string($SSSHH) && $SSSHH!='') echo $SSSHH;
+
+ if (is_array(@$INCLUDES['html_head']['global'])) foreach ($INCLUDES['html_head']['global'] as $key => $include) {
+ if (file_exists("skin/$skin/$include")) {
+ include("skin/$skin/$include");
+ } elseif (file_exists('skin/'._DEFAULT_SKIN.'/'.$include)) {
+ include('skin/'._DEFAULT_SKIN.'/'.$include);
+ }
+ }
+ if (is_array(@$INCLUDES['html_head'][$page])) foreach ($INCLUDES['html_head'][$page] as $key => $include) {
+ if (file_exists("skin/$skin/$include")) {
+ include("skin/$skin/$include");
+ } elseif (file_exists('skin/'._DEFAULT_SKIN.'/'.$include)) {
+ include('skin/'._DEFAULT_SKIN.'/'.$include);
+ }
+ }
+ echo ''."\n";
+ echo ''."\n".''."\n";
+ if (is_string($SSSBB) && $SSSBB!='') echo $SSSBB;
+
+}
+
+// -------------------------------------------------------------------
+// mayor_menu(): a menü kiiratása
+// -------------------------------------------------------------------
+
+function mayor_menu($MENU,$sessionID,$lang = _DEFAULT_LANG,$skin = _DEFAULT_SKIN) {
+
+ global $policy, $page, $sub, $f, $LANGUAGES, $SKINSSHOW, $_COLORS,$NAV;
+// echo '
';
+ echo '
';
+
+ echo ''."\n";
+ if (is_array($MENU)) {
+
+ $active_page=false;
+ foreach ($MENU as $aModule => $pItems) {
+ if ($aModule != 'modules') {
+ for ($i = 0; $i < count($pItems); $i++) {
+ if ($page == $aModule and
+ ( $active_page===false && ( $_SERVER["REQUEST_URI"]=='/' || (!isset($pItems[$i]['url'])) || strpos($_SERVER["REQUEST_URI"],$pItems[$i]['url']) !== false || strpos($pItems[$i]['url'],"page=$page") !== false) )
+ ) {
+ echo '- ';
+ $active_page=true;
+ } else {
+ if ($page=='n4p1o' || count($NAV[1])>0)
+ echo '
- '; //--none
+ else
+ echo '
- '; //--none
+ }
+ if (isset($pItems[$i]['url']) && $pItems[$i]['url'] != '') {
+ if ($pItems[$i]['url'][0] == '&') $href = href("index.php?page=$aModule".$pItems[$i]['url']);
+ elseif (substr($pItems[$i]['url'],0,4) == 'http') $href = href($pItems[$i]['url'], array());
+ elseif (isset($pItems[$i]['get']) && is_array($pItems[$i]['get'])) $href = href($pItems[$i]['url'], $pItems[$i]['get']);
+ else $href = href($pItems[$i]['url']);
+ } else {
+ $href = href("index.php?page=$aModule");
+ }
+ echo ''
+ .$pItems[$i]['txt']
+ .''."\n";
+ // --- sub ---
+
+ @$pageArray = $MENU['modules'][$aModule];
+
+ if (is_array($pageArray) && count($pageArray)>0) {
+ echo '
'."\n";
+ foreach ($pageArray as $aSub => $sItems) {
+ if ($aSub != 'sub') {
+ for ($j=0;$j'; $activeSub = true;
+ } else {
+ echo '- '; $activeSub = false;
+ }
+ if (isset($sItems[$j]['url']) && $sItems[$j]['url'] != '') {
+ if ($sItems[$j]['url'][0] == '&') $href = href("index.php?page=$aModule&f=$aSub".$sItems[$j]['url']);
+ elseif (substr($sItems[$j]['url'],0,4) == 'http') $href = href($sItems[$j]['url'], array());
+ elseif (isset($sItems[$j]['get']) && is_array($sItems[$j]['get'])) $href = href($sItems[$j]['url'], $sItems[$j]['get']);
+ else $href = href($sItems[$j]['url']);
+ } else {
+ $href = href("index.php?page=$aModule&f=$aSub",array('policy','sessionID','lang','skin'));
+ }
+ @$subArray = $MENU['modules'][$aModule]['sub'][$aSub];
+ if (!is_array($subArray) || count($subArray) == 0) {
+ echo ''
+ .$sItems[$j]['txt'].'';
+ } else { // vannak al-al menúk (f - menü)
+ echo ''
+ .$sItems[$j]['txt'].'';
+ // -- f menü --
+ echo ''."\n"; // fmenu
+ } // vannak al-al menük (f -menü)
+
+ echo '
'."\n"; // almenü-pont vége (sub)
+ } // for - on sItems
+ } // ha nem sub == aSub
+ } // foreach pageArray
+ echo '
'."\n"; // submenu
+ } // vannak almenük (sub)
+ echo ' '."\n"; // menüpont vége (page)
+ } // for - on pItems
+ } // ha aModule != 'modules'
+ } // foreach on MENU
+ }
+ echo '-
';
+ echo '
'."\n";
+
+ // ------------------------
+
+
+
+}
+
+// -------------------------------------------------------------------
+// html_mayor_head() : fejlec kiirasa (logo+menu+lastupdated)
+// -------------------------------------------------------------------
+
+function html_mayor_head($sessionID,$page,$sub,$f,$lang,$MENU,$skin = _DEFAULT_SKIN) {
+
+ global $INCLUDES, $INSTALLED_MODULES, $LANGUAGES, $SKINS, $SKINSSHOW, $policy, $SCHOOL_LOGO, $SCHOOL_IDENTITY, $SCHOOL_URL, $NAV;
+
+ _updateWindow();
+ _updateWindowSide();
+ _keyHelp();
+ _searchLayer();
+
+ echo '';
+ mayorGlobalLogin(defined('_USERACCOUNT') && (!is_string(_USERACCOUNT) || _USERACCOUNT=='') );
+
+ //if (date('m')==12) $imgextra = '-santa'; else $imgextra = '';
+ if (defined('_HOME_LOGO') && file_exists(_HOME_LOGO)) $HOME_LOGO=_HOME_LOGO;
+ elseif (!file_exists($HOME_LOGO = 'skin/'.$skin.'/base/img/mayor_small_ssl'.$imgextra.'.png'))
+ $HOME_LOGO = 'skin/'._DEFAULT_SKIN.'/base/img/mayor_small_ssl'.$imgextra.'.png';
+
+ if (defined('_HOME_LOGO_BADGE') && file_exists(_HOME_LOGO_BADGE)) $HOME_LOGO_BADGE=_HOME_LOGO_BADGE;
+// elseif (!file_exists($HOME_LOGO = 'skin/'.$skin.'/base/img/mayor_small_ssl'.$imgextra.'.png'))
+// $HOME_LOGO = 'skin/'._DEFAULT_SKIN.'/base/img/mayor_small_ssl'.$imgextra.'.png';
+
+ echo '
';
+
+ echo "\n";
+ echo '
';
+
+ echo '
';
+
+ $db = 0; $max = __MAX_MENU; // Az egy sorba megjeleníthető menüpontok maximális száma
+ if (is_array($NAV[1])) foreach ($NAV[1] as $N1) {
+ $txt = '';
+ $i = intval($N1['index']);
+ if (isset($N1['sub'])) {
+ if (!isset($N1['f'])) {
+ $M = $MENU['modules'][ $N1['page'] ][ $N1['sub'] ][ $i ];
+ } else {
+ $M = $MENU['modules'][ $N1['page'] ]['sub'][ $N1['sub'] ][ $N1['f'] ][ $i ];
+ }
+ } elseif (isset($N1['f'])) {
+ $M = $MENU['modules'][ $N1['page'] ][ $N1['f'] ][ $i ];
+ } else {
+ $M = $MENU[$N1['page']][ $i ];
+ }
+ $txt = $M['txt'];
+ $url = $M['url'];
+ $get = $M['get'];
+ if (isset($get)) $href = href( isset($url)?$url:'index.php?page='.$N1['page'].'&sub='.$N1['sub'].'&f='.$N1['f'], $get);
+ else $href = href( isset($url)?$url:'index.php?page='.$N1['page'].'&sub='.$N1['sub'].'&f='.$N1['f']);
+ if ($db<$max) {
+ if ($page == $N1['page'] && $sub == $N1['sub'] && (!isset($N1['f']) || $f == $N1['f'])) $class = ' class="aktiv" '; else $class = '';
+ } else {
+ if ($page == $N1['page'] && $sub == $N1['sub'] && (!isset($N1['f']) || $f == $N1['f'])) $class = ' class="openable aktiv" '; else $class = ' class="openable" ';
+ $style = ' style="display: none;" ';
+ }
+ if ($txt != '') { // Hibás hivatkozás ne rontsa el a menüt!
+ if ($db == $max) echo '
∇Δ';
+ echo '
';
+ echo $txt;
+ echo '';
+ $db++;
+ }
+ }
+
+ echo '
';
+ echo '
'."\n\n";
+
+ mayor_menu($MENU,$sessionID,$lang,$skin);
+
+
+ echo '
';
+
+ /* ----------------- POZ ----------------- */
+ $loginout_img = _svgLoginout(array('print'=>false, 'color' => $_COLORS['login']));
+ $down_svg = _svgDown(array('print'=>false, 'color' => $_COLORS['login']));
+ echo '
';
+ echo '- ';
+ if (!defined('_SCHOOL_NAME')) define('_SCHOOL_NAME',_SITE); // TODO - ?
+ echo ''._SCHOOL_NAME.'';
+ // if ($policy == 'public') {
+ if (defined('_USERACCOUNT') && (!is_string(_USERACCOUNT) || _USERACCOUNT=='')) {
+
+ echo '
';
+ //echo $down_svg.'
'._LOGIN.'';
+ echo '
';
+ echo _LOGIN;
+ echo '';
+ echo $loginout_img;
+
+ // echo '
';
+ // echo '
';
+ // echo '
';
+ echo '
';
+ } else {
+ $_class = $_profileImg ='';
+ if ($_SESSION['googleapi_object']['picture']!='') {
+// $_profileImg = '';
+ $_class = 'googleapi';
+ }
+ if ($_SESSION['facebook_access_token']!='') {
+// echo '';
+ $_class = 'fbconnect';
+ }
+ echo '';
+
+ echo '
';
+ echo '
';
+ echo '
';
+
+ echo '
'._USERCN.'';
+ //echo '
';
+ //echo $loginout_img;
+ //echo '';
+ echo '
';
+ echo '
';
+ echo '
';
+ echo '
'._USERCN.'
';
+ echo '
'._USERACCOUNT.'
';
+ echo '
';
+ echo '
';
+ formBegin();
+ $sessionMaxIdleTime=$sessionAlertTime=0;
+ if ((_SESSIONID!='' && _POLICY!='public') && defined('_SESSION_MAX_IDLE_TIME') && _SESSION_MAX_IDLE_TIME>0) {
+ $sessionMaxIdleTime=((_SESSION_MAX_IDLE_TIME*1000*60*60)+1000);
+ if (defined('_SESSION_ALERT_TIME')) $sessionAlertTime = ((_SESSION_MAX_IDLE_TIME*1000*60*60)-(_SESSION_ALERT_TIME*1000*60));
+ }
+ echo '
';
+ echo '
';
+ formEnd();
+ echo '
';
+
+ echo '
';
+ } // policy != public
+ echo ' ';
+ echo '
';
+ // ------------- POZ ------------
+
+
+ echo "\n";
+ $_defaultPageLayout = ($_SESSION['pageLayout']==0) ? 'vertical' : 'horizontal';
+ echo '
';
+// echo '
X';
+
+// $__M = $MENU['modules'][$page]['sub'][$sub];
+
+ echo '
';
+ echo '
';
+// echo '
';
+// echo '
';
+ if (in_array('vakbarat',$SKINSSHOW)) echo '
';
+ if (in_array('oldschool',$SKINSSHOW)) echo '
';
+// echo '';
+ echo '';
+ echo '
';
+ // echo '
';
+ echo '
';
+
+ echo '
';
+ if (is_array($NAV[2])) {
+ /* Plusz menü - teszt */
+ if (is_array($__M)) {
+ foreach ($__M as $__f=>$__D) {
+ echo '';
+ }
+ }
+ foreach ($NAV[2] as $N2) {
+ $txt = '';
+ $i = intval($N2['index']);
+ if (isset($N2['sub'])) {
+ if (!isset($N2['f'])) {
+ $M = $MENU['modules'][ $N2['page'] ][ $N2['sub'] ][ $i ];
+ } else {
+ $M = $MENU['modules'][ $N2['page'] ]['sub'][ $N2['sub'] ][ $N2['f'] ][ $i ];
+ }
+ } elseif (isset($N2['f'])) {
+ $M = $MENU['modules'][ $N2['page'] ][ $N2['f'] ][ $i ];
+ } else {
+ $M = $MENU[$N2['page']][ $i ];
+ }
+ $txt = $M['txt'];
+ $url = $M['url'];
+ $get = $M['get'];
+ if (isset($get)) $href = href( isset($url)?$url:'index.php?page='.$N2['page'].'&sub='.$N2['sub'].'&f='.$N2['f'], $get);
+ else $href = href( isset($url)?$url:'index.php?page='.$N2['page'].'&sub='.$N2['sub'].'&f='.$N2['f']);
+
+ if ($page == $N2['page'] && $sub == $N2['sub'] && (!isset($N2['f']) || $f == $N2['f'])) $class = ' class="aktiv" '; else $class ='';
+ if ($txt != '') {
+ echo '';
+ }
+ }
+ }
+ echo '
';
+ if (function_exists('_nav2widget')) _nav2widget();
+ echo '
'."\n\n";
+ echo '
'."\n";
+
+ mayor_menu_full($MENU);
+ mayor_breadcrumb();
+
+}
+
+
+// -------------------------------------------------------------------
+// html_mayor_foot() : lablec kiirasa ( )
+// -------------------------------------------------------------------
+
+function html_mayor_foot() {
+ $_defaultPageLayout = ($_SESSION['pageLayout']==0) ? 'leftpad' : 'toppad';
+ echo ''."\n\n";
+ echo "\n";
+}
+
+function mayor_menu_full($MENU,$lang = _DEFAULT_LANG,$skin = _DEFAULT_SKIN) { // TESTING ONLY
+
+ global $policy, $page, $sub, $f, $LANGUAGES, $SKINSSHOW, $_COLORS, $NAVI;
+
+ echo '';
+
+ $NAVI[] = array('txt'=>'Kereső', 'url'=>'','icon'=>'icon-search','id'=>'mayorNaviSearchIcon');
+ if (count($NAVI)>0) {
+ echo '
';
+ }
+ echo '
';
+ }
+ echo ''."\n";
+ if (is_array($MENU)) {
+ $active_page=false;
+ foreach ($MENU as $aModule => $pItems) {
+ if ($aModule != 'modules') {
+ for ($i = 0; $i < count($pItems); $i++) {
+ if ($page == $aModule and
+ ( $active_page===false && ( $_SERVER["REQUEST_URI"]=='/' || (!isset($pItems[$i]['url'])) || strpos($_SERVER["REQUEST_URI"],$pItems[$i]['url']) !== false || strpos($pItems[$i]['url'],"page=$page") !== false) )
+ ) {
+ echo '- ';
+ $active_page=true;
+ } else {
+ echo '
- ';
+
+ }
+ if (isset($pItems[$i]['url']) && $pItems[$i]['url'] != '') {
+ if ($pItems[$i]['url'][0] == '&') $href = href("index.php?page=$aModule".$pItems[$i]['url']);
+ elseif (substr($pItems[$i]['url'],0,4) == 'http') $href = href($pItems[$i]['url'], array());
+ elseif (isset($pItems[$i]['get']) && is_array($pItems[$i]['get'])) $href = href($pItems[$i]['url'], $pItems[$i]['get']);
+ else $href = href($pItems[$i]['url']);
+ } else {
+ $href = href("index.php?page=$aModule");
+ }
+ echo ''
+ .$pItems[$i]['txt']
+ .''."\n";
+ // --- sub ---
+
+ @$pageArray = $MENU['modules'][$aModule];
+
+ if (is_array($pageArray) && count($pageArray)>0) {
+ echo '
'."\n";
+ foreach ($pageArray as $aSub => $sItems) {
+ if ($aSub != 'sub') {
+ for ($j=0;$j'; $activeSub = true;
+ } else {
+ echo '- '; $activeSub = false;
+ }
+ if (isset($sItems[$j]['url']) && $sItems[$j]['url'] != '') {
+ if ($sItems[$j]['url'][0] == '&') $href = href("index.php?page=$aModule&f=$aSub".$sItems[$j]['url']);
+ elseif (substr($sItems[$j]['url'],0,4) == 'http') $href = href($sItems[$j]['url'], array());
+ elseif (isset($sItems[$j]['get']) && is_array($sItems[$j]['get'])) $href = href($sItems[$j]['url'], $sItems[$j]['get']);
+ else $href = href($sItems[$j]['url']);
+ } else {
+ $href = href("index.php?page=$aModule&f=$aSub",array('policy','sessionID','lang','skin'));
+ }
+ @$subArray = $MENU['modules'][$aModule]['sub'][$aSub];
+ if (!is_array($subArray) || count($subArray) == 0) {
+ echo ''
+ .$sItems[$j]['txt'].'';
+ } else { // vannak al-al menúk (f - menü)
+ echo ''
+ .$sItems[$j]['txt'].'';
+ // -- f menü --
+ echo ''."\n"; // fmenu
+ } // vannak al-al menük (f -menü)
+
+ echo '
'."\n"; // almenü-pont vége (sub)
+ } // for - on sItems
+ } // ha nem sub == aSub
+ } // foreach pageArray
+ echo '
'."\n"; // submenu
+ } // vannak almenük (sub)
+ echo ' '."\n"; // menüpont vége (page)
+ } // for - on pItems
+ } // ha aModule != 'modules'
+ } // foreach on MENU
+ }
+ echo '
'."\n";
+ echo ''."\n";
+
+ // ------------------------
+
+
+
+}
+
+function mayor_breadcrumb() { // TESTING ONLY
+
+ return false;
+ global $MENU,$page;
+ echo '';
+ echo '
';
+ for ($i=0; $i';
+ echo implode(':',$H).' = ';
+ echo ''.$H['txt'].'';
+ echo '';
+ }
+ echo '
';
+ echo '
';
+}
+
+//dump(array_keys($MENU));
+//dump($MENU['modules']);
+ // naplo:orarend:i:[txt,url,refresh,icon]
+ // portal:sub:
+//die();
+
+?>
--
cgit v1.2.3