25 $args =
new stdClass();
27 $args->list_count = 30;
28 $args->page_count = 10;
30 $args->sort_index =
'file_srl';
35 $columnList = array(
'file_srl',
'upload_target_srl',
'upload_target_type',
'sid',
'module_srl'
36 ,
'source_filename',
'isvalid',
'file_size',
'download_count',
'files.regdate',
'ipaddress',
'member.member_srl',
'member.nick_name',
'uploaded_filename');
37 $output = $oFileAdminModel->getFileList(
$args, $columnList);
41 $oCommentModel =
getModel(
'comment');
46 $document_list = array();
47 $comment_list = array();
48 $module_list= array();
56 $file_srl = $file->file_srl;
57 $target_srl = $file->upload_target_srl;
58 $file_update_args =
new stdClass();
59 $file_update_args->file_srl = $file_srl;
61 if(!$file->upload_target_type)
64 if($document_list[$target_srl])
66 $file->upload_target_type =
'doc';
68 else if($comment_list[$target_srl])
70 $file->upload_target_type =
'com';
72 else if($module_list[$target_srl])
74 $file->upload_target_type =
'mod';
80 if($document->isExists())
82 $file->upload_target_type =
'doc';
83 $file_update_args->upload_target_type = $file->upload_target_type;
84 $document_list[$target_srl] = $document;
87 if(!$file->upload_target_type)
89 $comment = $oCommentModel->getComment($target_srl);
90 if($comment->isExists())
92 $file->upload_target_type =
'com';
93 $file->target_document_srl = $comment->document_srl;
94 $file_update_args->upload_target_type = $file->upload_target_type;
95 $comment_list[$target_srl] = $comment;
96 $doc_srls[] = $comment->document_srl;
100 if(!$file->upload_target_type)
105 $file->upload_target_type =
'mod';
106 $file_update_args->upload_target_type = $file->upload_target_type;
110 if($file_update_args->upload_target_type)
112 executeQuery(
'file.updateFileTargetType', $file_update_args);
116 for($i = 0; $i < $com_srls_count; ++$i)
118 if($comment_list[$com_srls[$i]])
delete($com_srls[$i]);
120 for($i = 0; $i < $doc_srls_count; ++$i)
122 if($document_list[$doc_srls[$i]])
delete($doc_srls[$i]);
124 for($i = 0; $i < $mod_srls_count; ++$i)
126 if($module_list[$mod_srls[$i]])
delete($mod_srls[$i]);
130 if($file->upload_target_type)
132 if(!in_array($file->upload_target_srl, ${$file->upload_target_type.
'_srls'}))
134 ${$file->upload_target_type.
'_srls'}[] = $target_srl;
138 $file_list[$file_srl] = $file;
139 $mod_srls[] = $file->module_srl;
142 $doc_srls = array_unique($doc_srls);
143 $com_srls = array_unique($com_srls);
144 $mod_srls = array_unique($mod_srls);
146 $com_srls_count = count($com_srls);
149 $comment_output = $oCommentModel->getComments($com_srls);
150 foreach($comment_output as $comment)
152 $comment_list[$comment->comment_srl] = $comment;
153 $doc_srls[] = $comment->document_srl;
157 $doc_srls_count = count($doc_srls);
161 if(is_array($document_output))
163 foreach($document_output as $document)
165 $document_list[$document->document_srl] = $document;
170 $mod_srls_count = count($mod_srls);
173 $columnList = array(
'module_srl',
'mid',
'browser_title');
174 $module_output =
$oModuleModel->getModulesInfo($mod_srls, $columnList);
175 if($module_output && is_array($module_output))
177 foreach($module_output as
$module)
179 $module_list[$module->module_srl] =
$module;
184 foreach($file_list as $srl => $file)
186 if($file->upload_target_type ==
'com')
188 $file_list[$srl]->target_document_srl = $comment_list[$file->upload_target_srl]->document_srl;
203 $security->encodeHTML(
'file_list..');
204 $security->encodeHTML(
'module_list..');
205 $security->encodeHTML(
'search_target',
'search_keyword');
219 $config = $oFileModel->getFileConfig();
221 $iniPostMaxSize = FileHandler::returnbytes(ini_get(
'post_max_size'));
222 $iniUploadMaxSize = FileHandler::returnbytes(ini_get(
'upload_max_filesize'));
223 $iniMinSize = min($iniPostMaxSize, $iniUploadMaxSize);
226 $this->setTemplatePath($this->module_path.
'tpl');
227 $this->setTemplateFile(
'adminConfig');
setTemplateFile($filename)
set($key, $val, $set_to_get_vars=0)
getAdminModel($module_name)
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
$module
Class name of Xe Module that is identified by mid.