- }
-
- /** 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) {
- $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_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?"pair":"impair")."\">\n";
- echo "<td class=\"date\">"
- .formatSpoolHeader("date",$this->overview[$_id]->date,$_id,
- $this->group,($_index==$_ref),$this->overview[$_id]->isread)
- ." </td>\n";
- echo "<td class=\"subject\"><div class=\"tree\">"
- .$_pfx_node.($_head?$spfx_f:$spfx_s)."</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=\"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?"pair":"impair")."\">\n";
- echo "<td class=\"date\">"
- .formatSpoolHeader("date",$this->overview[$_id]->date,$_id,
- $this->group,($_index==$_ref),$this->overview[$_id]->isread)
- ." </td>\n";
- echo "<td class=\"subject\"><div class=\"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=\"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;
+ $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>";
+ }
+ $index=$_index+1;
+ while ($child = array_shift($children)) {
+ if (($index+$this->overview[$child]->desc-1>=$_first)
+ ||($index<$_last)){
+ 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;
+ }