From ef8b3fd973fa34b303370d5acc21744e57bca507 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Mon, 17 May 2021 17:50:05 +0200 Subject: Rev: 4787 --- .../www/include/modules/portal/base/rights.php | 6 ++-- .../www/include/modules/portal/share/hirek.php | 6 ++-- .../www/policy/private/portal/hirek/egyhir-pre.php | 4 +++ .../www/policy/private/portal/portal/hir-pre.php | 1 + .../www/policy/private/portal/portal/hir.php | 1 + .../policy/private/portal/portal/portal-pre.php | 1 + .../www/policy/public/portal/portal/hir-pre.php | 2 +- .../www/skin/classic/module-portal/css/portal.css | 11 +++++-- .../classic/module-portal/html/hirek/egyhir.phtml | 35 +++++++++++++++------- .../classic/module-portal/html/share/hirek.phtml | 6 ++-- 10 files changed, 53 insertions(+), 20 deletions(-) create mode 120000 mayor-orig/mayor-portal/www/policy/private/portal/portal/hir-pre.php create mode 120000 mayor-orig/mayor-portal/www/policy/private/portal/portal/hir.php (limited to 'mayor-orig/mayor-portal/www') diff --git a/mayor-orig/mayor-portal/www/include/modules/portal/base/rights.php b/mayor-orig/mayor-portal/www/include/modules/portal/base/rights.php index c1a5c039..2008eecf 100644 --- a/mayor-orig/mayor-portal/www/include/modules/portal/base/rights.php +++ b/mayor-orig/mayor-portal/www/include/modules/portal/base/rights.php @@ -2,9 +2,11 @@ if (_POLICY=='private' && @memberOf(_USERACCOUNT, 'hirekadmin')) { $AUTH['my']['categories'][] = 'hirekadmin'; - define('__HIREKADMIN',true); + define('__HIREKADMIN', true); + define('_FILEMANAGER_ENABLED', true); } else { - define('__HIREKADMIN',false); + define('__HIREKADMIN', false); + define('_FILEMANAGER_ENABLED', false); } ?> 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 7b59782a..08b5ee63 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 @@ -18,9 +18,9 @@ $tolDt = $SET['tolDt']; $igDt = $SET['igDt']; if ($tolDt!='') $W[] = "kdt<='$tolDt'"; if ($igDt!='') $W[] = "vdt>='$igDt'"; - 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['flag']) && count($SET['flag'])>0) $W[] = "flag IN (".implode(',',$SET['flag']).")"; + if (is_array($SET['class']) && count($SET['class'])>0) $W[] = "class IN (".implode(',',$SET['class']).")"; + if (is_array($SET['cid']) && 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']."'"; diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php index ef18e58c..14d3040a 100644 --- a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php +++ b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php @@ -10,6 +10,10 @@ if (_RIGHTS_OK !== true) die(); // $_SESSION['alert'][] = 'page:not_owner'; // } + if (__HIREKADMIN===true) { + $_SESSION['mayorPortalSalt']=rand(); + } + if ($action=='save' && (__HIREKADMIN || $hirId=='' || isOwner($hirId))) { global $LANGUAGES; if (__HIREKADMIN === true) { diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/portal/hir-pre.php b/mayor-orig/mayor-portal/www/policy/private/portal/portal/hir-pre.php new file mode 120000 index 00000000..6def6ce4 --- /dev/null +++ b/mayor-orig/mayor-portal/www/policy/private/portal/portal/hir-pre.php @@ -0,0 +1 @@ +../../../../policy/public/portal/portal/hir-pre.php \ No newline at end of file diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/portal/hir.php b/mayor-orig/mayor-portal/www/policy/private/portal/portal/hir.php new file mode 120000 index 00000000..c3dfc7ca --- /dev/null +++ b/mayor-orig/mayor-portal/www/policy/private/portal/portal/hir.php @@ -0,0 +1 @@ +../../../../policy/public/portal/portal/hir.php \ No newline at end of file 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 d8026e35..af1e3078 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 @@ -20,6 +20,7 @@ $ADAT['nevnap']['ma'] = getNevnap($honap,$nap); $ADAT['nevnap']['holnap'] = getNevnap($honap,$nap+1); + define('_ACCESS_AS', _OTHER_ACCESS); if (in_array($AUTH[_POLICY]['backend'],array('mysql','ads')) && _POLICY=='private') { $ADAT['hirekAdmin'] = getGroupInfo('hirekadmin','private',array('withNewAccounts' => false)); $ADAT['vezetoseg'] = getGroupInfo('vezetoseg','private',array('withNewAccounts' => false)); diff --git a/mayor-orig/mayor-portal/www/policy/public/portal/portal/hir-pre.php b/mayor-orig/mayor-portal/www/policy/public/portal/portal/hir-pre.php index 7e88f0f3..e48767d4 100644 --- a/mayor-orig/mayor-portal/www/policy/public/portal/portal/hir-pre.php +++ b/mayor-orig/mayor-portal/www/policy/public/portal/portal/hir-pre.php @@ -2,7 +2,7 @@ global $OG; require_once('include/modules/portal/share/hirek.php'); - $hirId = readVariable($_GET['hirId'],id); + $hirId = readVariable($_GET['hirId'],'id'); if ($hirId>=1) { if (_POLICY=='private') $FILTER=array('id'=>$hirId); 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 9ea85cbc..d3556590 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 @@ -71,10 +71,17 @@ 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 { text-align: center; padding-left:22px; padding-right:22px; +/*color: lightred;*/ +/*text-decoration: underline solid #eee; */ +font-weight:100; letter-spacing:2px; font-size: 24px; font-variant:small-caps; +} + + h2.hirKategoriaSelected span { background-color: #ffdb03; color: #154733; padding-left:4px; padding-right:4px; border-bottom: solid 1px #154733;} h2.hirKategoriaSelected a { display:none; color: #d64161; padding-left: 6px; font-size:14px;} - h2.hirKategoriaSelected:hover { padding-right:0px;} + h2.hirKategoriaSelected:hover { padding-right:0px; } h2.hirKategoriaSelected:hover a { display: inline-block;} + h2.hirKategoriaSelected:hover a:hover { color: darkred;} div.egyHir:after { clear: both; 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 e3a31005..3f71ade1 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 @@ -27,7 +27,8 @@ formBegin(); if (__HIREKADMIN===true) { - echo ''; +// echo ''; + echo ''; echo '
';
@@ -139,7 +140,7 @@
echo "\n".''."\n";
echo ' '; - echo _KEP.': '; + echo 'Kép: '; echo ' '; echo ''; echo ''; @@ -151,24 +152,38 @@ echo ''; + if (_FILEMANAGER_ENABLED===true) { + $fileManagerJsConfig = " + filemanager_access_key : '".$_SESSION['mayorPortalSalt']."', + filebrowserBrowseUrl : '/skin/classic/share/javascript/filemanager/filemanager/dialog.php?type=2&editor=ckeditor&fldr=&akey=".$_SESSION['mayorPortalSalt']."', + filebrowserUploadUrl : '/skin/classic/share/javascript/filemanager/filemanager/dialog.php?type=2&editor=ckeditor&fldr=&akey=".$_SESSION['mayorPortalSalt']."', + filebrowserImageBrowseUrl : '/skin/classic/share/javascript/filemanager/filemanager/dialog.php?type=1&editor=ckeditor&fldr=&akey=".$_SESSION['mayorPortalSalt']."' + "; + } else { + $fileManagerJsConfig = ''; + } + echo ''; if (__HIREKADMIN===true) { echo ' '; echo ' '.($HIR['cim']).' ';
echo ''.($HIR['txt']).' ';
- for ($j=0; $j'; } 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 5a1c26b5..5964369b 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 @@ -4,7 +4,7 @@ if (count($ADAT['hirek']['szovegek'])==0) { - if (_POLICY=='public') { + if (_POLICY=='public' || _POLICY == 'private') { echo ' Nincs aktuális hír '; - echo ucfirst($KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']); + echo ''.ucfirst($KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']).' hírek'; echo ''; echo ''; } @@ -57,6 +57,8 @@ echo $a; if ($b!="") echo ' Tovább...'; echo ''; + + if (is_array($ADAT['hirek']['linkek'][$D['id']])) for ($j=0; $j |
---|