<?if(VALID_DOCUMENT != 1) die('what?');?>
<input type="hidden" name="mailbox" value="<?=$this->name?>"/>
<input type="hidden" name="sort_order" value="<?=$this->sort_order?>"/>
<?if($this->is_pages){?>
<input type="hidden" name="start_page" value="<?=$this->current_page?>"/>
<?}?>
<col width="20px">
<col width="*">
<col width="*">
<col width="20%">
<col width="*">
<col width="45%">
<tr><th class="title" colspan="6"><?=$this->name?></th></tr>
<?if($this->count > 0){
$this->print_pages_row();
if($this->count > 15)
$this->print_controls_row(false);
?>
<tr>
<th class="center"> </th>
<th class="left">
<a href="<?=$_SERVER['PHP_SELF']?>?action=show-folder&mailbox=<?=$this->name?>&sort_order=<?=SORT_BY_NUMBER?>&start_page=<?=$this->current_page?>" <?=$this->sort_order==SORT_BY_NUMBER?'class="disabled"':''?>>#</a>
</th>
<th class="left">
<a href="<?=$_SERVER['PHP_SELF']?>?action=show-folder&mailbox=<?=$this->name?>&sort_order=<?=SORT_BY_DATE?>&start_page=<?=$this->current_page?>" <?=$this->sort_order==SORT_BY_DATE?'class="disabled"':''?>>Date</a>
</th>
<th class="left">
<a href="<?=$_SERVER['PHP_SELF']?>?action=show-folder&mailbox=<?=$this->name?>&sort_order=<?=SORT_BY_FROM?>&start_page=<?=$this->current_page?>" <?=$this->sort_order==SORT_BY_FROM?'class="disabled"':''?>>From</a>
</th>
<th class="left">
<a href="<?=$_SERVER['PHP_SELF']?>?action=show-folder&mailbox=<?=$this->name?>&sort_order=<?=SORT_BY_SIZE?>&start_page=<?=$this->current_page?>" <?=$this->sort_order==SORT_BY_SIZE?'class="disabled"':''?>>Size</a>
</th>
<th class="left">
<a href="<?=$_SERVER['PHP_SELF']?>?action=show-folder&mailbox=<?=$this->name?>&sort_order=<?=SORT_BY_SUBJECT?>&start_page=<?=$this->current_page?>" <?=$this->sort_order==SORT_BY_SUBJECT?'class="disabled"':''?>>Subject</a>
</th>
</tr>
<?
if(is_array($this->headers)){
if($this->view == 'thread'){
$this->init_threads();
foreach($this->threads as $tkey=>$thread){
$first=false;
foreach($thread as $header){
if($this->threads_count[$tkey] == 1)
$header->print_table_row();
else
$header->print_thread_table_row($first,$this->threads_count[$tkey]);
if(!$first){
$first=$header->key;
}
}
}
}
else{
foreach($this->headers as $header){
$header->print_table_row();
}
}
}
$this->print_controls_row();
$this->print_pages_row();
}
else{?>
<tr><td class="center" colspan="6"><h2>Empty</h2></td></tr>
<?}?>