rhymix/modules/board/board.smartphone.php
haneul 946c14cc4f 이름 변경중
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6167 201d5d3c-b55e-5fd7-737f-ddc643e51545
2009-04-22 08:08:12 +00:00

67 lines
2.6 KiB
PHP

<?php
/**
* @class boardWAP
* @author haneul0318 (haneul0318@gmail.com)
* @brief board 모듈의 IPhone class
**/
class boardSPhone extends board {
function procSmartPhone(&$oIPhone)
{
if(!$this->grant->list || $this->module_info->consultation == 'Y') return $oIPhone->setContent(Context::getLang('msg_not_permitted'));
$act = Context::get('act');
if(method_exists($this, $act))
{
$this->{$act}();
}
else
{
$document_srl = Context::get('document_srl');
if($document_srl)
return $this->dispContent($document_srl);
else
return $this->dispList();
}
}
function dispContent($document_srl)
{
$oDocumentModel = &getModel('document');
$oDocument = $oDocumentModel->getDocument($document_srl);
if($oDocument->isExists()) {
// 권한 확인
if(!$this->grant->view) return Context::getLang('msg_not_permitted');
Context::setBrowserTitle($oDocument->getTitleText());
Context::set('oDocument', $oDocument);
$oTemplate = new TemplateHandler();
$content = $oTemplate->compile($this->module_path.'tpl/smartphone', "view_document");
return $content;
}
else
{
return $this->dispList();
}
}
function dispList()
{
if(!$this->grant->list || $this->module_info->consultation == 'Y') return Context::getLang('msg_not_permitted');
$oDocumentModel = &getModel('document');
$args->module_srl = $this->module_srl;
$args->page = Context::get('page');;
$args->list_count = 8;
$args->sort_index = $this->module_info->order_target?$this->module_info->order_target:'list_order';
$args->order_type = $this->module_info->order_type?$this->module_info->order_type:'asc';
$output = $oDocumentModel->getDocumentList($args, $this->except_notice);
$document_list = $output->data;
Context::set('document_list', $document_list);
$page_navigation = $output->page_navigation;
Context::set('page_navigation',$page_navigation);
$oTemplate = new TemplateHandler();
$content = $oTemplate->compile($this->module_path.'tpl/smartphone', "list");
return $content;
}
}
?>