52 lines
956 B
PHP
52 lines
956 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
|
||
|
|
require_once('modules/EcmMailingCategories/EcmMailingCategory.php');
|
||
|
|
require_once('include/Upload.php');
|
||
|
|
|
||
|
|
$focus = new EcmMailingCategory();
|
||
|
|
|
||
|
|
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;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
if($_FILES['assigned_file']['name']){
|
||
|
|
$_POST['assigned_file']=upload_file("assigned_file","modules/EcmMailingCategories/files/");
|
||
|
|
chmod("modules/EcmMailingCategories/files/".$_POST['assigned_file'],0777);
|
||
|
|
|
||
|
|
$focus->assigned_file = $_POST['assigned_file'];
|
||
|
|
}
|
||
|
|
|
||
|
|
$focus->save();
|
||
|
|
|
||
|
|
|
||
|
|
header('Location: index.php?module=EcmMailingCategories&action=DetailView&record='.$focus->id);
|
||
|
|
|
||
|
|
|