phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: forum forums.php,1.22,1.23 index.php,1.25,1.26 r


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: forum forums.php,1.22,1.23 index.php,1.25,1.26 read.php,1.31,1.32 threads.php,1.31,1.32
Date: Sat, 19 Jan 2002 22:37:10 -0500

Update of /cvsroot/phpgroupware/forum
In directory subversions:/tmp/cvs-serv9431

Modified Files:
        forums.php index.php read.php threads.php 
Log Message:
.

Index: forums.php
===================================================================
RCS file: /cvsroot/phpgroupware/forum/forums.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** forums.php  18 Nov 2001 08:16:25 -0000      1.22
--- forums.php  20 Jan 2002 03:37:07 -0000      1.23
***************
*** 25,41 ****
        $GLOBALS['phpgw']->template->set_block('_list','row');
  
!       $GLOBALS['phpgw']->db->query("select * from phpgw_forum_categories 
where id='$cat_id'",__LINE__,__FILE__);
        $GLOBALS['phpgw']->db->next_record();
  
!       $GLOBALS['phpgw']->template->set_var(array(
!               'BGROUND'        => $GLOBALS['phpgw_info']['theme']['th_bg'],
!               'IMG_URL_PREFIX' => PHPGW_IMAGES . '/',
!               'CATEGORY'       => $GLOBALS['phpgw']->db->f('name'),
!               'LANG_MAIN'      => lang('Forum'),
!               'MAIN_LINK'      => $GLOBALS['phpgw']->link('/forum/index.php')
!       ));
  
        $db2 = $GLOBALS['phpgw']->db;
!       $GLOBALS['phpgw']->db->query("select * from phpgw_forum_forums where 
cat_id='$cat_id'",__LINE__,__FILE__);
        if (! $GLOBALS['phpgw']->db->num_rows())
        {
--- 25,43 ----
        $GLOBALS['phpgw']->template->set_block('_list','row');
  
!       $GLOBALS['phpgw']->db->query("select * from phpgw_forum_categories 
where id='".$GLOBALS['cat_id']."'",__LINE__,__FILE__);
        $GLOBALS['phpgw']->db->next_record();
  
!       $GLOBALS['phpgw']->template->set_var(
!               Array(
!                       'BGROUND'        => 
$GLOBALS['phpgw_info']['theme']['th_bg'],
!                       'IMG_URL_PREFIX' => PHPGW_IMAGES . '/',
!                       'CATEGORY'       => $GLOBALS['phpgw']->db->f('name'),
!                       'LANG_MAIN'      => lang('Forum'),
!                       'MAIN_LINK'      => 
$GLOBALS['phpgw']->link('/forum/index.php')
!               )
!       );
  
        $db2 = $GLOBALS['phpgw']->db;
!       $GLOBALS['phpgw']->db->query("select * from phpgw_forum_forums where 
cat_id='".$GLOBALS['cat_id']."'",__LINE__,__FILE__);
        if (! $GLOBALS['phpgw']->db->num_rows())
        {
***************
*** 49,53 ****
                while ($GLOBALS['phpgw']->db->next_record())
                {
!                       $db2->query("select max(postdate) from 
phpgw_forum_threads where cat_id='$cat_id' and for_id='"
                                . $GLOBALS['phpgw']->db->f('id') . 
"'",__LINE__,__FILE__);
                        $db2->next_record();
--- 51,55 ----
                while ($GLOBALS['phpgw']->db->next_record())
                {
!                       $db2->query("select max(postdate) from 
phpgw_forum_threads where cat_id='".$GLOBALS['cat_id']."' and for_id='"
                                . $GLOBALS['phpgw']->db->f('id') . 
"'",__LINE__,__FILE__);
                        $db2->next_record();
***************
*** 62,66 ****
                        }
  
!                       $db2->query("select count(*) from phpgw_forum_threads 
where cat_id='$cat_id' and for_id='"
                                . $GLOBALS['phpgw']->db->f('id') . 
"'",__LINE__,__FILE__);
                        $db2->next_record();
--- 64,68 ----
                        }
  
!                       $db2->query("select count(*) from phpgw_forum_threads 
where cat_id='".$GLBOALS['cat_id']."' and for_id='"
                                . $GLOBALS['phpgw']->db->f('id') . 
"'",__LINE__,__FILE__);
                        $db2->next_record();
***************
*** 69,79 ****
  
                        
$GLOBALS['phpgw']->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
!                       $GLOBALS['phpgw']->template->set_var(array(
!                               NAME              => 
$GLOBALS['phpgw']->db->f('name'),
!                               DESC              => 
($GLOBALS['phpgw']->db->f('descr')?$GLOBALS['phpgw']->db->f('descr'):'&nbsp;'),
!                               THREADS_LINK      => 
$GLOBALS['phpgw']->link('/forum/threads.php' ,'forum_id=' . 
$GLOBALS['phpgw']->db->f('id')),
!                               'value_last_post' => $last_post_date,
!                               'value_total'     => $total
!                       ));
        
                        $GLOBALS['phpgw']->template->fp('rows','row',True);
--- 71,83 ----
  
                        
$GLOBALS['phpgw']->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
!                       $GLOBALS['phpgw']->template->set_var(
!                               Array(
!                                       'NAME'              => 
$GLOBALS['phpgw']->db->f('name'),
!                                       'DESC'              => 
($GLOBALS['phpgw']->db->f('descr')?$GLOBALS['phpgw']->db->f('descr'):'&nbsp;'),
!                                       'THREADS_LINK'      => 
$GLOBALS['phpgw']->link('/forum/threads.php' ,'forum_id=' . 
$GLOBALS['phpgw']->db->f('id')),
!                                       'value_last_post' => $last_post_date,
!                                       'value_total'     => $total
!                               )
!                       );
        
                        $GLOBALS['phpgw']->template->fp('rows','row',True);

Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/forum/index.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** index.php   18 Nov 2001 08:16:25 -0000      1.25
--- index.php   20 Jan 2002 03:37:07 -0000      1.26
***************
*** 13,67 ****
        /* $Id$ */
  
!       $GLOBALS['phpgw_info']['flags'] = array(
!               'currentapp'              => 'forum',
!               'enable_nextmatchs_class' => True
        );
-       include('../header.inc.php');
- 
-       $GLOBALS['phpgw']->template->set_file('INDEX' , 'index.body.tpl');
-       $GLOBALS['phpgw']->template->set_block('INDEX','CategoryForum','CatF');
- 
-       $db2 = $GLOBALS['phpgw']->db;
-       $GLOBALS['phpgw']->db->query("select * from 
phpgw_forum_categories",__LINE__,__FILE__);
-       $GLOBALS['phpgw']->template->set_var(array(
-               'IMG_URL_PREFIX' => PHPGW_IMAGES . '/',
-               'BGROUND'        => $GLOBALS['phpgw_info']['theme']['th_bg'],
-               'FORUM'          => lang('Forum')
-       ));
- 
-       while ($GLOBALS['phpgw']->db->next_record())
-       {
-               $db2->query("select max(postdate) from phpgw_forum_threads 
where cat_id='" . $GLOBALS['phpgw']->db->f('id')
-                       . "'",__LINE__,__FILE__);
-               $db2->next_record();
-               if ($db2->f(0))
-               {
-                       $last_post_date = 
$GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($db2->f(0)));
-               }
-               else
-               {
-                       $last_post_date = '&nbsp;';
-               }
  
!               $db2->query("select count(*) from phpgw_forum_threads where 
cat_id='" . $GLOBALS['phpgw']->db->f('id')
!                       . "'",__LINE__,__FILE__);
!               $db2->next_record();
!               $total = $db2->f(0);
! 
!               $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
!               $GLOBALS['phpgw']->template->set_var(array(
!                       'COLOR'           => $tr_color,
!                       'CAT'             => $GLOBALS['phpgw']->db->f('name'),
!                       'DESC'            => 
($GLOBALS['phpgw']->db->f('descr')?$GLOBALS['phpgw']->db->f('descr'):'&nbsp;'),
!                       'CAT_LINK'        => 
$GLOBALS['phpgw']->link('/forum/forums.php','cat_id=' .  
$GLOBALS['phpgw']->db->f('id')),
!                       'value_last_post' => $last_post_date,
!                       'value_total'     => $total
!               ));
!               $GLOBALS['phpgw']->template->parse('CatF','CategoryForum',true);
!       }
! 
!       $GLOBALS['phpgw']->template->parse('Out','INDEX');
!       $GLOBALS['phpgw']->template->p('Out');
  
!       $GLOBALS['phpgw']->common->phpgw_footer();
  ?>
--- 13,30 ----
        /* $Id$ */
  
!       $phpgw_flags = Array(
!               'currentapp'    =>      'forum',
!               'noheader'      =>      True,
!               'nonavbar'      =>      True,
!               'noappheader'   =>      True,
!               'noappfooter'   =>      True,
!               'nofooter'      =>      True
        );
  
!       $GLOBALS['phpgw_info']['flags'] = $phpgw_flags;
!       
!       include('../header.inc.php');
  
!       Header('Location: 
'.$GLOBALS['phpgw']->link('/index.php','menuaction=forum.uiforum.index'));
!       $GLOBALS['phpgw']->common->phpgw_exit();
  ?>

Index: read.php
===================================================================
RCS file: /cvsroot/phpgroupware/forum/read.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** read.php    18 Nov 2001 08:16:25 -0000      1.31
--- read.php    20 Jan 2002 03:37:07 -0000      1.32
***************
*** 52,57 ****
                }
  
!               $GLOBALS['phpgw']->db->query("insert into phpgw_forum_threads 
(pos,thread,depth,main,parent,cat_id,for_id,"
!                       . "thread_owner,subject,stat,n_replies) VALUES 
('$pos','$thread','$depth','"
                        . "$next_f_body_id','" . addslashes($msg) . "','" . 
$session_info['cat_id'] . "','"
                        . $session_info['forum_id'] . "','" . 
$GLOBALS['phpgw_info']['user']['account_id'] . "','"
--- 52,59 ----
                }
  
!               $postdate = time() - ((60 * 60) * 
intval($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']));
! 
!               $GLOBALS['phpgw']->db->query("insert into phpgw_forum_threads 
(pos,thread,depth,postdate,main,parent,cat_id,for_id,"
!                       . "thread_owner,subject,stat,n_replies) VALUES 
('$pos','$thread','$depth','".$GLOBALS['phpgw']->db->to_timestamp($postdate)."','"
                        . "$next_f_body_id','" . addslashes($msg) . "','" . 
$session_info['cat_id'] . "','"
                        . $session_info['forum_id'] . "','" . 
$GLOBALS['phpgw_info']['user']['account_id'] . "','"

Index: threads.php
===================================================================
RCS file: /cvsroot/phpgroupware/forum/threads.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** threads.php 8 Jan 2002 13:12:24 -0000       1.31
--- threads.php 20 Jan 2002 03:37:07 -0000      1.32
***************
*** 19,27 ****
        include('../header.inc.php');
  
!       $GLOBALS['phpgw']->db->query("select * from phpgw_forum_categories 
where id='" . $session_info['cat_id'] . "'");
        $GLOBALS['phpgw']->db->next_record();
        $category = $GLOBALS['phpgw']->db->f('name');
  
!       $GLOBALS['phpgw']->db->query("select * from phpgw_forum_forums where 
id='" . $session_info['forum_id'] . "'");
        $GLOBALS['phpgw']->db->next_record();
        $forums = $GLOBALS['phpgw']->db->f('name');
--- 19,27 ----
        include('../header.inc.php');
  
!       $GLOBALS['phpgw']->db->query("select * from phpgw_forum_categories 
where id='" . $GLOBALS['session_info']['cat_id'] . "'");
        $GLOBALS['phpgw']->db->next_record();
        $category = $GLOBALS['phpgw']->db->f('name');
  
!       $GLOBALS['phpgw']->db->query("select * from phpgw_forum_forums where 
id='" . $GLOBALS['session_info']['forum_id'] . "'");
        $GLOBALS['phpgw']->db->next_record();
        $forums = $GLOBALS['phpgw']->db->f('name');
***************
*** 44,52 ****
        ));
  
!       if ($session_info['view'] == 'collapsed')
        {
                
$GLOBALS['phpgw']->template->set_file('COLLAPSE','collapse.threads.tpl');
                
$GLOBALS['phpgw']->template->set_block('COLLAPSE','CollapseThreads','CollapseT');
!               $GLOBALS['phpgw']->db->query("select * from phpgw_forum_threads 
where cat_id='" . $session_info['cat_id'] . "' and for_id='" . 
$session_info['forum_id'] . "'"
                        . ' and parent = -1 order by postdate DESC');
  
--- 44,52 ----
        ));
  
!       if ($GLOBALS['session_info']['view'] == 'collapsed')
        {
                
$GLOBALS['phpgw']->template->set_file('COLLAPSE','collapse.threads.tpl');
                
$GLOBALS['phpgw']->template->set_block('COLLAPSE','CollapseThreads','CollapseT');
!               $GLOBALS['phpgw']->db->query("select * from phpgw_forum_threads 
where cat_id='" . $GLOBALS['session_info']['cat_id'] . "' and for_id='" . 
$GLOBALS['session_info']['forum_id'] . "'"
                        . ' and parent = -1 order by postdate DESC');
  
***************
*** 55,59 ****
                while ($GLOBALS['phpgw']->db->next_record())
                {
!                       $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
                        $subject = $GLOBALS['phpgw']->db->f('subject');
                        if (! $subject)
--- 55,59 ----
                while ($GLOBALS['phpgw']->db->next_record())
                {
!                       $GLOBALS['tr_color'] = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($GLOBALS['tr_color']);
                        $subject = $GLOBALS['phpgw']->db->f('subject');
                        if (! $subject)
***************
*** 63,67 ****
  
                        $GLOBALS['phpgw']->template->set_var(array(
!                               'COLOR'       => $tr_color,
                                'TOPIC'       => $subject,
                                'AUTHOR'      => 
($GLOBALS['phpgw']->db->f('thread_owner')?$GLOBALS['phpgw']->accounts->id2name($GLOBALS['phpgw']->db->f('thread_owner')):lang('Unknown')),
--- 63,67 ----
  
                        $GLOBALS['phpgw']->template->set_var(array(
!                               'COLOR'       => $GLOBALS['tr_color'],
                                'TOPIC'       => $subject,
                                'AUTHOR'      => 
($GLOBALS['phpgw']->db->f('thread_owner')?$GLOBALS['phpgw']->accounts->id2name($GLOBALS['phpgw']->db->f('thread_owner')):lang('Unknown')),
***************
*** 92,107 ****
                while($GLOBALS['phpgw']->db->next_record())
                {
!                       $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
                        $move = '';
!                       //$move = '<img 
src="'.$GLOBALS['phpgw_info']['server']['app_images'] . '/trans.gif"';
                        for($tmp = 1;$tmp <= $GLOBALS['phpgw']->db->f('depth'); 
$tmp++)
                        /* if($tmp==1)
                        {
!                               $move .= '<img 
src="'.$GLOBALS['phpgw_info']['server']['app_images'] . '/n.gif"';
                        }
                        */
                        $move .= '&nbsp;&nbsp;';
                        //putting some images point like <li></li>
!                       $move .= '<img src="'. PHPGW_IMAGES . '/n.gif">';
                        $move .= '&nbsp;&nbsp;';
                        $subject = $GLOBALS['phpgw']->db->f('subject');
--- 92,107 ----
                while($GLOBALS['phpgw']->db->next_record())
                {
!                       $GLOBALS['tr_color'] = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($GLOBALS['tr_color']);
                        $move = '';
!                       //$move = '<img 
src="'.$GLOBALS['phpgw']->common->image($GLOBALS['phpgw_info']['server']['currentapp'],'trans').'"';
                        for($tmp = 1;$tmp <= $GLOBALS['phpgw']->db->f('depth'); 
$tmp++)
                        /* if($tmp==1)
                        {
!                               $move .= '<img 
src="'.$GLOBALS['phpgw']->common->image($GLOBALS['phpgw_info']['server']['currentapp'],'n').'"';
                        }
                        */
                        $move .= '&nbsp;&nbsp;';
                        //putting some images point like <li></li>
!                       $move .= '<img 
src="'.$GLOBALS['phpgw']->common->image($GLOBALS['phpgw_info']['server']['currentapp'],'n').'">';
                        $move .= '&nbsp;&nbsp;';
                        $subject = $GLOBALS['phpgw']->db->f('subject');




reply via email to

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