From 5d168373f8d3de040dd0f696f2f783958b1304de Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Thu, 19 Nov 2020 14:20:03 +0100 Subject: Rev: 4710 --- mayor-orig/mayor-portal/log/mayor-portal.rev | 2 +- .../www/include/modules/portal/hirek/egyhir.php | 3 +++ .../www/include/modules/portal/share/hirek.php | 4 +++- .../www/policy/private/portal/portal/portal-pre.php | 8 +++++++- .../www/policy/public/portal/portal/portal-pre.php | 9 ++++++++- .../www/skin/classic/module-portal/css/portal.css | 9 ++++++++- .../skin/classic/module-portal/html/hirek/egyhir.phtml | 2 +- .../classic/module-portal/html/hirek/hirekAdmin.phtml | 2 +- .../skin/classic/module-portal/html/share/hirek.phtml | 18 +++++++++++++++++- .../module-portal/javascript/portal.jquery.min.js | 9 +++++++++ 10 files changed, 58 insertions(+), 8 deletions(-) (limited to 'mayor-orig/mayor-portal') diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev index 9bce5583..de4ba040 100644 --- a/mayor-orig/mayor-portal/log/mayor-portal.rev +++ b/mayor-orig/mayor-portal/log/mayor-portal.rev @@ -1 +1 @@ -4695 +4710 diff --git a/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php b/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php index 1c5c8bc9..652c18ae 100644 --- a/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php +++ b/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php @@ -41,6 +41,9 @@ } } else $q = ''; if ($q!='') $r = db_query($q,array('modul'=>'portal','result'=>'insert','values'=>$v)); + $q = "DELETE FROM `hirKategoria` WHERE hirId=%u"; + $v = array($hirId); + db_query($q,array('modul'=>'portal','result'=>'delete','values'=>$v)); if (is_array($DATA['kategoriaId'])) { for ($i=0; $itrue,'tolDt'=>'', 'igDt'=>'', 'id' => '', 'flag'=>array(), 'class'=>array(), 'cid'=>array(), 'limit'=>'', 'lang'=>'hu_HU') ) { + function getHirek($SET = array('all'=>true,'tolDt'=>'', 'igDt'=>'', 'id' => '', 'flag'=>array(), 'class'=>array(), 'cid'=>array(), 'limit'=>'', 'lang'=>'hu_HU', 'kategoria'=>array()) ) { $tolDt = $SET['tolDt']; $igDt = $SET['igDt']; if ($tolDt!='') $W[] = "kdt<='$tolDt'"; @@ -21,6 +21,8 @@ if (count($SET['flag'])>0) $W[] = "flag IN (".implode(',',$SET['flag']).")"; if (count($SET['class'])>0) $W[] = "class IN (".implode(',',$SET['class']).")"; if (count($SET['cid'])>0) $W[] = "cid IN (".implode(',',$SET['cid']).")"; + if (is_array($SET['kategoria']) && count($SET['kategoria'])>0 && !is_null($SET['kategoria'][0])) + $W[] = "kategoriaId IN (".implode(',',$SET['kategoria']).")"; if ($SET['lang']!='') $W[] = "lang='".$SET['lang']."'"; if ($SET['limit']!='') $L = ' LIMIT '.$SET['limit']; diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/portal/portal-pre.php b/mayor-orig/mayor-portal/www/policy/private/portal/portal/portal-pre.php index dc4e79d5..d8026e35 100644 --- a/mayor-orig/mayor-portal/www/policy/private/portal/portal/portal-pre.php +++ b/mayor-orig/mayor-portal/www/policy/private/portal/portal/portal-pre.php @@ -5,7 +5,13 @@ require_once('include/modules/portal/share/kerdoiv.php'); require_once('include/modules/session/groupInfo.php'); - $ADAT['hirek'] = getHirek(array('cid'=>array(0),'tolDt'=>date('Y-m-d H:i:s'), 'igDt'=>date('Y-m-d H:i:s'),'flag'=>array(1),'class'=>array(1,6),'csoport'=>$AUTH['my']['categories'])); + $ADAT['kategoriak'] = getKategoriak(); + for ($i=0; $iarray($kategoriaId),'cid'=>array(0),'tolDt'=>date('Y-m-d H:i:s'), 'igDt'=>date('Y-m-d H:i:s'),'flag'=>array(1),'class'=>array(1,6),'csoport'=>$AUTH['my']['categories'])); $ADAT['kerdoiv'] = getKerdoiv(_POLICY); $ev=date('Y');$honap=date('m');$nap=date('d'); diff --git a/mayor-orig/mayor-portal/www/policy/public/portal/portal/portal-pre.php b/mayor-orig/mayor-portal/www/policy/public/portal/portal/portal-pre.php index d02f5484..44906949 100644 --- a/mayor-orig/mayor-portal/www/policy/public/portal/portal/portal-pre.php +++ b/mayor-orig/mayor-portal/www/policy/public/portal/portal/portal-pre.php @@ -14,7 +14,14 @@ // $ADAT['nevnap']['ma'] = getNevnap(date('m'),date('d')); // $ADAT['nevnap']['holnap'] = getNevnap(date('m'),date('d')+1); - $FILTER=array('tolDt'=>date('Y-m-d H:i:s'), 'igDt'=>date('Y-m-d H:i:s'),'flag'=>array(1),'class'=>array(1)); + $ADAT['kategoriak'] = getKategoriak(); + for ($i=0; $idate('Y-m-d H:i:s'), 'igDt'=>date('Y-m-d H:i:s'),'flag'=>array(1),'class'=>array(1),'kategoria'=>array($kategoriaId)); if (defined('__PORTAL_RESTRICT_CID')) $FILTER['cid'] = explode(',',__PORTAL_RESTRICT_CID); diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css b/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css index 5152e545..9ea85cbc 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css @@ -68,6 +68,13 @@ div.egyHir span.tag { background-color: #bbb; padding: 0px 4px; margin: 0px 2px; border-radius:2px; color:white;} + div.egyHirmeta a { color: #aaa; border-bottom: dotted 1px #bbb} + div.egyHirmeta a:hover { color: #444; border-bottom: solid 1px #bbb} + + h2.hirKategoriaSelected { text-align: center; padding-left:22px; padding-right:22px; color: #7d96a0 ; text-decoration: underline solid #eee; font-weight:100; letter-spacing:2px; font-size: 24px; font-variant:small-caps} + h2.hirKategoriaSelected a { display:none; color: #d64161; padding-left: 6px; font-size:14px;} + h2.hirKategoriaSelected:hover { padding-right:0px;} + h2.hirKategoriaSelected:hover a { display: inline-block;} div.egyHir:after { clear: both; @@ -87,7 +94,7 @@ hr {display: none;} table.portalMain div.dobozTart a { color: black } - div.static h1 { margin: 20px;} + div.static h1 { margin: 20px; } div.static p { margin-left: 26px; margin-right:26px; margin-bottom: 1.2rem; font-size: 14px; line-height:1.6em;} @media (max-width: 850px) { diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml index f24068ca..e3a31005 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml @@ -57,7 +57,7 @@ } echo ''; } - _putKategoriak($ADAT,$HIR['cid']); + // _putKategoriak($ADAT,$HIR['cid']); echo ''; echo ''; diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml index 1f55154a..a995e638 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml @@ -40,7 +40,7 @@ $FLAGS = array(0=>'nem látszik', 1=>'látszik', 2=>2, 3=>3); $now = time(); echo ''; - echo ''."\n"; + echo ''."\n"; for ($i=0; $i0 && $KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']!='') { + echo '

'; + echo ucfirst($KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']); + echo ''; + echo '

'; + } + for ($i=0; $i'.$CSOPORT[$j].''; //echo ''; } - + if ($D['hirkategoriak']!='') { + $D['kategoriaIdk'] = explode(',',$D['hirkategoriak']); + for ($j=0; $j'.$KATEGORIAID2LEIRAS[$D['kategoriaIdk'][$j]][0]['leiras'].''; + } + } echo ''; } echo '
'; diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js b/mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js index 41d70923..55364674 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js @@ -23,6 +23,15 @@ $(function() { }); }); + $('#kategoriaSelectorContainer').html(''); + $('span.kategoriaSelector.selected').each(function() { + $('', { + type: 'hidden', + name: 'kategoriaId[]', + value: $(this).data('kategoriaid') + }).appendTo($('#kategoriaSelectorContainer')); + }); + /* myForm.on('submit', function(e) { -- cgit v1.2.3