- }
-
- /** displays children tree of a post
- * @param $_id INTEGER MSGNUM of post
- * @param $_index INTEGER linear number of post in the tree
- * @param $_first INTEGER linear number of first post displayed
- * @param $_last INTEGER linear number of last post displayed
- * @param $_ref STRING MSGNUM of current post
- * @param $_pfx_node STRING prefix used for current node
- * @param $_pfx_end STRING prefix used for children of current node
- * @param $_head BOOLEAN true if first post in thread
- */
-
- function disp_desc($_id,$_index="",$_first=0,$_last=0,$_ref="",
- $_pfx_node="", $_pfx_end="",$_head=true) {
- global $css;
- $debug = false;
- $spfx_f = '<img src="img/k1.gif" height="21" width="9" alt="o" />';
- $spfx_n = '<img src="img/k2.gif" height="21" width="9" alt="*" />';
- $spfx_Tnd = '<img src="img/T-direct.gif" height="21" width="12" alt="+" />';
- $spfx_Lnd = '<img src="img/L-direct.gif" height="21" width="12" alt="`" />';
- $spfx_snd = '<img src="img/s-direct.gif" height="21" width="5" alt="-" />';
- $spfx_T = '<img src="img/T.gif" height="21" width="12" alt="+" />';
- $spfx_L = '<img src="img/L.gif" height="21" width="12" alt="`" />';
- $spfx_s = '<img src="img/s.gif" height="21" width="5" alt="-" />';
- $spfx_e = '<img src="img/e.gif" height="21" width="12" alt=" " />';
- $spfx_I = '<img src="img/I.gif" height="21" width="12"alt="|" />';
-
- if ($_index == "") $_index = $this->getndx($_id);
-
- if (!sizeof($this->overview[$_id]->children) && ($_index<=$_last)
- && ($_index>=$_first)) {
- echo '<tr class="'.($_index%2?$css["pair"]:$css["impair"])."\">\n";
- echo "<td class=\"{$css['date']}\">"
- .formatSpoolHeader("date",$this->overview[$_id]->date,$_id,
- $this->group,($_index==$_ref),$this->overview[$_id]->isread)
- ." </td>\n";
- echo "<td class=\"{$css['subject']}\"><div class=\"{$css['tree']}\">"
- .$_pfx_node.($_head?$spfx_f:
- ($this->overview[$_id]->parent_direct?$spfx_s:$spfx_snd))
- ."</div>"
- .formatSpoolHeader("subject",$this->overview[$_id]->subject,$_id,
- $this->group,($_index==$_ref),$this->overview[$_id]->isread)
- .($debug?" $_id $_index ".
- $this->overview[$_id]->desc." ".$this->overview[$_id]->descunread." ":"")." </td>\n";
- echo "<td class=\"{$css['author']}\">"
- .formatSpoolHeader("from",$this->overview[$_id]->from,$_id,
- $this->group,($_index==$_ref),$this->overview[$_id]->isread)
- ." </td>\n</tr>";
- return true;
- }
- $children = $this->overview[$_id]->children;
- if (($_index<=$_last) && ($_index>=$_first)) {
- echo '<tr class="'.($_index%2?$css["pair"]:$css["impair"])."\">\n";
- echo "<td class=\"{$css['date']}\">"
- .formatSpoolHeader("date",$this->overview[$_id]->date,$_id,
- $this->group,($_index==$_ref),$this->overview[$_id]->isread)
- ." </td>\n";
- echo "<td class=\"{$css['subject']}\"><div class=\"{$css['tree']}\">"
- .$_pfx_node.$spfx_n."</div>"
- .formatSpoolHeader("subject",$this->overview[$_id]->subject,$_id,
- $this->group,($_index==$_ref),$this->overview[$_id]->isread)
- .($debug?" $_id $_index ".
- $this->overview[$_id]->desc." ".$this->overview[$_id]->descunread." ":"")." </td>\n";
- echo "<td class=\"{$css['author']}\">"
- .formatSpoolHeader("from",$this->overview[$_id]->from,$_id,
- $this->group,($_index==$_ref),$this->overview[$_id]->isread)
- ." </td>\n</tr>";
+
+ /** displays children tree of a post
+ * @param $_id INTEGER MSGNUM of post
+ * @param $_index INTEGER linear number of post in the tree
+ * @param $_first INTEGER linear number of first post displayed
+ * @param $_last INTEGER linear number of last post displayed
+ * @param $_ref STRING MSGNUM of current post
+ * @param $_pfx_node STRING prefix used for current node
+ * @param $_pfx_end STRING prefix used for children of current node
+ * @param $_head BOOLEAN true if first post in thread
+ */
+
+ function _disp_desc($_id, $_index, $_first=0, $_last=0, $_ref="", $_pfx_node="", $_pfx_end="", $_head=true) {
+ global $css;
+ $spfx_f = '<img src="img/k1.gif" height="21" width="9" alt="o" />';
+ $spfx_n = '<img src="img/k2.gif" height="21" width="9" alt="*" />';
+ $spfx_Tnd = '<img src="img/T-direct.gif" height="21" width="12" alt="+" />';
+ $spfx_Lnd = '<img src="img/L-direct.gif" height="21" width="12" alt="`" />';
+ $spfx_snd = '<img src="img/s-direct.gif" height="21" width="5" alt="-" />';
+ $spfx_T = '<img src="img/T.gif" height="21" width="12" alt="+" />';
+ $spfx_L = '<img src="img/L.gif" height="21" width="12" alt="`" />';
+ $spfx_s = '<img src="img/s.gif" height="21" width="5" alt="-" />';
+ $spfx_e = '<img src="img/e.gif" height="21" width="12" alt=" " />';
+ $spfx_I = '<img src="img/I.gif" height="21" width="12"alt="|" />';
+
+ if ($_index + $this->overview[$_id]->desc < $_first || $_index > $_last) {
+ return;
+ }
+
+ if ($_index>=$_first) {
+ $us = ($_index == $_ref);
+ $hc = empty($this->overview[$_id]->children);
+
+ echo '<tr class="'.($_index%2?$css["pair"]:$css["impair"]).($this->overview[$_id]->isread?'':' new')."\">\n";
+ echo "<td class=\"{$css['date']}\">".fancyDate($this->overview[$_id]->date)." </td>\n";
+ echo "<td class=\"{$css['subject']}\">"
+ ."<div class=\"{$css['tree']}\">$_pfx_node".($hc?($_head?$spfx_f:($this->overview[$_id]->parent_direct?$spfx_s:$spfx_snd)):$spfx_n)
+ ."</div>";
+ if ($_index == $_ref) {
+ echo '<span class="isref">'.htmlentities($this->overview[$_id]->subject).'</span>';
+ } else {
+ echo "<a href='article.php?group={$this->group}&id=$_id'>".htmlentities($this->overview[$_id]->subject).'</a>';
+ }
+ echo "</td>\n<td class=\"{$css['author']}\">".formatFrom($this->overview[$_id]->from)."</td>\n</tr>";
+
+ if ($hc) { return; }
+ }
+
+ $_index ++;
+
+ $children = $this->overview[$_id]->children;
+ while ($child = array_shift($children)) {
+ if ($_index > $_last) { return; }
+ if ($_index+$this->overview[$child]->desc >= $_first) {
+ if (sizeof($children)) {
+ $this->_disp_desc($child, $_index, $_first, $_last, $_ref,
+ $_pfx_end.($this->overview[$child]->parent_direct?$spfx_T:$spfx_Tnd),
+ $_pfx_end.$spfx_I, false);
+ } else {
+ $this->_disp_desc($child, $_index, $_first, $_last, $_ref,
+ $_pfx_end.($this->overview[$child]->parent_direct?$spfx_L:$spfx_Lnd),
+ $_pfx_end.$spfx_e, false);
+ }
+ }
+ $_index += $this->overview[$child]->desc;
+ }