Logo Search packages:      
Sourcecode: dacode version File versions  Download package

index.php3

<?php
/* daCode http://www.dacode.org
 * htdocs/pda/index.php3
 * Jerome Kerdreux <jerome.kerdreux@finix.eu.org>
 * Ripped from the wap by
 * Fabien Penso <penso@linuxfr.org>
 * $Id: index.php3,v 1.12.2.2 2002/01/04 13:15:12 netsabes Exp $
 *
 * This is used to make a Palm/Avantgo version
 */

      $topdir = '..';
      require $topdir."/dacode.php3";
      $session = LoadClass('Session');
      $news = LoadClass('News');

      $ret = '<html><head><title>'.$config->name.' - Mobile</title>'.
            '<meta http-equiv="Content-Type" content="text/html; '.
            'charset='.$config->encodingcharset.'" />'."\n".
            '</head><body>'.
            '<img src="'.$session->imgurl($config->minilogo, "jpg").
            '" border="0" alt="'.$config->name.'" />';

      $tmp = $news->get_news(10,0,0,1,1,0,0,0);

      if (gettype($tmp) == "array") {

            $ret .= '<table align="left" border="0">'."\n";

            while(current($tmp)) {
                  $cur = current($tmp);

                  if ($cur['title'] == "") {
                        $cur['title'] = $config->newstitledefault;
                  }

                  $ret .= '<tr valign="top"><td><a href="news.'.$config->php.
                        '?news_id='.$cur['id'].'"><img src="'.$session->imgurl("arrow", "jpg").
                        '" border="0" alt="-" /></a></td>'.
                        '<td><a href="news.'.$config->php.
                        '?news_id='.$cur['id'].'">'.htmlentities($cur['title']).
                        '</a><br /></td></tr>'."\n";

                  next($tmp);
            }

            $ret .= '</table>'."\n";

      }

      $ret .= '<p align="center">'.date("d/m/Y  H:i:s",time()).'</p>'.
            '</body></html>';

      echo $ret;

?>

Generated by  Doxygen 1.6.0   Back to index