21 $oSecurity->encodeHTML(
'document_srl',
'comment_srl',
'vid',
'mid',
'page',
'category',
'search_target',
'search_keyword',
'sort_index',
'order_type',
'trackback_srl');
26 if($this->module_info->list_count)
28 $this->list_count = $this->module_info->list_count;
30 if($this->module_info->search_list_count)
32 $this->search_list_count = $this->module_info->search_list_count;
34 if($this->module_info->page_count)
36 $this->page_count = $this->module_info->page_count;
38 $this->except_notice = $this->module_info->except_notice ==
'N' ? FALSE : TRUE;
44 if(isset($statusList[
'SECRET']))
46 $this->module_info->secret =
'Y';
50 $count_category = count(
$oDocumentModel->getCategoryList($this->module_info->module_srl));
53 if($this->module_info->hide_category)
55 $this->module_info->use_category = ($this->module_info->hide_category ==
'Y') ?
'N' :
'Y';
57 else if($this->module_info->use_category)
59 $this->module_info->hide_category = ($this->module_info->use_category ==
'Y') ?
'N' :
'Y';
63 $this->module_info->hide_category =
'N';
64 $this->module_info->use_category =
'Y';
69 $this->module_info->hide_category =
'Y';
70 $this->module_info->use_category =
'N';
77 if($this->module_info->consultation ==
'Y' && !$this->grant->manager && !$this->grant->consultation_read)
79 $this->consultation = TRUE;
82 $this->grant->list = FALSE;
83 $this->grant->write_document = FALSE;
84 $this->grant->write_comment = FALSE;
85 $this->grant->view = FALSE;
90 $this->consultation = FALSE;
97 $template_path = sprintf(
"%sskins/%s/",$this->module_path, $this->module_info->skin);
100 $this->module_info->skin =
'default';
101 $template_path = sprintf(
"%sskins/%s/",$this->module_path, $this->module_info->skin);
109 $extra_keys =
$oDocumentModel->getExtraKeys($this->module_info->module_srl);
115 if (is_array($extra_keys))
117 foreach($extra_keys as $val)
119 $this->order_target[] = $val->eid;
130 foreach(
$args as $name => $value)
132 if(preg_match(
'/[0-9]+_cpage/', $name))
148 if(!$this->grant->access || !$this->grant->list)
167 foreach($extra_keys as $key => $val)
169 if($val->search ==
'Y')
$search_option[
'extra_vars'.$val->idx] = $val->name;
173 $memberConfig =
getModel(
'module')->getModuleConfig(
'member');
174 foreach($memberConfig->signupForm as $signupFormElement)
178 if($signupFormElement->isPublic ==
'N')
186 if(count($statusNameList) > 0)
196 $this->listConfig = $oBoardModel->getListConfig($this->module_info->module_srl);
197 if(!$this->listConfig) $this->listConfig = array();
212 $oSecurity->encodeHTML(
'search_option.');
223 if($this->module_info->use_category==
'Y')
226 if(!$this->grant->list)
236 $oSecurity->encodeHTML(
'category_list.',
'category_list.childs.');
259 if($oDocument->isExists())
262 if($oDocument->get(
'module_srl')!=$this->module_info->module_srl )
264 return $this->
stop(
'msg_invalid_request');
268 if($this->grant->manager) $oDocument->setGrant();
271 if($this->consultation && !$oDocument->isNotice())
274 if(abs($oDocument->get(
'member_srl')) !=
$logged_info->member_srl)
281 if($oDocument->getStatus() ==
'TEMP')
283 if(!$oDocument->isGranted())
309 if($oDocument->isExists())
311 if(!$this->grant->view && !$oDocument->isGranted())
323 if(!$oDocument->isSecret() || $oDocument->isGranted())
325 $oDocument->updateReadedCount();
329 if($oDocument->isSecret() && !$oDocument->isGranted())
337 $oDocument->add(
'module_srl', $this->
module_srl);
355 if(!$this->grant->access)
368 $downloadGrantCount = 0;
369 if(is_array($file_module_config->download_grant))
371 foreach($file_module_config->download_grant AS $value)
372 if($value) $downloadGrantCount++;
375 if(is_array($file_module_config->download_grant) && $downloadGrantCount>0)
377 if(!
Context::get(
'is_logged'))
return $this->
stop(
'msg_not_permitted_download');
387 $oMemberModel =&
getModel(
'member');
390 $is_permitted =
false;
391 for($i=0;$i<count($file_module_config->download_grant);$i++)
393 $group_srl = $file_module_config->download_grant[$i];
394 if($member_groups[$group_srl])
396 $is_permitted =
true;
400 if(!$is_permitted)
return $this->
stop(
'msg_not_permitted_download');
409 Context::set(
'file_list',$oDocument->getUploadedFiles());
412 $oSecurity->encodeHTML(
'file_list..source_filename');
425 $comment_list = $oDocument->getComments();
428 if(is_array($comment_list))
430 foreach($comment_list as $key => $val)
432 if(!$val->isAccessible())
447 if(!$this->grant->list)
454 $args =
new stdClass();
465 if(!$this->grant->list)
478 $args =
new stdClass();
495 $args->search_target =
'';
499 if($this->module_info->use_category==
'Y')
507 if(!in_array(
$args->sort_index, $this->order_target))
509 $args->sort_index = $this->module_info->order_target?$this->module_info->order_target:
'list_order';
511 if(!in_array(
$args->order_type, array(
'asc',
'desc')))
513 $args->order_type = $this->module_info->order_type?$this->module_info->order_type:
'asc';
521 if($oDocument->isExists() && !$oDocument->isNotice())
530 if(
$args->category_srl ||
$args->search_keyword)
532 $args->list_count = $this->search_list_count;
536 if($this->consultation)
541 if($this->module_info->use_anonymous ===
'Y')
543 unset(
$args->member_srl);
561 $configColumList = array_keys($this->listConfig);
562 $tableColumnList = array(
'document_srl',
'module_srl',
'category_srl',
'lang_code',
'is_notice',
563 'title',
'title_bold',
'title_color',
'content',
'readed_count',
'voted_count',
564 'blamed_count',
'comment_count',
'trackback_count',
'uploaded_count',
'password',
'user_id',
565 'user_name',
'nick_name',
'member_srl',
'email_address',
'homepage',
'tags',
'extra_vars',
566 'regdate',
'last_update',
'last_updater',
'ipaddress',
'list_order',
'update_order',
567 'allow_trackback',
'notify_message',
'status',
'comment_status');
568 $this->columnList = array_intersect($configColumList, $tableColumnList);
570 if(in_array(
'summary', $configColumList)) array_push($this->columnList,
'content');
573 $defaultColumn = array(
'document_srl',
'module_srl',
'category_srl',
'lang_code',
'member_srl',
'last_update',
'comment_count',
'trackback_count',
'uploaded_count',
'status',
'regdate',
'title_bold',
'title_color');
576 if($this->module_info->skin ==
'xe_guestbook' || $this->module_info->default_style ==
'blog')
578 $defaultColumn = $tableColumnList;
581 if (in_array(
'last_post', $configColumList)){
582 array_push($this->columnList,
'last_updater');
586 if ($this->except_notice)
588 array_push($this->columnList,
'is_notice');
590 $this->columnList = array_unique(array_merge($this->columnList, $defaultColumn));
593 foreach($this->columnList as $no => $value)
595 $this->columnList[$no] =
'documents.' . $value;
605 if(!$this->grant->list)
614 $obj->mid = $this->module_info->mid;
615 $obj->list_count = 10000;
621 $numbers = array_keys(
$output->data);
626 foreach($numbers as $k => $v)
628 $tag_list[] =
$output->data[$v];
636 $oSecurity->encodeHTML(
'tag_list.');
647 if(!$this->grant->write_document)
657 if($this->module_info->use_category==
'Y')
667 $group_srls = array();
669 $group_srls_count = count($group_srls);
673 if(count($normal_category_list))
675 foreach($normal_category_list as $category_srl => $category)
678 if($category->group_srls)
680 $category_group_srls = explode(
',',$category->group_srls);
682 if(count(array_intersect($group_srls, $category_group_srls))) $is_granted = TRUE;
696 if($oDocument->get(
'module_srl') == $oDocument->get(
'member_srl')) $savedDoc = TRUE;
697 $oDocument->add(
'module_srl', $this->
module_srl);
699 if($oDocument->isExists() && $this->module_info->protect_content==
"Y" && $oDocument->get(
'comment_count')>0 && $this->grant->manager==
false)
701 return new BaseObject(-1,
'msg_protect_content');
706 if($oDocument->isExists()&&!$oDocument->isGranted())
711 if(!$oDocument->isExists())
716 $pointForInsert = $point_config[
"insert_document"];
717 if($pointForInsert < 0)
723 else if (($oPointModel->getPoint(
$logged_info->member_srl) + $pointForInsert )< 0 )
729 if(!$oDocument->get(
'status')) $oDocument->add(
'status',
$oDocumentModel->getDefaultStatus());
732 if(count($statusList) > 0)
Context::set(
'status_list', $statusList);
743 if($oDocument->isExists() && !$savedDoc)
Context::set(
'extra_keys', $oDocument->getExtraVars());
752 $oSecurity->encodeHTML(
'category_list.text',
'category_list.title');
759 $resultList = array();
760 if(!empty($this->module_info->use_status))
763 $statusList = explode(
'|@|', $this->module_info->use_status);
765 if(is_array($statusList))
767 foreach($statusList as $key => $value)
769 $resultList[$value] = $statusNameList[$value];
782 if(!$this->grant->write_document)
798 if(!$oDocument || !$oDocument->isExists())
804 if(!$oDocument->isGranted())
809 if($this->module_info->protect_content==
"Y" && $oDocument->get(
'comment_count')>0 && $this->grant->manager==
false)
832 if(!$this->grant->write_comment)
840 if(!$oDocument->isExists())
846 if(!$oDocument->allowComment())
852 $oCommentModel =
getModel(
'comment');
853 $oSourceComment = $oComment = $oCommentModel->getComment(0);
855 $oComment->add(
'module_srl', $this->
module_srl);
876 if(!$this->grant->write_comment)
887 return new BaseObject(-1,
'msg_invalid_request');
891 $oCommentModel =
getModel(
'comment');
892 $oSourceComment = $oCommentModel->getComment($parent_srl, $this->grant->manager);
895 if(!$oSourceComment->isExists())
906 $oDocument =
$oDocumentModel->getDocument($oSourceComment->get(
'document_srl'));
907 if(!$oDocument->allowComment())
913 $oComment = $oCommentModel->getComment();
914 $oComment->add(
'parent_srl', $parent_srl);
915 $oComment->add(
'document_srl', $oSourceComment->get(
'document_srl'));
920 Context::set(
'module_srl',$this->module_info->module_srl);
936 if(!$this->grant->write_comment)
948 return new BaseObject(-1,
'msg_invalid_request');
952 $oCommentModel =
getModel(
'comment');
953 $oComment = $oCommentModel->getComment($comment_srl, $this->grant->manager);
956 if(!$oComment->isExists())
962 if(!$oComment->isGranted())
968 Context::set(
'oSourceComment', $oCommentModel->getComment());
985 if(!$this->grant->write_comment)
996 $oCommentModel =
getModel(
'comment');
997 $oComment = $oCommentModel->getComment($comment_srl, $this->grant->manager);
1001 if(!$oComment->isExists() )
1007 if(!$oComment->isGranted())
1027 $oTrackbackModel =
getModel(
'trackback');
1029 if(!$oTrackbackModel)
1064 if(!$msg) $msg = $msg_code;
setTemplateFile($filename)
getController($module_name)
dispBoardModifyComment()
display the comment modification from
dispBoardContent()
display board contents
$template_path
a path of directory where template files reside
dispBoardNoticeList()
display notice list (can be used by API)
dispBoardContentList()
display board content list
_getStatusNameList(&$oDocumentModel)
$category_list
category list
alertMessage($message)
the method for displaying the warning messages display an error message if it has not a special desig...
set($key, $val, $set_to_get_vars=0)
dispBoardTagList()
display tag list
dispBoardWriteComment()
display comment wirte form
dispBoardWrite()
display document write form
$module_srl
integer value to represent a run-time instance of Module (XE Module)
dispBoardDelete()
display board module deletion form
$module_info
an object containing the module information
dispBoardDeleteComment()
display the delete comment form
addJsFile($file, $optimized=FALSE, $targetie= '', $index=0, $type= 'head', $isRuleset=FALSE, $autoPath=null)
addBrowserTitle($site_title)
init()
initialization board module can be used in either normal mode or admin mode.
dispBoardContentCommentList()
display the document comment list (can be used by API)
dispBoardReplyComment()
display comment replies page
$list_count
the number of documents displayed in a page
dispBoardCategoryList()
display the category list
addJsFilter($path, $filename)
dispBoardContentView()
display the board conent view
dispBoardContentFileList()
display the document file list (can be used by API)
dispBoardDeleteTrackback()
display the delete trackback form
dispBoardMessage($msg_code)
display board message