mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6375 201d5d3c-b55e-5fd7-737f-ddc643e51545
76 lines
2.7 KiB
PHP
76 lines
2.7 KiB
PHP
<?php
|
|
/**
|
|
* mhtml Library ver 0.1
|
|
* @author zero <zero@zeroboard.com> / lang_select : misol
|
|
**/
|
|
class wap extends mobileXE {
|
|
|
|
/**
|
|
* @brief constructor
|
|
**/
|
|
function wap() {
|
|
parent::mobileXE();
|
|
}
|
|
|
|
/**
|
|
* @brief hdml 헤더 출력
|
|
**/
|
|
function printHeader() {
|
|
print("<html><head>\n");
|
|
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
|
|
printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title),htmlspecialchars($titlePageStr));
|
|
}
|
|
|
|
// 제목을 출력
|
|
function printTitle() {
|
|
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
|
|
printf('<%s%s><br>%s', htmlspecialchars($this->title),htmlspecialchars($titlePageStr),"\n");
|
|
}
|
|
|
|
/**
|
|
* @brief 내용을 출력
|
|
* hasChilds()가 있으면 목록형을 그렇지 않으면 컨텐츠를 출력
|
|
**/
|
|
function printContent() {
|
|
if($this->hasChilds()) {
|
|
foreach($this->getChilds() as $key => $val) {
|
|
if(!$val['link']) continue;
|
|
printf('<a href="%s" accesskey="%s">%s</a><br>%s', $val['href'], $this->getNo(), $val['text'], "\n");
|
|
}
|
|
print "<hr><br>";
|
|
} else {
|
|
print $this->getContent()."<hr><br>\n";
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @brief 버튼을 출력함
|
|
**/
|
|
function printBtn() {
|
|
if($this->nextUrl) {
|
|
$url = $this->nextUrl;
|
|
printf('<a href="%s">%s</a><br>%s', $url->url, $url->text, "\n");
|
|
}
|
|
if($this->prevUrl) {
|
|
$url = $this->prevUrl;
|
|
printf('<a href="%s">%s</a><br>%s', $url->url, $url->text, "\n");
|
|
}
|
|
if($this->upperUrl) {
|
|
$url = $this->upperUrl;
|
|
printf('<btn href="%s" name="%s">%s', $url->url, $url->text, "\n");
|
|
}
|
|
if($this->homeUrl) {
|
|
$url = $this->homeUrl;
|
|
printf('<a btn="%s" href="%s">%s</a><br>%s', $url->text, $url->url, $url->text, "\n");
|
|
}
|
|
// 언어선택
|
|
$url = getUrl('','lcm','1','sel_lang',Context::getLangType());
|
|
printf('<a href="%s">%s</a><br>%s', $url, 'Language : '.Context::getLang('select_lang'), "\n");
|
|
}
|
|
|
|
// 푸터 정보를 출력
|
|
function printFooter() {
|
|
print("</body></html>\n");
|
|
}
|
|
}
|
|
?>
|