aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-portal
diff options
context:
space:
mode:
authorM.Gergo2021-05-17 17:50:05 +0200
committerM.Gergo2021-05-17 17:50:05 +0200
commitef8b3fd973fa34b303370d5acc21744e57bca507 (patch)
tree67a42f55b0f36f024c33d8892c1112e8c5746556 /mayor-orig/mayor-portal
parentfb24a50c54d5776468e49def08aea44c4077eb47 (diff)
downloadmayor-rev4787.tar.gz
mayor-rev4787.zip
Rev: 4787rev4787
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/update/rev004716-1.sh10
-rw-r--r--mayor-orig/mayor-portal/www/include/modules/portal/base/rights.php6
-rw-r--r--mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php6
-rw-r--r--mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php4
l---------mayor-orig/mayor-portal/www/policy/private/portal/portal/hir-pre.php1
l---------mayor-orig/mayor-portal/www/policy/private/portal/portal/hir.php1
-rw-r--r--mayor-orig/mayor-portal/www/policy/private/portal/portal/portal-pre.php1
-rw-r--r--mayor-orig/mayor-portal/www/policy/public/portal/portal/hir-pre.php2
-rw-r--r--mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css11
-rw-r--r--mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml35
-rw-r--r--mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/hirek.phtml6
12 files changed, 64 insertions, 21 deletions
diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev
index 7e1fd933..1a48a10f 100644
--- a/mayor-orig/mayor-portal/log/mayor-portal.rev
+++ b/mayor-orig/mayor-portal/log/mayor-portal.rev
@@ -1 +1 @@
-4716
+4787
diff --git a/mayor-orig/mayor-portal/update/rev004716-1.sh b/mayor-orig/mayor-portal/update/rev004716-1.sh
new file mode 100644
index 00000000..d58a4a75
--- /dev/null
+++ b/mayor-orig/mayor-portal/update/rev004716-1.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+BASEDIR="/var/mayor"
+
+DIR="$BASEDIR/download/public/portal/upload/"
+mkdir -p $DIR
+chown -R www-data $DIR
+ln -s $DIR $BASEDIR/www/upload
+echo "$DIR Kész."
+
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 '<script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js" charset="utf-8"></script>';
+// echo '<script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js" charset="utf-8"></script>';
+ echo '<script src="/skin/classic/share/javascript/ckeditor/ckeditor.js" charset="utf-8"></script>';
echo '<table class="egyhirdetail" cellspacing="1">';
echo '<tr><th colspan="3">';
@@ -139,7 +140,7 @@
echo "\n".'<textarea name="txt" id="txt" class="wysiwyg" rows="10" cols="80">'.htmlspecialchars($HIR['txt']).'</textarea>'."\n";
echo '<br/>';
- echo _KEP.': ';
+ echo 'Kép: ';
echo '<input type="text" name="pic" id="pic" size="128" value="'.$HIR['pic'].'" placeholder="https://"/><br/>';
echo '<input type="submit" value="'._ROGZIT.'" />';
echo '<input type="hidden" name="action" value="save" />';
@@ -151,24 +152,38 @@
echo '</div>';
+ 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 '<script type="text/javascript">';
- echo "
- CKEDITOR.replace('txt', {
- uiColor: '#eeeeee',
- entities_latin : false
- });
-";
+ echo "var editor = CKEDITOR.replace('txt',
+ {
+ uiColor: '#eeeeee',
+ entities_latin : false,
+ ".$fileManagerJsConfig."
+ });
+ ";
echo '</script>';
if (__HIREKADMIN===true) {
echo '<hr/>';
echo '<div class="hirCim">'.($HIR['cim']).'</div>';
echo '<div class="hir">'.($HIR['txt']).'</div>';
- for ($j=0; $j<count($ADAT['hirek']['linkek'][$HIR['id']]); $j++) {
+ if (is_array($ADAT['hirek']['linkek'][$HIR['id']])) {
+ for ($j=0; $j<count($ADAT['hirek']['linkek'][$HIR['id']]); $j++) {
echo '<a href="'.$ADAT['hirek']['linkek'][$HIR['id']][$j]['uri'].'">';
//echo $ADAT['hirek']['linkek'][$HIR['id']][$j]['szoveg'];
echo '</a>';
- }
+ }
+ }
echo '<hr/>';
}
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 '<div style="width:100%; color:#eee; text-align:center;margin-top:40px;margin-bottom:40px;"><span style="font-size:120px;" class="icon-eye-close"></span><br/>Nincs aktuális hír</div>';
}
@@ -14,7 +14,7 @@
if ($ADAT['kategoriaId']>0 && $KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']!='') {
echo '<h2 class="hirKategoriaSelected">';
- echo ucfirst($KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']);
+ echo '<span>'.ucfirst($KATEGORIAID2LEIRAS[$ADAT['kategoriaId']][0]['leiras']).' hírek</span>';
echo '<a href="'.href('index.php?page=portal&f=portal&sub=portal').'" class="icon-remove-sign"></a>';
echo '</h2>';
}
@@ -57,6 +57,8 @@
echo $a;
if ($b!="") echo ' <a href="'.href('index.php?page=portal&sub=portal&f=hir&hirId='.$D['id']).'">Tovább...</a>';
echo '</div>';
+
+ if (is_array($ADAT['hirek']['linkek'][$D['id']]))
for ($j=0; $j<count($ADAT['hirek']['linkek'][$D['id']]); $j++) {
echo '<a href="'.$ADAT['hirek']['linkek'][$D['id']][$j]['uri'].'">';
echo $ADAT['hirek']['linkek'][$D['id']][$j]['szoveg'];