<?php
// -----------------------------------------------------------------------------------------------
// File:           list_all_news.php
// Topic:          list all articles
// Author:         urs_at_circle_dot_ch
// -----------------------------------------------------------------------------------------------

  include("config.php");

  function listHEADLINES() {

      global $conf;
      $content = file($conf[myDataFile]);

      for($i=0; $i<count($content); $i++) {
          $myLINES[$i] = explode("|",$content[$i]);
      };

      echo "<table border=0 cellspacing=0 cellpadding=2 width=100%>";
      $size = count($content);

      for($i=$size-1; $i>0; $i--) {
          if($myLINES[$i][5] > 0) {
              echo "<tr bgcolor=" . ($k++ % 2 == 0 ? '#EEEEEE' : '#FFFFFF') . ">";
              echo "<td valign=top align=left width=20%>" . $myLINES[$i][1];
              echo "<td valign=top align=left width=80%>";
              echo "<a href=zoom.php?id=" . $myLINES[$i][0] . " class=main>" . stripslashes($myLINES[$i][2]) . "</a>";
          }
      };
      echo "</table>";
  }

?>

<!-- <mynews:htmloutput> -->
<html><title>MyNEWS</title><body style="font-family: arial">
<table bgcolor=#cccccc border=0 cellpadding=1 cellspacing=0 width="500" align="center">
  <tbody >
  <tr>
    <td>
      <table border=0 cellpadding=3 cellspacing=0 width="100%">
        <tbody>
        <tr>
          <td>all news</td>
        </tr>
        </tbody>
      </table>
    </td>
  </tr>
  </tbody>
</table>
<br>
<table bgcolor=#cccccc border=0 cellpadding=1 cellspacing=0 width="500" align="center" >
  <tbody>
  <tr>
    <td>
      <table border=0 cellpadding=3 cellspacing=0 width="100%" >
        <tbody>
        <tr bgcolor="#ffffff" valign="top" >
          <td > <?php listHEADLINES(); ?> </td>
        </tr>
        </tbody>
      </table>
    </td>
  </tr>
  </tbody>
</table>
<br>
</body></html>
<!-- </mynews:htmloutput> -->