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

This commit is contained in:
zero 2007-06-04 06:00:47 +00:00
parent 86e8af5b3f
commit f2e47e336d
37 changed files with 27 additions and 3019 deletions

View file

@ -184,23 +184,6 @@
return $output;
}
/**
* @brief 특정 모두의 첨부파일 모두 삭제
**/
function deleteModuleFiles($module_srl) {
$args->module_srl = $module_srl;
$output = executeQuery('file.deleteModuleFiles', $args);
if(!$output->toBool()) return $output;
// 실제 파일 삭제
$path[0] = sprintf("./files/attach/images/%s/", $module_srl);
$path[1] = sprintf("./files/attach/binaries/%s/", $module_srl);
FileHandler::removeDir($path[0]);
FileHandler::removeDir($path[1]);
return $output;
}
/**
* @brief 특정 글의 첨부파일을 다른 글로 이동
**/
@ -294,28 +277,6 @@
$this->setTemplateFile('print_uploaded_file_list');
}
/**
* @brief 관리자 페이지에서 선택된 파일들을 삭제
**/
function procFileAdminDeleteChecked() {
// 선택된 글이 없으면 오류 표시
$cart = Context::get('cart');
if(!$cart) return $this->stop('msg_cart_is_null');
$file_srl_list= explode('|@|', $cart);
$file_count = count($file_srl_list);
if(!$file_count) return $this->stop('msg_cart_is_null');
// 글삭제
for($i=0;$i<$file_count;$i++) {
$file_srl = trim($file_srl_list[$i]);
if(!$file_srl) continue;
$this->deleteFile($file_srl);
}
$this->setMessage( sprintf(Context::getLang('msg_checked_file_is_deleted'), $file_count) );
}
/**
* @brief 첨부파일 다운로드
* 직접 요청을 받음
@ -361,18 +322,5 @@
fpassthru($fp);
}
/**
* @brief 파일 기본 정보의 추가
**/
function procFileAdminInsertConfig() {
// 기본 정보를 받음
$args = Context::gets('allowed_filesize','allowed_attach_size','allowed_filetypes');
// module Controller 객체 생성하여 입력
$oModuleController = &getController('module');
$output = $oModuleController->insertModuleConfig('file',$args);
return $output;
}
}
?>

View file

@ -79,59 +79,5 @@
return $file_list;
}
/**
* @brief 모든 첨부파일을 시간 역순으로 가져옴 (관리자용)
**/
function getFileList($obj) {
// 검색 옵션 정리
$search_target = trim(Context::get('search_target'));
$search_keyword = trim(Context::get('search_keyword'));
if($search_target && $search_keyword) {
switch($search_target) {
case 'filename' :
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
$args->s_filename = $search_keyword;
break;
case 'filesize' :
$args->s_filesize = (int)$search_keyword;
break;
case 'download_count' :
$args->s_download_count = (int)$search_keyword;
break;
case 'regdate' :
$args->s_regdate = $search_keyword;
break;
case 'ipaddress' :
$args->s_ipaddress= $search_keyword;
break;
}
}
// 유효/대기 상태 설정
if($obj->isvalid == 'Y') $args->isvalid = 'Y';
elseif($obj->isvalid == 'N') $args->isvalid = 'N';
// 변수 설정
$args->sort_index = $obj->sort_index;
$args->page = $obj->page?$obj->page:1;
$args->list_count = $obj->list_count?$obj->list_count:20;
$args->page_count = $obj->page_count?$obj->page_count:10;
// file.getFileList쿼리 실행
$output = executeQuery('file.getFileList', $args);
// 결과가 없거나 오류 발생시 그냥 return
if(!$output->toBool()||!count($output->data)) return $output;
foreach($output->data as $key => $file) {
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
$output->data[$key] = $file;
}
return $output;
}
}
?>