phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: news_admin/website export.php,1.1.4.1.2.2,1.1.4


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: news_admin/website export.php,1.1.4.1.2.2,1.1.4.1.2.3
Date: Sat, 31 May 2003 23:58:45 -0400

Update of /cvsroot/phpgroupware/news_admin/website
In directory subversions:/tmp/cvs-serv8765/website

Modified Files:
      Tag: Version-0_9_16-branch
        export.php 
Log Message:
forgot this one

Index: export.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/website/export.php,v
retrieving revision 1.1.4.1.2.2
retrieving revision 1.1.4.1.2.3
diff -C2 -r1.1.4.1.2.2 -r1.1.4.1.2.3
*** export.php  31 May 2003 08:18:21 -0000      1.1.4.1.2.2
--- export.php  1 Jun 2003 03:58:42 -0000       1.1.4.1.2.3
***************
*** 15,52 ****
    /* $Id$ */
  
!   // Note: Some of this is hard coded for right now ....
  
!   include("setup.inc.php");
! 
!       $cat_id = (isset($_GET['cat_id']) ? trim($_GET['cat_id']) : 44);
!       $format = (isset($_GET['format']) ? trim($_GET['format']) : "rdf-chan");
        $limit  = (isset($_GET['limit']) ? trim($_GET['limit']) : 5);
  
!   $tpl->set_file(array("news" => $format . ".tpl",
!                        "row"  => $format . "_row.tpl"));
  
!       $sql = 'SELECT * ';
!       $sql.= ' FROM phpgw_news';
!       $sql.= " WHERE news_status='Active'";
!       $sql.= ' AND news_cat='.$cat_id;
!       $sql.= ' AND news_date < '.time();
!       $sql.= ' ORDER BY news_date DESC';
!       $sql.= ' LIMIT '.$limit;
!   $db->query($sql);
!   
!   $tpl->set_var("site_link",$site_link);
!   $tpl->set_var("site_description",$site_site_description);
!   $tpl->set_var("img_title",$img_title);
!   $tpl->set_var("img_url",$img_url);
!   $tpl->set_var("img_link",$img_link);
  
!   while ($db->next_record()) 
        {
!     $tpl->set_var("title",$db->f('news_subject'));
!               $tpl->set_var("teaser",$db->f('news_teaser'));
!     $tpl->set_var("link",$site_link.'?item='.$db->f('news_id'));
      
!     $tpl->parse("rows","row",True);
!   }
!   $tpl->pparse("out","news");
  ?>
--- 15,61 ----
    /* $Id$ */
  
!       include('setup.inc.php');
  
!       $cat_id = intval($_GET['cat_id']);
!       $format = (isset($_GET['format']) ? trim($_GET['format']) : 'rss');
        $limit  = (isset($_GET['limit']) ? trim($_GET['limit']) : 5);
+       $all    = (isset($_GET['all']) ? True : False); 
+ 
+       $tpl->set_file(array('news' => $format . '.tpl'));
+       $tpl->set_block('news', 'item', 'items');
+       if($format == 'rdf')
+       {
+               set_block('news', 'seq', 'seqs');
+       }
  
!       $tpl->set_var($site);
  
!       if($all)
!       {
!               $news = $news_obj->get_all_public_news($limit);
!       }
!       else
!       {
!               $news = $news_obj->get_newslist($cat_id, False, 0, $limit);
!       }
  
!       if(is_array($news))
        {
!               foreach($news as $news_id => $news_data) 
!               {
!                       $tpl->set_var($news_data);
!                       $tpl->set_var('item_link', $site['link'] . '?item=' . 
$news_id);
!                       if($format == 'rdf')
!                       {
!                               $tpl->parse('seqs','seq',True);
!                       }
      
!                       $tpl->parse('items','item',True);
!               }
!       }
!       else
!       {
!               $tpl->set_var('items', '');
!       }
!       $tpl->pparse('out','news');
  ?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]