phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: forum/inc class.boforum.inc.php,1.1,1.2 class.so


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: forum/inc class.boforum.inc.php,1.1,1.2 class.soforum.inc.php,1.1,1.2 class.uiforum.inc.php,1.1,1.2 functions.inc.php,1.13,1.14
Date: Sat, 19 Jan 2002 22:37:10 -0500

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

Modified Files:
        functions.inc.php 
Added Files:
        class.boforum.inc.php class.soforum.inc.php 
        class.uiforum.inc.php 
Log Message:
.




Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/forum/inc/functions.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** functions.inc.php   3 Oct 2001 00:03:18 -0000       1.13
--- functions.inc.php   20 Jan 2002 03:37:07 -0000      1.14
***************
*** 14,45 ****
  
        // Keep track of what they are doing
!       $session_info = $phpgw->session->appsession('session_data','forum');
!       if (! is_array($session_info))
!       {
!               $session_info = array(
!                       'view'     => 
$phpgw_info['user']['preferences']['forum']['default_view'],
!                       'location' => '',               // Not used ... yet
!                       'cat_id'   => $cat_id,
!                       'forum_id' => $forum_id
!               );
!       }
! 
!       if ($view)
!       {
!               $session_info['view'] = $view;
!       }
  
!       if ($cat_id)
!       {
!               $session_info['cat_id'] = $cat_id;
!       }
  
!       if ($forum_id)
        {
!               $session_info['forum_id'] = $forum_id;
        }
  
  
!       $phpgw->session->appsession('session_data','forum',$session_info);
  
  
--- 14,37 ----
  
        // Keep track of what they are doing
!       $GLOBALS['session_info'] = 
$GLOBALS['phpgw']->session->appsession('session_data','forum');
  
!       $GLOBALS['cat_id'] = 
(@$GLOBALS['HTTP_GET_VARS']['cat_id'address@hidden'HTTP_GET_VARS']['cat_id']:$GLOBALS['session_info']['cat_id']);
!       $GLOBALS['forum_id'] = 
(@$GLOBALS['HTTP_GET_VARS']['forum_id'address@hidden'HTTP_GET_VARS']['forum_id']:$GLOBALS['session_info']['forum_id']);
!       
  
!       if (!is_array($GLOBALS['session_info']))
        {
!               $GLOBALS['session_info'] = array(
!                       'view'     => 
$GLOBALS['phpgw_info']['user']['preferences']['forum']['default_view'],
!                       'location' => '',               // Not used ... yet
!                       'cat_id'   => ($GLOBALS['cat_id']       
?$GLOBALS['cat_id']     :''),
!                       'forum_id' => ($GLOBALS['forum_id']     
?$GLOBALS['forum_id']   :'')
!               );
        }
  
+       $GLOBALS['session_info']['cat_id'] = $GLOBALS['cat_id'];
+       $GLOBALS['session_info']['forum_id'] = $GLOBALS['forum_id'];
  
!       
$GLOBALS['phpgw']->session->appsession('session_data','forum',$GLOBALS['session_info']);
  
  
***************
*** 53,113 ****
  //         message with little different color ($phpgw_info["theme"]["bg05"])
  //
! function showthread ($cat) {
!     global $phpgw, $phpgw_info, $tr_color;
! 
!     while($phpgw->db->next_record()) {
!       $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
! 
!       if($phpgw->db->f("id") == $current) $tr_color = 
$phpgw_info["theme"]["bg05"];
!       echo "<tr bgcolor=\"$tr_color\">";
! 
!       $move = "";
!       for($tmp = 1;$tmp <= $phpgw->db->f("depth"); $tmp++)
!           $move .= "&nbsp;&nbsp;";
! 
!       $pos = $phpgw->db->f("pos");
!       $cat = $phpgw->db->f("cat_id");
!       $for = $phpgw->db->f("for_id");
!       $subject = $phpgw->db->f("subject");
!       if (! $subject) {
!          $subject = "[ No subject ]";
!       }
!       echo "<td>" . $move . "<a href=" . 
$phpgw->link("read.php","cat=$cat&for=$for&pos=$pos&col=1&msg=" . 
$phpgw->db->f("id")) .">"
!          . $subject . "</a></td>\n";
! 
!       echo "<td align=left valign=top>" . 
($phpgw->db->f('thread_owner')?$phpgw->accounts->id2name($phpgw->db->f('thread_owner')):lang('Unknown'))
 ."</td>\n";
!       echo "<td align=left valign=top>" . 
$phpgw->common->show_date($phpgw->db->from_timestamp($phpgw->db->f('postdate')))
 ."</td>\n";
  
!       if($debug) echo "<td>" . $phpgw->db->f("id")." " . 
$phpgw->db->f("parent") ." "
!                     . $phpgw->db->f("depth") ." " . $phpgw->db->f("pos") 
."</td>";
  
!     }
  }
  
! 
! function show_topics($cat,$for) {
! 
!     global $phpgw, $phpgw_info, $tr_color;
! 
!     while($phpgw->db->next_record())
!     {
!       $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
!       echo "<tr bgcolor=\"$tr_color\">";
!       $subject = $phpgw->db->f("subject");
!       if (! $subject) {
!          $subject = "[ No subject ]";
!       }
!       echo "<td><a href=" . 
$phpgw->link("read.php","cat=$cat&for=$for&msg=$msg" . $phpgw->db->f("id")) 
.">" . $subject . "</a></td>\n";
!       $lastreply = $phpgw->db->f("postdate");
!       echo "<td align=left valign=top>" . 
($phpgw->db->f('thread_owner')?$phpgw->accounts->id2name($phpgw->db->f('thread_owner')):lang('Unknown'))
 . "</td>\n";
!       $msgid = $phpgw->db->f("id");
!       $mainid = $phpgw->db->f("main");
! 
!       echo "<td align=left valign=top>" . $phpgw->db->f("n_replies") . 
"</td>\n";
!       echo "<td align=left valign=top>$lastreply</td>\n";
!     }
! 
!   echo "</tr>\n";
! 
  }
  
--- 45,106 ----
  //         message with little different color ($phpgw_info["theme"]["bg05"])
  //
! function showthread ($cat)
! {
!       while($GLOBALS['phpgw']->db->next_record())
!       {
!               $GLOBALS['tr_color'] = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($GLOBALS['tr_color']);
  
!               if($GLOBALS['phpgw']->db->f('id') == $current) 
$GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['bg05'];
!               echo '<tr bgcolor="'.$GLOBALS['tr_color'].'">';
  
!               $move = '';
!               for($tmp = 1;$tmp <= $GLOBALS['phpgw']->db->f('depth'); $tmp++)
!               {
!                       $move .= '&nbsp;&nbsp;';
!               }
! 
!               $pos = $GLOBALS['phpgw']->db->f('pos');
!               $cat = $GLOBALS['phpgw']->db->f('cat_id');
!               $for = $GLOBALS['phpgw']->db->f('for_id');
!               $subject = $GLOBALS['phpgw']->db->f('subject');
!               if (! $subject)
!               {
!                       $subject = '[ No subject ]';
!               }
!               echo '<td>' . $move . '<a href="' . 
$GLOBALS['phpgw']->link('/forum/read.php',"cat=$cat&for=$for&pos=$pos&col=1&msg="
 . $GLOBALS['phpgw']->db->f('id')) .">"
!                       . $subject . '</a></td>'."\n";
! 
!               echo '<td align="left" valign="top">' . 
($GLOBALS['phpgw']->db->f('thread_owner')?$GLOBALS['phpgw']->accounts->id2name($GLOBALS['phpgw']->db->f('thread_owner')):lang('Unknown'))
 .'</td>'."\n";
!               echo '<td align="left" valign="top">' . 
$GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($GLOBALS['phpgw']->db->f('postdate')))
 .'</td>'."\n";
! 
!               if($debug)
!               {
!                       echo '<td>' . $GLOBALS['phpgw']->db->f('id')." " . 
$GLOBALS['phpgw']->db->f('parent') .' '
!                               . $GLOBALS['phpgw']->db->f('depth') .' ' . 
$GLOBALS['phpgw']->db->f('pos') .'</td>';
!               }
!       }
  }
  
! function show_topics($cat,$for)
! {
!       while($GLOBALS['phpgw']->db->next_record())
!       {
!               $GLOBALS['tr_color'] = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($GLOBALS['tr_color']);
!               echo '<tr bgcolor="'.$GLOBALS['tr_color'].'">';
!               $subject = $GLOBALS['phpgw']->db->f('subject');
!               if (! $subject)
!               {
!                       $subject = '[ No subject ]';
!               }
!               echo '<td><a 
href="'.$GLOBALS['phpgw']->link('read.php','cat='.$cat.'&for='.$for.'&msg='.$msg.$phpgw->db->f('id')).'>'.$subject.'</a></td>'."\n";
!               $lastreply = $GLOBALS['phpgw']->db->f('postdate');
!               echo '<td align="left" valign="top">' . 
($GLOBALS['phpgw']->db->f('thread_owner')?$GLOBALS['phpgw']->accounts->id2name($GLOBALS['phpgw']->db->f('thread_owner')):lang('Unknown'))
 . '</td>'."\n";
!               $msgid = $GLOBALS['phpgw']->db->f('id');
!               $mainid = $GLOBALS['phpgw']->db->f('main');
! 
!               echo '<td align="left" valign="top">' . 
$GLOBALS['phpgw']->db->f('n_replies') . '</td>'."\n";
!               echo '<td align="left" valign="top">'.$lastreply.'</td>'."\n";
!               echo '</tr>'."\n";
!       }
  }
  




reply via email to

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