message_part_row.inc
上传用户:xiao730204
上传日期:2007-01-04
资源大小:141k
文件大小:2k
源码类别:

WEB邮件程序

开发平台:

PHP

  1. <?php
  2. $body_types = Array(
  3.       0        => 'Text',
  4.       1        => 'multiple part',
  5.       2        => 'encapsulated message',
  6.       3        => 'application data',
  7.       4        => 'audio',
  8.       5        => 'static image',
  9.       6        => 'video',
  10.       7        => 'model',
  11.       8        => 'unknown',
  12.       15       => 'MAX TYPE',
  13.       ''       => 'Text'
  14. );
  15. $struct_item_type = '';
  16. $struct_item_type = $body_types[ $struct_item->type ];
  17. $struct_file_name = '';
  18. if ( is_array( $struct_item->parameters ) ) {
  19.    for( $x = 0; $x < count( $struct_item->paramaters ); $x++ ) {
  20.       $cur_param = $struct_item->parameters[ $x ];
  21.       if ( $cur_param->attribute == 'NAME' ) {
  22.             if ( $struct_item->description != '' ) {
  23.                $struct_item->description .= ' - ';
  24.             }
  25.             $struct_file_name = basename( $cur_param->value );
  26.             $struct_item->description .= $cur_param->value;
  27.       }
  28.    }
  29. }
  30. if ( $struct_item->description == '' ) {
  31.    $struct_item->description = '&nbsp;';
  32. }
  33. $filesize_obj = new FileSizeObject();
  34. $struct_item_size = '';
  35. if ( $bytes == '' ) {
  36.    $struct_item_size = $filesize_obj->FormatFileSize(
  37.       $struct_item->bytes
  38.    );
  39. }
  40. $view_url = '';
  41. if ( $struct_item->type != 0 ) {
  42.    $url_util = new UrlObject();
  43.    $view_url = 
  44.       '&nbsp;<A Href="' . 
  45.       $url_util->PostUrl(
  46.          $default->base_url,
  47.          Array(
  48.             'session_id'        => $session_id,
  49.             'form_mode'         => PIMP_MAIL_READ_ATTATCHMENT,
  50.             'message_id'        => $message_id,
  51.             'message_part'      => $i + 1
  52.          )
  53.       ) . '">( Download )</A>';
  54. }
  55. ?>
  56. <tr <?php echo $template_obj->GetValue( 'default_bgcolor' ); ?>>
  57.    <td><?php $template_obj->GetValue( 'default_font' ); ?>
  58. <?php echo $struct_item_type; ?></td>
  59.    <td><?php $template_obj->GetValue( 'default_font' ); ?>
  60. <?php echo $struct_item->description; echo $view_url; ?></td>
  61.    <td><?php $template_obj->GetValue( 'default_font' ); ?>
  62. <?php echo $struct_item_size; ?></td>
  63. </tr>