<?php
$chan_name="select * from rsschannel where channel_id=".$_REQUEST['id'];
$chan_name_res=$pg_sql->query_pass($chan_name,"4");
$total_chan="select * from rssurl_newsitem where frontend_export='Y' and rss_channel_id='".$_REQUEST['id']."'";
$total_chan_res=$pg_sql->query_pass($total_chan,"4");
$total_num = count($total_chan_res);
$limit = 30; // Set limit display news item per page
$offset = 0;
if($_REQUEST['offset']>0){
$offset = $_REQUEST['offset'];
}
$chan_item_qry="select * from rssurl_newsitem where frontend_export='Y' and rss_channel_id='".$_REQUEST['id']."' order by pubtime desc limit $limit offset $offset";
$chan_item_qry_res=$pg_sql->query_pass($chan_item_qry,'4');
// For Xml...
for($xlc=0;$xlc<count($chan_item_qry_res);$xlc++){
if($chan_item_qry_res[$xlc]['url_newsitem_id']!="")
{
$xml_allid .=$chan_item_qry_res[$xlc]['url_newsitem_id'].",";
}
}
//
?>
<table cellpadding="5" cellspacing="0" align="left" width="100%" border="0">
<tr>
<td valign="middle" class="heading5" height="25"><?=$allnews_. " ".$chan_name_res[0]['channel_title']?></td>
<td align="right" valign="middle" class="heading5" height="25"><a target="_new" href="xml.php?id=<?=base64_encode(trim($xml_allid,","))?>&channel=<?=$_REQUEST['id']?>"><?if($display_style_==1){?><img src="images/rss-2.0.jpg" width="80" height="15" border="0" alt="Link to RSS Feed">
<?}else{?> <img src="images/<?=$rss_style_?>" border="0" align="absmiddle" alt="Link to RSS Feed"><?}?></a> </td>
</tr>
<?
for($lc=0;$lc<count($chan_item_qry_res);$lc++){
$title=str_replace("||","'",$chan_item_qry_res[$lc]['news_title']);
$rep_title=$title;
$rep_title=str_replace("é","é",$rep_title);
$rep_title=str_replace("â","",$rep_title);
$rep_title=str_replace("è","è",$rep_title);
$rep_title=str_replace("Ã","à",$rep_title);
$rep_title=str_replace("àª","ê",$rep_title);
$rep_title=str_replace("â","",$rep_title);
$rep_title=str_replace("à»","û",$rep_title);
$rep_title=str_replace("â¦","...",$rep_title);
$rep_title=str_replace("&#039;","'",$rep_title);
?>
<tr align="right" class="cont">
<td align="left" valign="top" colspan="2"><a href="<?=$chan_item_qry_res[$lc]['url']?>" class="contblue2" target="new"><?=$rep_title?></a></td>
</tr>
<?}?>
</table>