b2evolution PHP Cross Reference Blogging Systems

Source: /inc/tools/views/_email_sent_details.view.php - 80 lines - 3054 bytes - Text - Print

Description: This file implements the UI view for Tools > Email > Sent

   1  <?php
   2  /**

   3   * This file implements the UI view for Tools > Email > Sent

   4   *

   5   * This file is part of the evoCore framework - {@link http://evocore.net/}

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}

   9   *

  10   * {@internal License choice

  11   * - If you have received this file as part of a package, please find the license.txt file in

  12   *   the same folder or the closest folder above for complete license terms.

  13   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)

  14   *   then you must choose one of the following licenses before using the file:

  15   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php

  16   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php

  17   * }}

  18   *

  19   * {@internal Open Source relicensing agreement:

  20   * }}

  21   *

  22   * @package admin

  23   *

  24   * @version $Id: _email_sent_details.view.php 349 2011-11-18 11:18:14Z yura $

  25   */
  26  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  27  
  28  global $MailLog;
  29  
  30  $Form = new Form( NULL, 'mail_log', 'post', 'compact' );
  31  
  32  $Form->global_icon( T_('Cancel viewing!'), 'close', regenerate_url( 'blog' ) );
  33  
  34  $Form->begin_form( 'fform', sprintf( T_('Mail log ID#%s'), $MailLog->emlog_ID ) );
  35  
  36  $Form->info( T_('Result'), emlog_result_info( $MailLog->emlog_result ) );
  37  
  38  $Form->info( T_('Date'), mysql2localedatetime_spans( $MailLog->emlog_timestamp, 'Y-m-d', 'H:i:sP' ) );
  39  
  40  $deleted_user_note = '';
  41  if( $MailLog->emlog_user_ID > 0 )
  42  {
  43      $UserCache = & get_UserCache();
  44      if( $User = $UserCache->get_by_ID( $MailLog->emlog_user_ID, false ) )
  45      {
  46          $Form->info( T_('To User'), $User->get_identity_link() );
  47      }
  48      else
  49      {
  50          $deleted_user_note = '( '.T_( 'Deleted user' ).' )';
  51      }
  52  }
  53  
  54  $Form->info( T_('To'), '<pre class="email_log"><span>'.htmlspecialchars($MailLog->emlog_to).$deleted_user_note.'</span></pre>' );
  55  
  56  $Form->info( T_('Subject'), '<pre class="email_log"><span>'.htmlspecialchars($MailLog->emlog_subject).'</span></pre>' );
  57  
  58  $Form->info( T_('Headers'), '<pre class="email_log"><span>'.htmlspecialchars($MailLog->emlog_headers).'</span></pre>' );
  59  
  60  $mail_contents = mail_log_parse_message( $MailLog->emlog_headers, $MailLog->emlog_message );
  61  
  62  if( !empty( $mail_contents ) )
  63  {
  64      if( !empty( $mail_contents['text'] ) )
  65      { // Display Plain Text content
  66          $Form->info( T_('Text content'), $mail_contents['text']['type']
  67                  .'<pre class="email_log_scroll"><span>'.htmlspecialchars( $mail_contents['text']['content'] ).'</span></pre>' );
  68      }
  69      if( !empty( $mail_contents['html'] ) )
  70      { // Display HTML content
  71          $Form->info( T_('HTML content'), $mail_contents['html']['type']
  72                  .'<div class="email_log_html">'.$mail_contents['html']['content'].'</div>' );
  73      }
  74  }
  75  
  76  $Form->info( T_('Raw email source'), '<pre class="email_log_scroll"><span>'.htmlspecialchars($MailLog->emlog_message).'</span></pre>' );
  77  
  78  $Form->end_form();
  79  
  80  ?>

title

Description

title

Description

title

Description

title

title

Body