init
This commit is contained in:
69
modules/EcmMailingMessages/Save.php
Normal file
69
modules/EcmMailingMessages/Save.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
$json = getJSONobj();
|
||||
require_once('modules/EcmMailingMessages/EcmMailingMessage.php');
|
||||
|
||||
$focus = new EcmMailingMessage();
|
||||
|
||||
if(isset($_POST['record']) && $_POST['record'] != '') {
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
|
||||
}
|
||||
|
||||
foreach($focus->column_fields as $field){
|
||||
|
||||
if(isset($_POST[$field])){
|
||||
|
||||
$value = $_POST[$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach($focus->additional_column_fields as $field){
|
||||
|
||||
if(isset($_POST[$field])){
|
||||
|
||||
$value = $_POST[$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//categories
|
||||
$pll = array();
|
||||
$exp=explode("||||",$_POST['position_list55']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list55'] = $pll;
|
||||
|
||||
|
||||
//categories contacts
|
||||
$pll2 = array();
|
||||
$exp=explode("||||",$_POST['position_list56']);
|
||||
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll2[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list56'] = $pll2;
|
||||
|
||||
$focus->save();
|
||||
$focus->savePositions55($pll);
|
||||
$focus->savePositions56($pll2);
|
||||
|
||||
|
||||
header('Location: index.php?module=EcmMailingMessages&action=DetailView&record='.$focus->id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user