28 $config =
$oModuleModel->getModuleConfig(
'integration_search');
34 if(!
$args->target_module_srl)
$args->target_module_srl =
'';
35 $args->skin_vars = $config->skin_vars;
53 $config =
$oModuleModel->getModuleConfig(
'integration_search');
56 $args->skin = $config->skin;
57 $args->target_module_srl = $config->target_module_srl;
59 $skin_info =
$oModuleModel->loadSkinInfo($this->module_path, $config->skin);
63 unset(
$obj->module_srl);
66 if($skin_info->extra_vars)
68 foreach($skin_info->extra_vars as $vars)
70 if($vars->type!=
'image')
continue;
72 $image_obj =
$obj->{$vars->name};
74 $del_var =
$obj->{
"del_".$vars->name};
75 unset(
$obj->{
"del_".$vars->name});
82 if(!$image_obj[
'tmp_name'])
88 if(!is_uploaded_file($image_obj[
'tmp_name']) || !
checkUploadedFile($image_obj[
'tmp_name']))
90 unset(
$obj->{$vars->name});
94 if(!preg_match(
"/\.(jpg|jpeg|gif|png)$/i", $image_obj[
'name']))
96 unset(
$obj->{$vars->name});
100 $path = sprintf(
"./files/attach/images/%s/",
$module_srl);
104 $filename = $path.$image_obj[
'name'];
106 if(!move_uploaded_file($image_obj[
'tmp_name'], $filename))
108 unset(
$obj->{$vars->name});
112 unset(
$obj->{$vars->name});
113 $obj->{$vars->name} = $filename;
122 $this->setMessage(
'success_updated',
'info');
125 return $this->setRedirectUrl($returnUrl,
$output);
getController($module_name)
procIntegration_searchAdminInsertSkin()
procIntegration_searchAdminInsertConfig()
$module_info
an object containing the module information
setRedirectUrl($url= './', $output=NULL)