mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 19:29:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6548 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1c6421c5c2
commit
d41a5a8b5f
3 changed files with 39 additions and 3 deletions
|
|
@ -5,11 +5,10 @@
|
|||
<actions>
|
||||
<action name="dispFileAdminList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispFileAdminConfig" type="view" standalone="true" />
|
||||
|
||||
<action name="getFileList" type="model" standalone="true" />
|
||||
|
||||
<action name="procFileUpload" type="controller" standalone="true" />
|
||||
<action name="procFileIframeUpload" type="controller" standalone="true" />
|
||||
<action name="procFileImageResize" type="controller" standalone="true" />
|
||||
<action name="procFileDelete" type="controller" standalone="true" />
|
||||
<action name="procFileDownload" type="controller" standalone="true" />
|
||||
<action name="procFileAdminDeleteChecked" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -57,6 +57,11 @@
|
|||
// 업로드 권한이 없거나 정보가 없을시 종료
|
||||
if(!$_SESSION['upload_info'][$editor_sequence]->enabled) exit();
|
||||
|
||||
$file_srl = Context::get('file_srl');
|
||||
if($file_srl){
|
||||
$this->deleteFile($file_srl);
|
||||
}
|
||||
|
||||
// upload_target_srl 구함
|
||||
$upload_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||
if(!$upload_target_srl) {
|
||||
|
|
@ -81,6 +86,33 @@
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief image resize
|
||||
**/
|
||||
function procFileImageResize() {
|
||||
$source_src = Context::get('source_src');
|
||||
$width = Context::get('width');
|
||||
$height = Context::get('height');
|
||||
$type = Context::get('type');
|
||||
$output_src = Context::get('output_src');
|
||||
|
||||
if(!$source_src || !$width) return new Object(-1,'msg_invalid_request');
|
||||
if(!$output_src){
|
||||
$output_src = $source_src . '.resized' . strrchr($source_src,'.');
|
||||
}
|
||||
if(!$type) $type = 'ratio';
|
||||
if(!$height) $height = $width-1;
|
||||
|
||||
if(FileHandler::createImageFile($source_src,$output_src,$width,$height,'','ratio')){
|
||||
$output->info = getimagesize($output_src);
|
||||
$output->src = $output_src;
|
||||
}else{
|
||||
return new Object(-1,'msg_invalid_request');
|
||||
}
|
||||
|
||||
$this->add('resized_info',$output);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<script type="text/javascript">//<<;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue