Example #1
0
 function create()
 {
     $list = new HAW_deck(HAWIKI_TITLE);
     HAWTIKI_deck_init($list);
     $listtitle = new HAW_text($this->title, HAW_TEXTFORMAT_BOLD | HAW_TEXTFORMAT_BOXED);
     $list->add_text($listtitle);
     if (isset($this->backlink)) {
         $list->add_link($this->backlink);
     }
     if ($this->offset > 0) {
         // previous list items are available
         $prev_offset = $this->offset - $this->maxRecords;
         $prev_url = $this->nav_url . "?mode=mobile&" . $this->offset_parm_name . "=" . $prev_offset;
         while (list($key, $val) = each($this->query_parms)) {
             $prev_url .= "&" . $val;
         }
         // add query parameters
         $prev = new HAW_link(hawtra("previous page"), $prev_url);
         $list->add_link($prev);
     }
     if ($this->cant > $this->offset + $this->maxRecords) {
         // next list items are available
         $next_offset = $this->offset + $this->maxRecords;
         $next_url = $this->nav_url . "?mode=mobile&" . $this->offset_parm_name . "=" . $next_offset;
         while (list($key, $val) = each($this->query_parms)) {
             $next_url .= "&" . $val;
         }
         // add query parameters
         $next = new HAW_link(hawtra("next page"), $next_url);
         $list->add_link($next);
     }
     $rule = new HAW_rule();
     $list->add_rule($rule);
     // show all list items
     while (list($key, $val) = each($this->items)) {
         $val->render($list);
         if ($this->use_separators) {
             $list->add_rule($rule);
         }
     }
     if (!$this->use_separators) {
         $list->add_rule($rule);
     }
     // show at least one separator here ...
     // repeat navigation links
     if (isset($this->backlink)) {
         $list->add_link($this->backlink);
     }
     if (isset($prev)) {
         $list->add_link($prev);
     }
     if (isset($next)) {
         $list->add_link($next);
     }
     $list->create_page();
     die;
 }
Example #2
0
<?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-mobile.php,v 1.8.2.5 2005/08/17 20:28:09 nhuffschmid Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
require_once 'tiki-setup.php';
include_once "lib/hawhaw/hawtikilib.php";
if ($feature_mobile != 'y') {
    $smarty->assign('msg', tra("This feature is disabled") . ": feature_mobile");
    $smarty->display("error.tpl");
    die;
}
$TikiPage = new HAW_deck(HAWIKI_TITLE, HAW_ALIGN_CENTER);
HAWTIKI_deck_init($TikiPage);
if (isset($_REQUEST['content']) && $_REQUEST['content'] == "about") {
    // show info about hawiki
    $title = new HAW_text(hawtra("Welcome at Hawiki"), HAW_TEXTFORMAT_BOLD);
    $title->set_br(2);
    $TikiPage->add_text($title);
    $text1 = new HAW_text(hawtra("This TikiWiki site is prepared for access from a lot of mobile devices, e.g. WAP phones, PDA's, i-mode devices and much more."));
    $text1->set_br(2);
    $TikiPage->add_text($text1);
    $text2 = new HAW_text(hawtra("You can browse this site on your mobile device by directing your device's browser towards the following URL here on this site:"));
    $TikiPage->add_text($text2);
    $home = new HAW_link(hawtra("tiki-mobile.php"), $_SERVER['PHP_SELF']);
    $TikiPage->add_link($home);
} else {
    // HAWIKI main menu
    $title = new HAW_text(HAWIKI_TITLE, HAW_TEXTFORMAT_BOLD | HAW_TEXTFORMAT_BIG);
    $TikiPage->add_text($title);