aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-portal/www/policy
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/mayor-portal/www/policy')
-rw-r--r--mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php1
-rw-r--r--mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php35
-rw-r--r--mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php6
3 files changed, 39 insertions, 3 deletions
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 0d5cbf71..ef18e58c 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
@@ -26,6 +26,7 @@ if (_RIGHTS_OK !== true) die();
$DATA['flag']= readVariable($_POST['flag'],'numeric',null);
$DATA['class']= readVariable($_POST['class'],'numeric',null);
$DATA['cid']= readVariable($_POST['cid'],'numeric',null);
+ $DATA['kategoriaId']= readVariable($_POST['kategoriaId'],'id',null);
$DATA['lang'] = readVariable($_POST['lang'],'strictstring',$LANGUAGES);
$DATA['owner'] = _USERACCOUNT;
if (is_array($_POST['csoport'])) {
diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php
index 630c9cbd..1e51b811 100644
--- a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php
+++ b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php
@@ -6,6 +6,39 @@
}
require_once('include/modules/portal/share/hirek.php');
- $HIREK = getHirek(array('all'=>true)); // minden nyelvű hír
+ if ($action=='kategoriaSzerkeszt') {
+ $_id = readVariable($_POST['id'],'id');
+ if (is_numeric($_id)) {
+ $_leiras = readVariable($_POST['leiras'],'string');
+ $_precode = readVariable($_POST['precode'],'html');
+ $_postcode = readVariable($_POST['postcode'],'html');
+ $q = "INSERT INTO kategoriak (id,leiras,precode,postcode) VALUES (%u,'%s','%s','%s')";
+ $v = array($_id,$_leiras,$_precode,$_postcode);
+ db_query($q,array('modul'=>'portal','values'=>$v));
+ }
+ $KATEGORIAIDK = readVariable($_POST['kategoriaId'],'id');
+ for ($i=0; $i<count($KATEGORIAIDK); $i++) {
+ $_id = $KATEGORIAIDK[$i];
+ $_leiras = readVariable($_POST['leiras_'.$_id],'string');
+ $_precode = readVariable($_POST['precode_'.$_id],'string');
+ $_postcode = readVariable($_POST['postcode_'.$_id],'string');
+ $q = "UPDATE kategoriak SET leiras='%s',precode='%s',postcode='%s' WHERE id=%u";
+ $v = array($_leiras,$_precode,$_postcode,$_id);
+ db_query($q,array('modul'=>'portal','values'=>$v));
+ }
+ $KATEGORIAIDK = readVariable($_POST['kategoriaTorlendo'],'id');
+ for ($i=0; $i<count($KATEGORIAIDK); $i++) {
+ $_id = $KATEGORIAIDK[$i];
+ $q = "DELETE FROM kategoriak WHERE id=%u";
+ $v = array($_id);
+ db_query($q,array('modul'=>'portal','values'=>$v));
+ }
+ }
+
+
+ $ADAT = getHirek(array('all'=>true)); // minden nyelvű hír
+ $ADAT['kategoriak'] = getKategoriak();
+ $ADAT['kategoriaId2txt'] = reindex($ADAT['kategoriak'],array('id'));
+dump($ADAT['kategoriaId2txt']);
?>
diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php
index 2474b23e..909018dc 100644
--- a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php
+++ b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php
@@ -1,5 +1,7 @@
<?php
- global $HIREK;
- putHirek($HIREK['szovegek']);
+ global $ADAT;
+
+ putKategoriaSzerkeszto($ADAT['kategoriak']);
+ putHirek($ADAT);
?>