b2evolution PHP Cross Reference Blogging Systems

Source: /inc/users/views/_user_activity.view.php - 111 lines - 3574 bytes - Text - Print

Description: This file implements the UI view for the user's activity on user profile page. b2evolution - {@link http://b2evolution.net/} Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}

   1  <?php
   2  /**

   3   * This file implements the UI view for the user's activity on user profile page.

   4   *

   5   * b2evolution - {@link http://b2evolution.net/}

   6   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}

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

   8   *

   9   * @package admin

  10   *

  11   * @version $Id: _user_activity.view.php 849 2012-02-16 09:09:09Z yura $

  12   */
  13  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  14  
  15  /**

  16   * @var instance of User class

  17   */
  18  global $edited_User;
  19  /**

  20   * @var current action

  21   */
  22  global $action;
  23  /**

  24   * @var user permission, if user is only allowed to edit his profile

  25   */
  26  global $user_profile_only;
  27  
  28  global $user_tab, $user_ID;
  29  
  30  global $current_User, $UserSettings;
  31  
  32  if( !$current_User->check_perm( 'users', 'edit' ) )
  33  {    // Check permission:
  34      debug_die( T_( 'You have no permission to see this tab!' ) );
  35  }
  36  
  37  
  38  memorize_param( 'user_tab', 'string', '', $user_tab );
  39  memorize_param( 'user_ID', 'integer', 0, $user_ID );
  40  
  41  // ------------------- PREV/NEXT USER LINKS -------------------

  42  user_prevnext_links( array(
  43          'block_start'  => '<table class="prevnext_user"><tr>',
  44          'prev_start'   => '<td width="33%">',
  45          'prev_end'     => '</td>',
  46          'prev_no_user' => '<td width="33%">&nbsp;</td>',
  47          'back_start'   => '<td width="33%" class="back_users_list">',
  48          'back_end'     => '</td>',
  49          'next_start'   => '<td width="33%" class="right">',
  50          'next_end'     => '</td>',
  51          'next_no_user' => '<td width="33%">&nbsp;</td>',
  52          'block_end'    => '</tr></table>',
  53          'user_tab'     => 'activity'
  54      ) );
  55  // ------------- END OF PREV/NEXT USER LINKS -------------------

  56  
  57  if( !$user_profile_only )
  58  { // echo user edit action icons
  59      $Widget = new Widget();
  60      echo_user_actions( $Widget, $edited_User, 'edit' );
  61      echo '<span class="floatright">'.$Widget->gen_global_icons().'</span>';
  62  }
  63  
  64  echo '<div>'.get_usertab_header( $edited_User, $user_tab, $current_User->ID == $edited_User->ID ? T_('My Activity') : T_('User Activity') ).'</div>';
  65  
  66  // Display IP address from where this user was created

  67  echo '<div style="margin-top:25px;font-weight:bold;"><span>'.T_( 'User created from IP' ).': '.int2ip( $UserSettings->get( 'created_fromIPv4', $edited_User->ID ) ).'</span></div>';
  68  
  69  /**** Reports from edited user  ****/

  70  user_reports_results_block( array(
  71          'edited_User'       => $edited_User,
  72      ) );
  73  evo_flush();
  74  
  75  /**** Blogs owned by the user ****/

  76  blogs_results_block( array(
  77          'edited_User'       => $edited_User,
  78      ) );
  79  evo_flush();
  80  
  81  /**** Posts created by the user  ****/

  82  items_created_results_block( array(
  83          'edited_User'       => $edited_User,
  84      ) );
  85  evo_flush();
  86  
  87  /**** Posts edited by the user ****/

  88  items_edited_results_block( array(
  89          'edited_User'       => $edited_User,
  90      ) );
  91  evo_flush();
  92  
  93  /**** Comments posted by the user ****/

  94  comments_results_block( array(
  95          'edited_User'       => $edited_User,
  96      ) );
  97  evo_flush();
  98  
  99  /**** Private messages sent by the user ****/

 100  threads_results_block( array(
 101          'edited_User'       => $edited_User,
 102      ) );
 103  evo_flush();
 104  
 105  
 106  if( $current_User->ID != $edited_User->ID && $edited_User->ID != 1 )
 107  {    // User can NOT delete admin and own account
 108      echo '<div style="margin-top:25px;">'.action_icon( T_('Delete User and All his contributions'), 'delete', '?ctrl=user&amp;user_tab=activity&amp;action=delete_all_userdata&amp;user_ID='.$edited_User->ID.'&amp;'.url_crumb('user'), ' '.T_('Delete User and All his contributions'), 3, 4 ).'</div>';
 109  }
 110  
 111  ?>

title

Description

title

Description

title

Description

title

title

Body