Location: PHPKode > projects > News Manager - RSS aggregator > newsmanager/rss_services.php
<?php
session_start();
include('header.php');

$tot_rss="select * from rssurl_newsitem where language='$lang'";
$tot_rss_res=$pg_sql->query_pass($tot_rss,"4");

$rss_cat="select * from category where type='C' order by language,category_name asc";
$rss_cat_res=$pg_sql->query_pass($rss_cat,"4");

$rss_theme="select * from category where type='T' order by category_name,language asc";
$rss_theme_res=$pg_sql->query_pass($rss_theme,"4");

$home_page_='Homepage';
$head_cat='Categories';
$head_theme='Themes';
if($_REQUEST['cat_id']!="")
 $cat_id_new="&cat_id=".$_REQUEST['cat_id'];


?>
<tr>
<td width="180" align="left" valign="top">
		<?include("list_categories.php")?>
 </td>
 <td width="600" 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">&nbsp;&nbsp;<span class="cont_co"><?=$your_?> :</span><a class="contlink" href="http://www.belgium.be/eportal/application?languageParameter=<?=$lang?>"><?=$home_?></a>:&nbsp;<img src="images/arrow.gif">&nbsp;<span class="cont_co">News</span>&nbsp;<img src="images/arrow.gif"><span class="cont_co"><?=$rss_services_?></span></td>
  		  </tr>
     </table>
	 <table cellpadding="3" width="95%" align="center" cellspacing="3" border="0">
	 <tr><td class="heading5" height="25" colspan="2"><?=$rss_services_?></td></tr>
	 <tr>
	   <td class="headingsmall" height="25"><?=$home_page_?></td>
	   <?if(count($tot_rss_res)>0){?>
	   <td><a href="xml_view.php?lang=<?=$lang?><?=$cat_id_new?>" class="headlink" target="_new" title="RSS-<?=strtoupper($lang)?>"><?=strtoupper($lang)?></td>
	   <?}else{?>
	   <td class="cont"><font class="linkrss"><?=strtoupper($lang)?></font></td>
	   <?}?>
	 </tr>

 	 <tr><td class="headingsmall" height="25" colspan="2"><?=$head_cat?></td></tr>

	 <?if(count($rss_cat_res)>0){
	   for($r=0;$r<count($rss_cat_res);$r++){
	 	 $catQry="select * from newsitem_category where category_id=".$rss_cat_res[$r]['category_id'];
	     $catQry_res=$pg_sql->query_pass($catQry,"4");

 		 if(count($catQry_res)>0)
    	 {

	 ?>
	  <tr>
	   	  <td class="cont"><?=ucfirst(strtolower($rss_cat_res[$r]['category_name']))?></td>
	      <td><a href="xml_services.php?id=<?=$rss_cat_res[$r]['category_id']?>" class="headlink" target="_new" title="RSS-<?=strtoupper($rss_cat_res[$r]['language'])?>"><?=strtoupper($rss_cat_res[$r]['language'])?></td>
      </tr>

	 <?}else{?>
	 <tr>
	   	  <td class="cont"><?=ucfirst(strtolower($rss_cat_res[$r]['category_name']))?></td>
	      <td class="cont"><font class="linkrss"><?=strtoupper($rss_cat_res[$r]['language'])?></font></td>
      </tr>

	 <?} } }else{?>
	 <tr>
	   	  <td class="cont" colspan="2">No Categories Available</td>
	  </tr>
	 <?}?>
 	 <tr><td class="headingsmall" height="25" colspan="2"><?=$head_theme?></td></tr>

	 <?if(count($rss_theme_res)>0){
	 	 for($h=0;$h<count($rss_theme_res);$h++){
			 $Qry="select * from newsitem_category where category_id=".$rss_theme_res[$h]['category_id'];
			 $Qry_res=$pg_sql->query_pass($Qry,"4");

    	 if(count($Qry_res)>0)
    	 {
	 ?>
	  <tr>
	   	  <td class="cont"><?=ucfirst(strtolower($rss_theme_res[$h]['category_name']))?></td>
	      <td class="cont"><a href="xml_services.php?id=<?=$rss_theme_res[$h]['category_id']?>" class="headlink" target="_new" title="RSS-<?=strtoupper($rss_theme_res[$h]['language'])?>"><?=strtoupper($rss_theme_res[$h]['language'])?></td>
      </tr>

	 <?}else{?>
	  <tr>
	 	  <td class="cont"><?=ucfirst(strtolower($rss_theme_res[$h]['category_name']))?></td>
	 	  <td class="cont"><font class="linkrss"><?=strtoupper($rss_theme_res[$h]['language'])?></font></td>
      </tr>
	<?}}}else{?>
	 <tr>
		   	  <td class="cont" colspan="2">No Themes Available</td>
	 </tr>
	<?}?>
	</table>
 </td>
 <td width="187" align="left" valign="top">
 	<table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td align="left" valign="top" class="bgybluewolineCopy" height="19"></td>
     </tr>
    </table>
       <table border="0"  height="100%" width="100%" 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