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