<?


  echo '
';
  include_once '../../config.inc.php';
  if (!include '../autorization.php')
  {
    echo 'Access denied!';
    exit ();
  }

  $SQL1 = 'SELECT * FROM articles WHERE type=3 ORDER by tim DESC LIMIT ' . interv_amount;
  if (!($result = mysql_query ($SQL1)))
  {
    exit ('<b>Error:</b>' . mysql_error ());
    ;
  }

  echo '		
		<table width="';
  echo interv_wind_width;
  echo '" border="0" cellspacing="0" cellpadding="5" ';
  if (interv_border == '1')
  {
    echo 'style="border: 1px solid gray;"';
  }

  echo ' bgcolor="';
  echo interv_bg_color;
  echo '">

			';
  while ($row = mysql_fetch_array ($result))
  {
    echo '<tr><td valign="top">
				<a href="javascript:" STYLE="color:';
    echo interv_title_color;
    echo '; font-family:';
    echo interv_title_font;
    echo '; font-size:';
    echo interv_title_font_size;
    echo '; font-weight:';
    echo interv_title_font_weight;
    echo ';">';
    echo $row['title'];
    echo '</a><br>';
    if (interv_tmb_display == 'yes')
    {
      if ($dir = @opendir ('../../upload/thumbnails/'))
      {
        while ($file = readdir ($dir) !== false)
        {
          if (strstr ($file, $row['tim']))
          {
            echo '<A href="javascript:"><IMG SRC="../../upload/thumbnails/';
            echo $file;
            echo '" vspace="3" align="';
            echo interv_tmb_align;
            echo '" ';
            if (interv_tmb_width)
            {
              echo 'width="';
              echo interv_tmb_width;
              echo '"';
            }

            echo ' ';
            if (interv_tmb_height)
            {
              echo 'height="';
              echo interv_tmb_height;
              echo '"';
            }

            echo ' style="border: 1px solid Black;"></a>';
            continue;
          }
        }

        closedir ($dir);
      }
    }

    echo '					
					
					<font STYLE="color:';
    echo interv_description_color;
    echo '; font-family:';
    echo interv_description_font;
    echo '; font-size:';
    echo interv_description_font_size;
    echo '; font-weight:';
    echo interv_description_font_weight;
    echo ';">&#8226;&nbsp;';
    echo $row['description'];
    echo '</font><br>
				</td></tr>
			';
  }

  echo '			</table>';
?>
