[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: news_admin/website news.inc.php,1.5,1.6 setup.in
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: news_admin/website news.inc.php,1.5,1.6 setup.inc.php.sample,1.3,1.4 |
Date: |
Wed, 06 Mar 2002 16:32:42 -0500 |
Update of /cvsroot/phpgroupware/news_admin/website
In directory subversions:/tmp/cvs-serv5769
Modified Files:
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.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** news.inc.php 20 Jan 2002 22:42:15 -0000 1.5
--- news.inc.php 6 Mar 2002 21:32:39 -0000 1.6
***************
*** 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> </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> </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.4
diff -C2 -r1.3 -r1.4
*** setup.inc.php.sample 20 Dec 2000 03:34:11 -0000 1.3
--- setup.inc.php.sample 6 Mar 2002 21:32:39 -0000 1.4
***************
*** 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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: news_admin/website news.inc.php,1.5,1.6 setup.inc.php.sample,1.3,1.4,
Bettina Gille <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: news_admin/website/templates news.tpl,1.2,1.3 news_row.tpl,1.4,1.5
- Next by Date:
[Phpgroupware-cvs] CVS: tts/setup phpgw_it.lang,1.2,1.3
- Previous by thread:
[Phpgroupware-cvs] CVS: news_admin/website/templates news.tpl,1.2,1.3 news_row.tpl,1.4,1.5
- Next by thread:
[Phpgroupware-cvs] CVS: tts/setup phpgw_it.lang,1.2,1.3
- Index(es):