<?php /** * $Horde: hordedoc/developer/work/mobile.php,v 1.1 2002/12/19 00:09:17 chuck Exp $ * * Copyright 2002 Chuck Hagenbuch <chuck@horde.org> * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. */ define('HORDE_BASE', dirname(__FILE__) . '/../horde'); require_once HORDE_BASE . '/lib/base.php'; require_once HORDE_BASE . '/lib/Browser.php'; require_once HORDE_BASE . '/lib/Mobile.php'; $browser = &new Browser(Horde::getFormData('debug')); if ($browser->isBrowser('mozilla')) { $myPage = &new Horde_Mobile(null, 'UP.Browser'); $myPage->_debug = true; } else { $myPage = &new Horde_Mobile(); $myPage->useSimulator(); } $myText = &new Horde_Mobile_text(Horde::getFormData('test', 'Title!'), array('b', 'big', 'i')); $block = &new Horde_Mobile_block($myText); $myPage->add($block); $set = &new Horde_Mobile_linkset(); $set->add(new Horde_Mobile_link('One', 'wap.php?test=1', 'One')); $set->add(new Horde_Mobile_link('Two', 'wap.php?test=2', 'Two')); $set->add(new Horde_Mobile_link('Three', 'wap.php?test=3', 'Three')); $myPage->add($set); $ruleBlock = &new Horde_Mobile_block(new Horde_Mobile_rule()); $myPage->add(new Horde_Mobile_phone('(617) 764-1985', 'Home')); $myPage->add($ruleBlock); /* Table testing code. */ $text1 = new Horde_Mobile_text('my text'); $text2 = new Horde_Mobile_text('her text'); $myTable = new Horde_Mobile_table(); $row1 = new Horde_Mobile_row(); $row1->add($text2); $row1->add(); $row1->add($text1); $myTable->add($row1); $row2 = new Horde_Mobile_row(); $row2->add(); $row2->add($text2); $myTable->add($row2); $myPage->add($myTable); /* End table code. */ $myPage->add($ruleBlock); $f = &new Horde_Mobile_form('wap.php', 'post'); $t = &new Horde_Mobile_radio('test'); $f->add($t); $t->add('New York', 'ny'); $t->add('Penn', 'pa'); /* $f->add(new Horde_Mobile_checkbox('one', 1, 'one', true)); $f->add(new Horde_Mobile_checkbox('two', 2, 'two')); */ $f->add(new Horde_Mobile_submit('Go', 's')); $myPage->add($f); $myPage->display();