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

news.php3

<?php
/* daCode _ http://www.dacode.org/
 * $Id: news.php3,v 1.12.2.1 2001/12/03 09:19:17 netsabes Exp $
 */

      $topdir = '..';
      require $topdir."/dacode.php3";

      $news = LoadClass('News');
      $session = LoadClass('Session');
      $html = LoadClass('Html');

      header("Content-Type: text/html");

      $newstempo = $news->get_news(20,0,0,1,1,0,0);

      $output = "";

      if (gettype($newstempo) == "array") {
            reset($newstempo);
            while ($cur=current($newstempo)) {
                  ereg("^([0-9]{4})([0-9]{2})([0-9]{2})", $cur['timestamp'], $res);
                  $output .= "&nbsp;-&nbsp;<a href=\"".
                              $session->newsurls($cur['id'],0,0,$res[1],$res[2],$res[3]).
                              "\" target=\"blank\">".htmlentities($cur['title'])."</a><br />\n";
                  next($newstempo);
            }
      }

      $output = $html->sidebox("<a href=\"".$config->basehref.
            "\" class=\"boxheader\">".$config->name."</a>", $output);
      $output = split("\n",$output);
      $real = "";

      while($t = each($output)) {
            $t[1] = str_replace("'","\\'",$t[1]);
            $real .= "document.write('".$t[1]."');\n";
      }

      echo $real;
?>

Generated by  Doxygen 1.6.0   Back to index