Location: PHPKode > projects > CsWebmail > cswebmail-3.10/cswebmail-3.10/templates/ReadMail_presentation.php
<?if(VALID_DOCUMENT != 1) die('what?');?>

<script type="text/javascript" src="./scripts/jquery.image.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $('img.enlarge').enlarge({loading_image:'images/loading.gif'});
});
</script>

<table class="content w100">
<tr><td class="small">
back to 
<a href="<?=$_SERVER['PHP_SELF']?>?action=show-folder&mailbox=<?=$this->mailbox_name?>&return=ok">
<?=$this->mailbox_name_print?>
</a>
&nbsp;&nbsp;&nbsp;
( message &#8470; <?=$this->key?> of <?=$this->_mailbox->num_msgs?>)
</td></tr>

<tr><th class="left title">
<?=$this->header->subject_print()?>
</th></tr>

<tr>
  <td style="padding:4px;">
  <div id="small_details_div">
  <div class="small">
  <?=$this->header->date_print(false)?>
  <?if(time()-$this->header->date<10800){?>(<?=$this->header->human_date_print()?>)<?}?>
  </div>
  <b title="<?=$this->header->from_print(true)?>"><?=$this->header->from_print(false)?></b>
  to
  <?=$this->header->get_all_recepients_presentation()?>
  <?if($this->ifnntp){?>
  </br><?=$this->header->newsgroups?> (newsgroup)
  <?}?>
  &nbsp;&nbsp;
  <a onclick="document.getElementById('small_details_div').style.display='none';document.getElementById('more_details_div').style.display='block';" class="small">more details</a>
  </div>
  <div id="more_details_div" style="display:none;">
  <table>
  <tr><td class="bold right">Subject:</td><td><?=$this->header->subject_print()?></td></tr>
  <tr><td class="bold right">Date:</td><td><?=$this->header->date_print(true)?></td></tr>
  <tr><td class="bold right">From:</td><td><?=$this->header->from_print(true)?></td></tr>
  <?if($this->header->to_count){?>
  <tr><td class="bold right">To:</td><td><?=$this->header->get_tos_presentation(true)?></td></tr>
  <?}?>
  <?if($this->header->cc_count){?>
  <tr><td class="bold right">Cc:</td><td><?=$this->header->get_ccs_presentation(true)?></td></tr>
  <?}?>
  <?if($this->header->bcc_count){?>
  <tr><td class="bold right">Bcc:</td><td><?=$this->header->get_bccs_presentation(true)?></td></tr>
  <?}?>
  </table>
  <a onclick="document.getElementById('small_details_div').style.display='block';document.getElementById('more_details_div').style.display='none';" class="small">hide details</a>
  </div>
  
  </td>
</tr>

<tr>
   <td class="small">
<script type="text/javascript">
function setLabelByCheckbox(form,chk,label){
  if(chk.checked){
    form['action'].value = "set-label";
  }
  else{
    form['action'].value = "remove-label";
  }
  form['label'].value = label;
  form.submit();
}
</script>
<form action="<?=$_SERVER['PHP_SELF']?>" method="get">
<input type="hidden" name="action">
<input type="hidden" name="mailbox" value="<?=$this->mailbox_name?>">
<input type="hidden" name="mailkey" value="<?=$this->key?>">
<input type="hidden" name="key" value="<?=$this->key?>">
<input type="hidden" name="label">
<?foreach($_SESSION['labels']->get_labels() as $k=>$v){?>
<input type="checkbox" <?=(in_array($k,$this->header->labels)?'checked':'')?> onclick="setLabelByCheckbox(this.form,this,'<?=$k?>');"/>
<span style="color: <?=$v['color']?>"><?=$v['name']?></span>
&nbsp;
<?}?>
</form>
</td>
</tr>
<tr><td>
 <a onclick="d=document.getElementById('full_header_div');d.style.display=(d.style.display=='block'?'none':'block');"><img src="./images/triangle_down.gif" alt=""/> toggle full header</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a onclick="small_window('<?=$_SERVER['PHP_SELF']?>?action=show-mail-printable&mailbox=<?=$this->mailbox_name?>&mailkey=<?=$this->key?>','print_window',500,400);"><img src="images/printable.gif" alt="print"/>print</a>

<pre class="mail-full-header" id="full_header_div" style="display:none;">
<?=preg_replace("/\n([^:\n]+):/",'<b>$1</b>:',match_links(htmlspecialchars($this->get_full_mail_header())))?>
</pre>
</td></tr>

<tr><td class="checked">
<?$this->print_controls_table()?>
</td></tr>

<?
  $first_time=true;
  $attachments_count=0;
  foreach($this->parts as $index=>$part){
    if($part->if_printable()){?>
<tr><td>
<?if($first_time){$first_time=false;}?>
<?=$part->get_presentation($this->mailbox_name,$this->key)?>
</td></tr>                                                         
       <?}
    else if($part->if_attachment() && !$part->if_text_multipart())
        $attachments_count++;
  }?>
  
<?if($attachments_count>0){?>
<tr><td>
<?reset($this->parts);
  foreach($this->parts as $index=>$part){if($part->if_attachment()){?>
<?=$part->get_presentation($this->mailbox_name,$this->key)?>
<?}}?>
</td></tr>
<?}?>

<?if($attachments_count>2){?>
<tr><td>
<a href="<?=$_SERVER['PHP_SELF']?>?action=get-all-parts&mailbox=<?=$this->mailbox_name?>&mailkey=<?=$this->key?>">
<img src="./images/mime-type/zip.gif" alt="ZIP"/>  Download all attachments as zip
</a>
</td></tr>
<?}?>


<?if(isset($this->thread) && $this->thread->has_thread()){?>
<tr><td class="checked left">
Related E-mails
</td></tr>
<tr><td>
<?=$this->thread->get_presentation()?>
</td></tr>
<?}?>

</table>

<?if($_SESSION['preferences']->getUseDispositionNotification() &&
     $this->header->is_unseen &&
     $this->header->notification != ''){?>
<script type="text/javascript">
if(confirm(<?=js_string('Are you want to notify "'.$this->header->get_from_address().'"'.
                        "\nabout reading this email?")?>)){
  webmail_request('compose-notify',
                  'mailbox=<?=$this->mailbox_name?>&mailkey=<?=$this->key?>',
                  setNotice);
}
</script>
<?}?>
Return current item: CsWebmail