b2evolution PHP Cross Reference Blogging Systems

Source: /inc/files/file_moderation.ctrl.php - 85 lines - 2432 bytes - Text - Print

Description: This file implements the file moderation. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**

   3   * This file implements the file moderation.

   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   * @package admin

  11   *

  12   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  13   * @author fplanque: Francois PLANQUE.

  14   *

  15   * @version $Id: file_moderation.ctrl.php 849 2012-02-16 09:09:09Z attila $

  16   */
  17  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  18  
  19  // Check permission:

  20  $current_User->check_perm( 'files', 'view', true );
  21  
  22  // Check permission:

  23  $current_User->check_perm( 'options', 'edit', true );
  24  
  25  
  26  //param( 'action', 'string' );

  27  param( 'tab', 'string', 'suspicious', true );
  28  
  29  
  30  /**

  31   * We need make this call to build menu for all modules

  32   */
  33  $AdminUI->set_path( 'files' );
  34  
  35  file_controller_build_tabs();
  36  
  37  $AdminUI->set_path( 'files', 'moderation', $tab );
  38  
  39  // fp> TODO: this here is a bit sketchy since we have Blog & fileroot not necessarilly in sync. Needs investigation / propositions.

  40  // Note: having both allows to post from any media dir into any blog.

  41  $AdminUI->breadcrumbpath_init( false );
  42  $AdminUI->breadcrumbpath_add( T_('Files'), '?ctrl=files&amp;blog=$blog$' );
  43  $AdminUI->breadcrumbpath_add( T_('Moderation'), '?ctrl=filemod' );
  44  switch( $tab )
  45  {
  46      case 'suspicious':
  47          $AdminUI->breadcrumbpath_add( T_('Suspicious'), '?ctrl=filemod&amp;tab='.$tab );
  48          break;
  49  
  50      case 'duplicates':
  51          $AdminUI->breadcrumbpath_add( T_('Duplicates'), '?ctrl=filemod&amp;tab='.$tab );
  52          break;
  53  }
  54  
  55  // require colorbox js

  56  require_js_helper( 'colorbox' );
  57  
  58  // Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)

  59  $AdminUI->disp_html_head();
  60  
  61  // Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)

  62  $AdminUI->disp_body_top();
  63  
  64  
  65  /**

  66   * Display payload:

  67   */
  68  $AdminUI->disp_payload_begin();
  69  switch( $tab )
  70  {
  71      case 'duplicates':
  72          $AdminUI->disp_view( 'files/views/_file_duplicates.view.php' );
  73          break;
  74  
  75      case 'suspicious':
  76      default:
  77          $AdminUI->disp_view( 'files/views/_file_suspicious.view.php' );
  78          break;
  79  }
  80  $AdminUI->disp_payload_end();
  81  
  82  // Display body bottom, debug info and close </html>:

  83  $AdminUI->disp_global_footer();
  84  
  85  ?>

title

Description

title

Description

title

Description

title

title

Body