Location: PHPKode > projects > News Manager - RSS aggregator > newsmanager/view_article.php
<?php
session_start();
include('header.php');
$id=$_REQUEST['id'];

$article="Select * from rssurl_newsitem where url_newsitem_id=$id";
$article_res=$pg_sql->query_pass($article,"4");
$hour=str_replace(":","h",$article_res[0]['hour']);
$ch_id=$article_res[0]['rss_channel_id'];
$date=$article_res[0]['pubdate'];
include('date_format.php');

 $channel_image=$article_res[0]['image'];
		$dir="login/newsimages/";
		if (is_dir($dir))
		{
		 if ($dh = opendir($dir))
		 {
		   while (($file = readdir($dh)) !== false)
		   {
		 	if(($file != ".") && ($file != ".."))
			{
				$img=explode(".",$file);
				if($img[0]==$ch_id)
				{
				  $path=pathinfo($file);
				  $name=$path['extension'];
				  if($name == "jpg" || $name =="gif" )
					$image_pre='<a href="'.$article_res[0]['url'].'" target="_new"><img src="login/newsimages/'.$file.'" border="0" width="80" height="60"></a>';

				}

			}
	  	  }
		   closedir($dh);
	     }
	  }

		if(strstr($channel_image,"http://"))
		  $channel_image='<a href="'.$article_res[0]['url'].'" target="_new"><img border="0" height="60" width="80" src="'.$channel_image.'"></a>';
		else
		  $channel_image=$image_pre;

?>
<tr>
  <td width="180" align="left" valign="top">
		<?include("list_categories.php")?>
  </td>
  <td width="440"  align="left" valign="top">
      <table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
		  <tr>
			<td align="left" valign="top" class="bgybluewolineCopy" height="17"><span class="cont"><?=$your_?> :</span><a class="contlink" href="index.php?lang=<?=$lang?>">Home</a>&nbsp;<img src="images/arrow.gif"><span class="cont">Article</span></td>
		  </tr>
     </table><br>
		   <table cellpadding="2" width="95%" align="center" class="border" cellspacing="2" border="0">
			<tr>
   			   <td valign="top" width="75%"><font class="contblue"><?=str_replace("||","'",$article_res[0]['news_title'])?></font>
   				   <title>news.belgium.be-<?=$article_res[0]['news_title']?></title>
   				   <br><font class="grey"><?=$pubdate." & ".$hour?></font>
   			   </td>
   				   <?if($article_res[0]['image']!=""){?>
   			   <td valign="top" class="cont1" width="25%"><?=$channel_image?></td>
   				   <?}?>
   			</tr>
   			<tr>
       		  <td valign="top" colspan="2" class="cont1"><?=html_entity_decode(str_replace("||","'",$article_res[0]['description']))?></td>
       		</tr>
       		<tr>
       		  <td align="right" colspan="2"><a class="contblue" href="<?=$article_res[0]['url']?>" target="new"><?=$article_res[0]['url']?></a></td>
       		</tr>
			</table>
		</td>
		<td width="180" align="right" valign="top">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
				     <td align="left"  valign="top" class="bgybluewolineCopy" height="19"></td>
				   </tr>
				 </table> <br>
				 <table border="0" cellspacing="0" cellpadding="3">
				   <tr>
				      <td align="left" valign="middle"> <?include('readalso.php')?></td>
				    </tr>
				 </table>
				 </td>
			</tr>


<?

include('footer.php');
?>
Return current item: News Manager - RSS aggregator