<?
 
 if ($bn_action == "view") {
  if ($v=="t") {
    // threaded mode
    $view_mode_link = "<a href=\"view.$ext?bn=$bn&key=$thread&v=f\">".LABEL_FLAT_VIEW."</a>";
  } else {
    // flat mode => change template
	$view_mode_link = "<a href=\"view.$ext?bn=$bn&key=$thread&v=t\">".LABEL_THREADED_VIEW."</a>";
    $bn_view_header = "";
    $bn_view_even_first_line = ""; 
    $bn_view_odd_first_line = "";
    $bn_view_even_line = "<br><table width=\"100%\" cellspacing=1 cellpadding=3 border=0 class=list>\n <tr class=column>\n  <td><img src=\"\$icon_dir/\$icon\" align=absmiddle\" border=0 width=15 height=15> \$subject</td>\n </tr>\n <tr class=light_row>\n  <td valign=\"TOP\" class=message>\n   \$GLOBALS[column_author]:&nbsp;<a href=\"\$show_profile_url\">\$userid</a>&nbsp;(\$ip)<br>\n\$label_posted:&nbsp;&nbsp;&nbsp;\$formated_date<br>\n\$att_list_form<br>\n\$body\n     \n<br>\$attachments\n   </td>\n </tr>\n</table>\n\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" border=\"0\">\n <tr>\n  <td valign=\"TOP\" width=100%>\n   <a href=\"\$reply_url\">\$reply_link</a>&nbsp;|&nbsp;\$edit_link&nbsp;|&nbsp;\$delete_link</td></tr>\n</table>\n";
    $bn_view_odd_line = $bn_view_even_line; 
    $bn_view_footer = "";
  }

/*
  $att = $db->getAttachments($bn_db, $key);
  if (is_array($att)) {
	for ($i=0; $i<count($att); $i++) {
	  if ($i==0) {
        $tmp = ($att>1) ? "Attachments:" : "Attachment:"; 	  	
	  } else {
	  	$tmp = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
        $tmp .= ($att>1) ? "&nbsp;" : ""; 	  	
	  }

	  $s = pretty_size($att[$i]["att_size"]);
      $n = $att[$i]["att_name"];
      $u = "getfile.$ext?bn=$bn&key=$key&att_id=".$att[$i]["att_id"];
      $att_string .= "$tmp <a href=\"$u\">$n</a> ($s}<br>";
	}
  }
*/

}
if ($bn_action == "list") {
  // Expand-Collapse
  if ($expnd == "all") {
    $exp_col = "<a href=\"$list_url&expnd=none\">" . LABEL_COLLAPSE_THREAD . "</a>";
  } else {
    $exp_col = "<a href=\"$list_url&expnd=all\">" . LABEL_EXPAND_THREAD . "</a>";
  }
}

?>
