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.1,1.1.4


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

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

Modified Files:
      Tag: Version-0_9_16-branch
        export.php 
Log Message:
added teaser text and modified date

Index: export.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/website/export.php,v
retrieving revision 1.1.4.1.2.1
retrieving revision 1.1.4.1.2.2
diff -C2 -r1.1.4.1.2.1 -r1.1.4.1.2.2
*** export.php  4 May 2003 06:12:13 -0000       1.1.4.1.2.1
--- export.php  31 May 2003 08:18:21 -0000      1.1.4.1.2.2
***************
*** 19,33 ****
    include("setup.inc.php");
  
!   if (! $format) {
!      $format = "rdf";
!   }
  
    $tpl->set_file(array("news" => $format . ".tpl",
                         "row"  => $format . "_row.tpl"));
  
!   $db->query('select * from phpgw_news WHERE news_status='Active' ORDER BY 
news_date ' 
!            . 'DESC LIMIT 5');
! 
!   $tpl->set_var("site_title",$site_title);
    $tpl->set_var("site_link",$site_link);
    $tpl->set_var("site_description",$site_site_description);
--- 19,38 ----
    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);
***************
*** 36,45 ****
    $tpl->set_var("img_link",$img_link);
  
!   while ($db->next_record()) {
!     $tpl->set_var("title",$db->f("news_subject"));
!     $tpl->set_var("link",$site_link);
      
      $tpl->parse("rows","row",True);
    }
    $tpl->pparse("out","news");
! 
--- 41,52 ----
    $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");
! ?>





reply via email to

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