31 function getDocuments($target, $module_srls_list, $search_target, $search_keyword, $page=1, $list_count = 20)
33 if(is_array($module_srls_list)) $module_srls_list = implode(
',',$module_srls_list);
35 $args =
new stdClass();
36 if($target ==
'exclude')
38 $module_srls_list .=
',0';
39 if ($module_srls_list{0} ==
',') $module_srls_list = substr($module_srls_list, 1);
40 $args->exclude_module_srl = $module_srls_list;
44 $args->module_srl = $module_srls_list;
45 $args->exclude_module_srl =
'0';
49 $args->list_count = $list_count;
50 $args->page_count = 10;
51 $args->search_target = $search_target;
52 $args->search_keyword = $search_keyword;
53 $args->sort_index =
'list_order';
54 $args->order_type =
'asc';
55 $args->statusList = array(
'PUBLIC');
56 if(!
$args->module_srl) unset(
$args->module_srl);
74 function getComments($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20)
76 $args =
new stdClass();
78 if(is_array($module_srls_list))
80 if (count($module_srls_list) > 0) $module_srls = implode(
',',$module_srls_list);
86 $module_srls = $module_srls_list;
89 if($target ==
'exclude')
$args->exclude_module_srl = $module_srls;
90 else $args->module_srl = $module_srls;
93 $args->list_count = $list_count;
94 $args->page_count = 10;
95 $args->search_target =
'content';
96 $args->search_keyword = $search_keyword;
97 $args->sort_index =
'list_order';
98 $args->order_type =
'asc';
100 $oCommentModel =
getModel(
'comment');
118 function getTrackbacks($target, $module_srls_list, $search_target =
"title", $search_keyword, $page=1, $list_count = 20)
121 if(!$oTrackbackModel)
return new BaseObject();
122 $args =
new stdClass();
124 if(is_array($module_srls_list)) $module_srls = implode(
',',$module_srls_list);
125 else $module_srls = $module_srls_list;
126 if($target ==
'exclude')
$args->exclude_module_srl = $module_srls;
127 else $args->module_srl = $module_srls;
129 $args->list_count = $list_count;
130 $args->page_count = 10;
131 $args->search_target = $search_target;
132 $args->search_keyword = $search_keyword;
133 $args->sort_index =
'list_order';
134 $args->order_type =
'asc';
136 $output = $oTrackbackModel->getTotalTrackbackList(
$args);
153 function _getFiles($target, $module_srls_list, $search_keyword, $page, $list_count, $direct_download =
'Y')
155 $args =
new stdClass();
157 if(is_array($module_srls_list)) $module_srls = implode(
',',$module_srls_list);
158 else $module_srls = $module_srls_list;
159 if($target ==
'exclude')
$args->exclude_module_srl = $module_srls;
160 else $args->module_srl = $module_srls;
162 $args->list_count = $list_count;
163 $args->page_count = 10;
164 $args->search_target =
'filename';
165 $args->search_keyword = $search_keyword;
166 $args->sort_index =
'files.file_srl';
167 $args->order_type =
'desc';
168 $args->isvalid =
'Y';
169 $args->direct_download = $direct_download==
'Y'?
'Y':
'N';
176 foreach(
$output->data as $key => $val)
179 $obj->filename = $val->source_filename;
180 $obj->download_count = $val->download_count;
181 if(substr($val->download_url,0,2)==
'./') $val->download_url = substr($val->download_url,2);
183 $obj->target_srl = $val->upload_target_srl;
184 $obj->file_size = $val->file_size;
186 if(preg_match(
'/\.(jpg|jpeg|gif|png)$/i', $val->source_filename))
188 $obj->type =
'image';
190 $thumbnail_path = sprintf(
'files/thumbnails/%s',
getNumberingPath($val->file_srl, 3));
192 $thumbnail_file = sprintf(
'%s%dx%d.%s.jpg', $thumbnail_path, 120, 120,
'crop');
195 $obj->src = sprintf(
'<img src="%s" alt="%s" width="%d" height="%d" />', $thumbnail_url, htmlspecialchars(
$obj->filename, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false), 120, 120);
199 $obj->type =
'binary';
204 $target_list[] = $val->upload_target_srl;
210 if($document_list)
foreach($document_list as $key => $val)
212 foreach(
$output->data as $k => $v)
214 if($v->target_srl== $val->document_srl)
216 $output->data[$k]->url = $val->getPermanentUrl();
217 $output->data[$k]->regdate = $val->getRegdate(
"Y-m-d H:i");
218 $output->data[$k]->nick_name = $val->getNickName();
223 $oCommentModel =
getModel(
'comment');
224 $comment_list = $oCommentModel->getComments($target_list);
225 if($comment_list)
foreach($comment_list as $key => $val)
227 foreach(
$output->data as $k => $v)
229 if($v->target_srl== $val->comment_srl)
231 $output->data[$k]->url = $val->getPermanentUrl();
232 $output->data[$k]->regdate = $val->getRegdate(
"Y-m-d H:i");
233 $output->data[$k]->nick_name = $val->getNickName();
252 function getImages($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20)
254 return $this->
_getFiles($target, $module_srls_list, $search_keyword, $page, $list_count);
268 function getFiles($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20)
270 return $this->
_getFiles($target, $module_srls_list, $search_keyword, $page, $list_count,
'N');
getNumberingPath($no, $size=3)
getTrackbacks($target, $module_srls_list, $search_target="title", $search_keyword, $page=1, $list_count=20)
getDocuments($target, $module_srls_list, $search_target, $search_keyword, $page=1, $list_count=20)
_getFiles($target, $module_srls_list, $search_keyword, $page, $list_count, $direct_download= 'Y')
getAdminModel($module_name)
getComments($target, $module_srls_list, $search_keyword, $page=1, $list_count=20)
createImageFile($source_file, $target_file, $resize_width=0, $resize_height=0, $target_type= '', $thumbnail_type= 'crop', $thumbnail_transparent=FALSE)
getRequestUri($ssl_mode=FOLLOW_REQUEST_SSL, $domain=null)
getImages($target, $module_srls_list, $search_keyword, $page=1, $list_count=20)
high class of the module module
getFiles($target, $module_srls_list, $search_keyword, $page=1, $list_count=20)