aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-portal
diff options
context:
space:
mode:
authorM.Gergo2020-11-19 14:20:03 +0100
committerM.Gergo2020-11-19 14:20:03 +0100
commit5d168373f8d3de040dd0f696f2f783958b1304de (patch)
treeba509bd157776b62f5c82d8de74bda73f4ec196f /mayor-orig/mayor-portal
parentc279e479aa9c943fd0fc2b396638a5208c78cfb9 (diff)
downloadmayor-5d168373f8d3de040dd0f696f2f783958b1304de.tar.gz
mayor-5d168373f8d3de040dd0f696f2f783958b1304de.zip
Rev: 4710rev4710
Diffstat (limited to 'mayor-orig/mayor-portal')
-rw-r--r--mayor-orig/mayor-portal/log/mayor-portal.rev2
-rw-r--r--mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php3
-rw-r--r--mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php4
-rw-r--r--mayor-orig/mayor-portal/www/policy/private/portal/portal/portal-pre.php8
-rw-r--r--mayor-orig/mayor-portal/www/policy/public/portal/portal/portal-pre.php9
-rw-r--r--mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css9
-rw-r--r--mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml2
-rw-r--r--mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml2
-rw-r--r--mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/hirek.phtml18
-rw-r--r--mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js9
10 files changed, 58 insertions, 8 deletions
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; $i<count($DATA['kategoriaId']); $i++) {
$q = "INSERT IGNORE INTO `hirKategoria` (hirId,kategoriaId) VALUES (%u,%u)";
diff --git a/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php b/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php
index 0de316b6..7b59782a 100644
--- a/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php
+++ b/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php
@@ -13,7 +13,7 @@
return $r;
}
- function getHirek($SET = array('all'=>true,'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; $i<count($ADAT['kategoriak']); $i++) {
+ $RESTRICTKATEGORIA[] = intval($ADAT['kategoriak'][$i]['id']);
+ }
+ $kategoriaId = readVariable($_GET['kategoriaId'],'id',null,$RESTRICTKATEGORIA);
+ $ADAT['kategoriaId'] = $kategoriaId;
+ $ADAT['hirek'] = getHirek(array('kategoria'=>array($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; $i<count($ADAT['kategoriak']); $i++) {
+ $RESTRICTKATEGORIA[] = intval($ADAT['kategoriak'][$i]['id']);
+ }
+ $kategoriaId = readVariable($_GET['kategoriaId'],'id',null,$RESTRICTKATEGORIA);
+ $ADAT['kategoriaId'] = $kategoriaId;
+
+ $FILTER=array('tolDt'=>date('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 '</select>';
}
- _putKategoriak($ADAT,$HIR['cid']);
+ // _putKategoriak($ADAT,$HIR['cid']);
echo '</td>';
echo '<td style="line-height:2em; max-width: 300px">';
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 '<table class="hAdmin hideShowContainer" align="center" cellspacing="1">';
- echo '<tr><td colspan="7"><button type="button" class="onClickHideShow">Mindent mutass!</button></td></tr>'."\n";
+ echo '<tr><th colspan="7"><button type="button" class="onClickHideShow"> + Mindent mutass! + </button></th></tr>'."\n";
for ($i=0; $i<count($ADAT['szovegek']); $i++) {
$D = $ADAT['szovegek'][$i];
if ($D['class']==0) $_class='class="unk"'; else
diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/hirek.phtml b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/hirek.phtml
index 37812ac0..5a1c26b5 100644
--- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/hirek.phtml
+++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/hirek.phtml
@@ -9,6 +9,16 @@
}
} else {
+
+ $KATEGORIAID2LEIRAS = (reindex($ADAT['kategoriak'],array('id')));
+
+ if ($ADAT['kategoriaId']>0 && $KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']!='') {
+ echo '<h2 class="hirKategoriaSelected">';
+ echo ucfirst($KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']);
+ echo '<a href="'.href('index.php?page=portal&f=portal&sub=portal').'" class="icon-remove-sign"></a>';
+ echo '</h2>';
+ }
+
for ($i=0; $i<count($ADAT['hirek']['szovegek']); $i++) {
$D = $ADAT['hirek']['szovegek'][$i];
@@ -34,7 +44,13 @@
for ($j=0; $j<count($CSOPORT); $j++) echo '<span class="tag">'.$CSOPORT[$j].'</span>';
//echo '</span>';
}
-
+ if ($D['hirkategoriak']!='') {
+ $D['kategoriaIdk'] = explode(',',$D['hirkategoriak']);
+ for ($j=0; $j<count($D['kategoriaIdk']); $j++ ) {
+ echo ' · ';
+ echo '<a href="'.href('index.php?page=portal&sub=portal&f=portal&kategoriaId='.$D['kategoriaIdk'][$j]).'" class="hirkategoriaLeiras">'.$KATEGORIAID2LEIRAS[$D['kategoriaIdk'][$j]][0]['leiras'].'</a>';
+ }
+ }
echo '</div>';
}
echo '<div class="hir">';
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() {
+ $('<input />', {
+ type: 'hidden',
+ name: 'kategoriaId[]',
+ value: $(this).data('kategoriaid')
+ }).appendTo($('#kategoriaSelectorContainer'));
+ });
+
/*
myForm.on('submit', function(e) {