message_part_row.inc
上传用户:xiao730204
上传日期:2007-01-04
资源大小:141k
文件大小:2k
- <?php
- $body_types = Array(
- 0 => 'Text',
- 1 => 'multiple part',
- 2 => 'encapsulated message',
- 3 => 'application data',
- 4 => 'audio',
- 5 => 'static image',
- 6 => 'video',
- 7 => 'model',
- 8 => 'unknown',
- 15 => 'MAX TYPE',
- '' => 'Text'
- );
- $struct_item_type = '';
- $struct_item_type = $body_types[ $struct_item->type ];
- $struct_file_name = '';
- if ( is_array( $struct_item->parameters ) ) {
- for( $x = 0; $x < count( $struct_item->paramaters ); $x++ ) {
- $cur_param = $struct_item->parameters[ $x ];
- if ( $cur_param->attribute == 'NAME' ) {
- if ( $struct_item->description != '' ) {
- $struct_item->description .= ' - ';
- }
- $struct_file_name = basename( $cur_param->value );
- $struct_item->description .= $cur_param->value;
- }
- }
- }
- if ( $struct_item->description == '' ) {
- $struct_item->description = ' ';
- }
- $filesize_obj = new FileSizeObject();
- $struct_item_size = '';
- if ( $bytes == '' ) {
- $struct_item_size = $filesize_obj->FormatFileSize(
- $struct_item->bytes
- );
- }
- $view_url = '';
- if ( $struct_item->type != 0 ) {
- $url_util = new UrlObject();
- $view_url =
- ' <A Href="' .
- $url_util->PostUrl(
- $default->base_url,
- Array(
- 'session_id' => $session_id,
- 'form_mode' => PIMP_MAIL_READ_ATTATCHMENT,
- 'message_id' => $message_id,
- 'message_part' => $i + 1
- )
- ) . '">( Download )</A>';
- }
- ?>
- <tr <?php echo $template_obj->GetValue( 'default_bgcolor' ); ?>>
- <td><?php $template_obj->GetValue( 'default_font' ); ?>
- <?php echo $struct_item_type; ?></td>
- <td><?php $template_obj->GetValue( 'default_font' ); ?>
- <?php echo $struct_item->description; echo $view_url; ?></td>
- <td><?php $template_obj->GetValue( 'default_font' ); ?>
- <?php echo $struct_item_size; ?></td>
- </tr>