b2evolution PHP Cross Reference Blogging Systems

Source: /skins_email/account_activated.html.php - 105 lines - 4383 bytes - Text - Print

Description: This is sent to ((Admins)) to notify them that a new ((User)) account has been activated.

   1  <?php
   2  /**
   3   * This is sent to ((Admins)) to notify them that a new ((User)) account has been activated.
   4   *
   5   * For more info about email skins, see: http://b2evolution.net/man/themes-templates-skins/email-skins/
   6   *
   7   * b2evolution - {@link http://b2evolution.net/}
   8   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
   9   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
  10   *
  11   * @version $Id: account_activated.html.php 6136 2014-03-08 07:59:48Z manuel $
  12   */
  13  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  14  
  15  // ---------------------------- EMAIL HEADER INCLUDED HERE ----------------------------
  16  emailskin_include( '_email_header.inc.html.php', $params );
  17  // ------------------------------- END OF EMAIL HEADER --------------------------------
  18  
  19  global $Settings, $UserSettings, $admin_url, $htsrv_url;
  20  
  21  // Default params:
  22  $params = array_merge( array(
  23          'User' => NULL,
  24          'activated_by_admin' => '',// Login of admin which activated current user account
  25      ), $params );
  26  
  27  
  28  $activated_User = $params['User'];
  29  
  30  echo '<p>';
  31  if( empty( $params['activated_by_admin'] ) )
  32  { // Current user activated own account
  33      echo T_('New user account activated').':';
  34  }
  35  else
  36  { // Admin activated current user account
  37      printf( T_('New user account activated by %s'), $params['activated_by_admin'] ).':';
  38  }
  39  echo '</p>'."\n";
  40  
  41  echo '<table class="email_table">'."\n";
  42  echo '<tr><th>'.T_('Login').':</th><td>'.$activated_User->get_colored_login( array( 'mask' => '$avatar$ $login$' ) ).'</td></tr>'."\n";
  43  echo '<tr><th>'.T_('Email').':</th><td>'.$activated_User->email.'</td></tr>'."\n";
  44  
  45  if( $activated_User->ctry_ID > 0 )
  46  { // Country field is defined
  47      load_class( 'regional/model/_country.class.php', 'Country' );
  48      echo '<tr><th>'.T_('Country').': </th><td>'.$activated_User->get_country_name().'</td></tr>'."\n";
  49  }
  50  
  51  if( $activated_User->firstname != '' )
  52  { // First name is defined
  53      echo '<tr><th>'.T_('First name').':</th><td>'.$activated_User->firstname.'</td></tr>'."\n";
  54  }
  55  
  56  if( $activated_User->gender == 'M' )
  57  { // Gender is Male
  58      echo '<tr><th>'.T_('I am').':</th><td>'.T_('A man').'</td></tr>'."\n";
  59  }
  60  else if( $activated_User->gender == 'F' )
  61  { // Gender is Female
  62      echo '<tr><th>'.T_('I am').':</th><td>'.T_('A woman').'</td></tr>'."\n";
  63  }
  64  
  65  if( $Settings->get( 'registration_ask_locale' ) && $activated_User->locale != '' )
  66  { // Locale field is defined
  67      global $locales;
  68      echo '<tr><th>'.T_('Locale').':</th><td>'.$locales[$activated_User->locale]['name'].'</td></tr>'."\n";
  69  }
  70  
  71  if( !empty( $activated_User->source ) )
  72  { // Source is defined
  73      echo '<tr><th>'.T_('Registration Source').':</th><td>'.$activated_User->source.'</td></tr>'."\n";
  74  }
  75  
  76  $registration_trigger_url = $UserSettings->get( 'registration_trigger_url', $activated_User->ID );
  77  if( !empty( $registration_trigger_url ) )
  78  { // Trigger page
  79      echo '<tr><th>'.T_('Registration Trigger Page').':</th><td>'.get_link_tag( $registration_trigger_url ).'</td></tr>'."\n";
  80  }
  81  
  82  $initial_blog_ID = $UserSettings->get( 'initial_blog_ID', $activated_User->ID );
  83  if( !empty( $initial_blog_ID ) )
  84  { // Hit info
  85      echo '<tr><th>'.T_('Initial page').':</th><td>'.T_('Blog')." ".$UserSettings->get( 'initial_blog_ID', $activated_User->ID )." - ".$UserSettings->get( 'initial_URI', $activated_User->ID ).'</td></tr>'."\n";
  86      echo '<tr><th>'.T_('Initial referer').':</th><td>'.get_link_tag( $UserSettings->get( 'initial_referer', $activated_User->ID ) ).'</td></tr>'."\n";
  87  }
  88  
  89  echo '</table>'."\n";
  90  
  91  // Buttons:
  92  echo '<div class="buttons">'."\n";
  93  echo get_link_tag( $admin_url.'?ctrl=user&user_tab=profile&user_ID='.$activated_User->ID, T_('Edit User'), 'button_yellow' )."\n";
  94  echo get_link_tag( $admin_url.'?ctrl=users&action=show_recent', T_('View recent registrations'), 'button_gray' )."\n";
  95  echo "</div>\n";
  96  
  97  // Footer vars:
  98  $params['unsubscribe_text'] = T_( 'If you don\'t want to receive any more notification when an account was activated by email, click here:' )
  99              .' <a href="'.$htsrv_url.'quick_unsubscribe.php?type=account_activated&user_ID=$user_ID$&key=$unsubscribe_key$">'
 100              .T_('instant unsubscribe').'</a>.';
 101  
 102  // ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
 103  emailskin_include( '_email_footer.inc.html.php', $params );
 104  // ------------------------------- END OF EMAIL FOOTER --------------------------------
 105  ?>

title

Description

title

Description

title

Description

title

title

Body