git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6548 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
ngleader 2009-06-15 08:11:10 +00:00
parent 1c6421c5c2
commit d41a5a8b5f
3 changed files with 39 additions and 3 deletions

View file

@ -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);
}
/**