phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: news_admin/website news.inc.php,1.4.4.1,1.4.4.2


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: news_admin/website news.inc.php,1.4.4.1,1.4.4.2 setup.inc.php.sample,1.3,1.3.4.1
Date: Wed, 06 Mar 2002 22:02:15 -0500

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

Modified Files:
      Tag: Version-0_9_14-branch
        news.inc.php setup.inc.php.sample 
Log Message:
update website

Index: news.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/website/news.inc.php,v
retrieving revision 1.4.4.1
retrieving revision 1.4.4.2
diff -C2 -r1.4.4.1 -r1.4.4.2
*** news.inc.php        20 Jan 2002 22:42:59 -0000      1.4.4.1
--- news.inc.php        7 Mar 2002 03:02:13 -0000       1.4.4.2
***************
*** 1,47 ****
  <?php
!   /**************************************************************************\
!   * phpGroupWare - Webpage news admin                                        *
!   * http://www.phpgroupware.org                                              *
!   * --------------------------------------------                             *
!   *  This program is free software; you can redistribute it and/or modify it *
!   *  under the terms of the GNU General Public License as published by the   *
!   *  Free Software Foundation; either version 2 of the License, or (at your  *
!   *  option) any later version.                                              *
!   * --------------------------------------------                             *
!   * This program was sponsered by Golden Glair productions                   *
!   * http://www.goldenglair.com                                               *
!   \**************************************************************************/
! 
!   /* $Id$ */
! 
!   include("setup.inc.php");
! 
!   $tpl->set_file(array("news" => "news.tpl",
!                        "row"  => "news_row.tpl"));
! 
!   $db->query("select count(*) from phpgw_news where news_status='Active'");
!   $db->next_record();
!   $total = $db->f(0);
! 
!   if (! $oldnews) {
!      $db->query("select *,account_lid as submittedby from phpgw_news,accounts 
where news_status='Active' and news_submittedby=accounts.account_id order by 
news_date desc limit 5");
!   } else {  
!      $db->query("select *,account_lid as submittedby from phpgw_news,accounts 
where news_status='Active' and news_submittedby=accounts.account_id order by 
news_date desc limit 5,$total");
!   }
! 
!   while ($db->next_record()) {
!     $tpl->set_var("subject",$db->f("news_subject"));
!     $tpl->set_var("submitedby","Submitted by " . $db->f("submittedby") . " on 
" . date("m/d/Y - h:m:s a",$db->f("news_date")));
!     $tpl->set_var("content",nl2br($db->f("news_content")));
!     
!     $tpl->parse("rows","row",True);
!   }
! 
!   $tpl->pparse("out","news");
!   if ($total > 5 && ! $oldnews) {
!      echo '<center><a href="index.php?oldnews=True">View news 
archives</a></center>';
!   }
  ?>
!    <p>&nbsp;</p>
  
!    <div align="right"><font size="-1">This page uses the news admin from <a 
href="http://www.phpgroupware.org";>phpGroupWare</a></font></div>
--- 1,54 ----
  <?php
!       
/**************************************************************************\
!       * phpGroupWare - Webpage news admin                                     
   *
!       * http://www.phpgroupware.org                                           
   *
!       * --------------------------------------------                          
   *
!       *  This program is free software; you can redistribute it and/or modify 
it *
!       *  under the terms of the GNU General Public License as published by 
the   *
!       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
!       *  option) any later version.                                           
   *
!       * --------------------------------------------                          
   *
!       * This program was sponsered by Golden Glair productions                
   *
!       * http://www.goldenglair.com                                            
   *
!       
\**************************************************************************/
!       /* $Id$ */
! 
!       include('setup.inc.php');
! 
!       $tpl->set_file(array('news' => 'news.tpl',
!                                                       'row' => 
'news_row.tpl'));
! 
!       $db->query("select count(*) from phpgw_news where 
news_status='Active'");
!       $db->next_record();
!       $total = $db->f(0);
! 
!       if (! $oldnews)
!       {
!               $db->query("select *,account_lid as submittedby from 
phpgw_news,phpgw_accounts where news_status='Active' "
!                                       . "and 
news_submittedby=phpgw_accounts.account_id order by news_date desc limit 5");
!       }
!       else
!       {
!               $db->query("select *,account_lid as submittedby from 
phpgw_news,phpgw_accounts where news_status='Active' and "
!                                       . 
"news_submittedby=phpgw_accounts.account_id order by news_date desc limit 
5,$total");
!       }
! 
!       while ($db->next_record())
!       {
!               $tpl->set_var('subject',$db->f('news_subject'));
!               $tpl->set_var('submitedby','Submitted by ' . 
$db->f('submittedby') . ' on ' . date("m/d/Y - h:m:s a",$db->f('news_date')));
!               $tpl->set_var('content',nl2br($db->f('news_content')));
! 
!               $tpl->parse('rows','row',True);
!       }
! 
!       $tpl->pparse('out','news');
! 
!       if ($total > 5 && ! $oldnews)
!       {
!               echo '<center><a href="index.php?oldnews=True">View news 
archives</a></center>';
!       }
  ?>
!       <p>&nbsp;</p>
  
!       <div align="center"><font size="-1">This page uses the news admin from 
<a href="http://www.phpgroupware.org";>phpGroupWare</a></font></div>

Index: setup.inc.php.sample
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/website/setup.inc.php.sample,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -C2 -r1.3 -r1.3.4.1
*** setup.inc.php.sample        20 Dec 2000 03:34:11 -0000      1.3
--- setup.inc.php.sample        7 Mar 2002 03:02:13 -0000       1.3.4.1
***************
*** 1,29 ****
  <?php
  
!   $path_to_header   = "/path/to/phpgroupware/";
!   $template_path    = "/path/to/phpgroupware/news_admin/website/templates/";
!   $domain           = "default";
  
!   // This is used for exporting news
!   $site_title       = "mysite title";
!   $site_link        = "http://www.mysite.com";;
!   $site_description = "Just a sample";
!   $img_title        = "my logo";
!   $img_url          = "http://www.mysite.com/logo.jpg";;
!   $img_link         = "http://www.mysite.com";;
!   
!   // Don't change the follow lines
!   $phpgw_info["flags"]["noapi"] = True;
!   include($path_to_header . "header.inc.php");
!   include($phpgw_info["server"]["api_dir"] . "/phpgw_template.inc.php");
!   include($phpgw_info["server"]["api_dir"] . 
"/phpgw_db_".$phpgw_domain[$domain]["db_type"].".inc.php");
!   
!   $db           = new db;
!   $db->Host     = $phpgw_domain[$domain]["server"]["db_host"];
!   $db->Type     = $phpgw_domain[$domain]["db_type"];
!   $db->Database = $phpgw_domain[$domain]["db_name"];
!   $db->User     = $phpgw_domain[$domain]["db_user"];
!   $db->Password = $phpgw_domain[$domain]["db_pass"];
  
!   $tpl = new Template($template_path);
  
--- 1,29 ----
  <?php
  
!       $path_to_header   = '/path/to/phpgroupware/';
!       $template_path    = 
'/path/to/phpgroupware/news_admin/website/templates/';
!       $domain           = 'default';
  
!       // This is used for exporting news
!       $site_title       = 'mysite title';
!       $site_link        = 'http://www.mysite.com';
!       $site_description = 'Just a sample';
!       $img_title        = 'my logo';
!       $img_url          = 'http://www.mysite.com/logo.jpg';
!       $img_link         = 'http://www.mysite.com';
  
!       // Don't change the follow lines
!       $GLOBALS['phpgw_info']['flags']['noapi'] = True;
!       include($path_to_header . 'header.inc.php');
!       include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/class.Template.inc.php');
!       include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/class.db_' . 
$phpgw_domain[$domain]['db_type'] . '.inc.php');
! 
!       $db           = new db;
!       $db->Host     = $GLOBALS['phpgw_domain'][$domain]['server']['db_host'];
!       $db->Type     = $GLOBALS['phpgw_domain'][$domain]['db_type'];
!       $db->Database = $GLOBALS['phpgw_domain'][$domain]['db_name'];
!       $db->User     = $GLOBALS['phpgw_domain'][$domain]['db_user'];
!       $db->Password = $GLOBALS['phpgw_domain'][$domain]['db_pass'];
! 
!       $tpl = new Template($template_path);
  




reply via email to

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