mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-11 23:01:41 +09:00
(아직 PC 브라우저에서 최적화 되었고 iphone, 옴니아등에서의 최적화는 다시 진행할 예정입니다) cafeXE, planet, page모듈에서도 스마트폰에 어울리는 컨텐츠로 스마트폰 환경을 제공하도록 수정 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6283 201d5d3c-b55e-5fd7-737f-ddc643e51545
44 lines
2.2 KiB
PHP
44 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* @class boardSmartphone
|
|
* @author haneul0318 (haneul0318@gmail.com)
|
|
* @brief board 모듈의 SmartPhone IPhone class
|
|
**/
|
|
|
|
class boardSPhone extends board {
|
|
|
|
function procSmartPhone(&$oSmartPhone) {
|
|
$oDocumentModel = &getModel('document');
|
|
|
|
if(!$this->grant->list || $this->module_info->consultation == 'Y') return $oSmartPhone->setContent(Context::getLang('msg_not_permitted'));
|
|
|
|
$oDocument = Context::get('oDocument');
|
|
if($oDocument->isExists()) {
|
|
if(Context::get('comment') == 'true' && $oDocument->getCommentCount()) {
|
|
Context::set('comment_list', $oDocument->getComments());
|
|
$comment_page_navigation = $oDocument->comment_page_navigation;
|
|
if($comment_page_navigation) {
|
|
if($comment_page_navigation->cur_page > $comment_page_navigation->first_page) $oSmartPhone->setPrevUrl(getUrl('cpage',$comment_page_navigation->cur_page-1));
|
|
if($comment_page_navigation->cur_page < $comment_page_navigation->last_page) $oSmartPhone->setNextUrl(getUrl('cpage',$comment_page_navigation->cur_page+1));
|
|
}
|
|
$oSmartPhone->setParentUrl(getUrl('comment',''));
|
|
$tpl_file = 'comment_list';
|
|
} else {
|
|
$oSmartPhone->setParentUrl(getUrl('document_srl',''));
|
|
$tpl_file = 'view_document';
|
|
}
|
|
} else {
|
|
$page_navigation = Context::get('page_navigation');
|
|
if($page_navigation) {
|
|
if($page_navigation->cur_page > $page_navigation->first_page) $oSmartPhone->setPrevUrl(getUrl('page',$page_navigation->cur_page-1));
|
|
if($page_navigation->cur_page < $page_navigation->last_page) $oSmartPhone->setNextUrl(getUrl('page',$page_navigation->cur_page+1));
|
|
}
|
|
$tpl_file = 'list';
|
|
}
|
|
|
|
$oTemplate = new TemplateHandler();
|
|
$content = $oTemplate->compile($this->module_path.'tpl/smartphone', $tpl_file);
|
|
$oSmartPhone->setContent($content);
|
|
}
|
|
}
|
|
?>
|