\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
<pre><code class="language-php">
<?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();
</code></pre>
\end{document}
