issue 2662 coding convention fix

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12143 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-11-07 05:20:06 +00:00
parent 26e08751b9
commit f9fbd4a307
18 changed files with 1474 additions and 1282 deletions

View file

@ -1,103 +1,124 @@
<?php
/**
* HDML Library ver 0.1
* @author NHN (developers@xpressengine.com)
**/
class wap extends mobileXE {
/**
* HDML Library ver 0.1
* @author NHN (developers@xpressengine.com)
*/
class wap extends mobileXE {
/**
* @brief constructor
**/
function wap() {
parent::mobileXE();
}
/**
* @brief constructor
**/
function wap()
{
parent::mobileXE();
}
/**
* @brief hdml header output
**/
function printHeader() {
header("Content-Type:text/x-hdml; charset=".$this->charset);
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
/**
* @brief hdml header output
**/
function printHeader()
{
header("Content-Type:text/x-hdml; charset=".$this->charset);
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
print '<hdml version=3.0 ttl=0 markable=true>';
print "\n";
print $this->hasChilds()?'<choice name=main>':'<display>';
print "\n";
print '<hdml version=3.0 ttl=0 markable=true>';
print "\n";
print $this->hasChilds()?'<choice name=main>':'<display>';
print "\n";
if($this->upperUrl) {
$url = $this->upperUrl;
printf('<action type=soft1 task=go dest="%s" label="%s">%s', $url->url, $url->text, "\n");
}
}
if($this->upperUrl)
{
$url = $this->upperUrl;
printf('<action type=soft1 task=go dest="%s" label="%s">%s', $url->url, $url->text, "\n");
}
}
/**
* @brief Output title
**/
function printTitle() {
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
printf('<b>&lt;%s%s&gt;%s', $this->title,$titlePageStr,"\n");
}
/**
* @brief Output title
**/
function printTitle()
{
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
printf('<b>&lt;%s%s&gt;%s', $this->title,$titlePageStr,"\n");
}
/**
* @brief Output information
* hasChilds() if there is a list of content types, otherwise output
**/
function printContent() {
if($this->hasChilds()) {
foreach($this->getChilds() as $key => $val) {
if(!$val['link']) continue;
printf('<ce task=go label="%s" dest="%s">%s%s',Context::getLang('cmd_select'), $val['href'], $val['text'], "\n");
}
} else {
printf('<wrap>%s<br>%s', $this->getContent(),"\n");
}
}
/**
* @brief Output information
* hasChilds() if there is a list of content types, otherwise output
**/
function printContent()
{
if($this->hasChilds())
{
foreach($this->getChilds() as $key => $val)
{
if(!$val['link']) continue;
printf('<ce task=go label="%s" dest="%s">%s%s',Context::getLang('cmd_select'), $val['href'], $val['text'], "\n");
}
}
else
{
printf('<wrap>%s<br>%s', $this->getContent(),"\n");
}
}
/**
* @brief Button to output
**/
function printBtn() {
// Menu Types
if($this->hasChilds()) {
if($this->nextUrl) {
$url = $this->nextUrl;
printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
}
if($this->prevUrl) {
$url = $this->prevUrl;
printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
}
if($this->homeUrl) {
$url = $this->homeUrl;
printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
}
// Content Types
} else {
if($this->nextUrl) {
$url = $this->nextUrl;
printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
}
if($this->prevUrl) {
$url = $this->prevUrl;
printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
}
if($this->homeUrl) {
$url = $this->homeUrl;
printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
}
}
}
/**
* @brief Button to output
**/
function printBtn()
{
// Menu Types
if($this->hasChilds())
{
if($this->nextUrl)
{
$url = $this->nextUrl;
printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
}
if($this->prevUrl)
{
$url = $this->prevUrl;
printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
}
if($this->homeUrl)
{
$url = $this->homeUrl;
printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
}
// Content Types
}
else
{
if($this->nextUrl)
{
$url = $this->nextUrl;
printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
}
if($this->prevUrl)
{
$url = $this->prevUrl;
printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
}
if($this->homeUrl)
{
$url = $this->homeUrl;
printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
}
}
}
/**
* @brief Footer information output
**/
function printFooter() {
print $this->hasChilds()?'</choice>':'</display>';
print "\n";
print("</hdml>");
}
/**
* @brief Footer information output
**/
function printFooter()
{
print $this->hasChilds()?'</choice>':'</display>';
print "\n";
print("</hdml>");
}
}
}
?>
/* End of file hdml.class.php */
/* Location: ./addons/mobile/classes/hdml.class.php */