b2evolution PHP Cross Reference Blogging Systems

Source: /inc/tools/views/_broken_posts.view.php - 74 lines - 2400 bytes - Text - Print

Description: This file display the broken post that have no matching category

   1  <?php
   2  /**
   3   * This file display the broken post that have no matching category
   4   *
   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}.
   9   * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
  10   *
  11   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
  12   *
  13   * @package admin
  14   *
  15   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  16   * @author efy-asimo: Attila Simo.
  17   *
  18   * @version $Id: _broken_posts.view.php 6136 2014-03-08 07:59:48Z manuel $
  19   */
  20  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  21  
  22  $SQL = new SQL();
  23  
  24  $SQL->SELECT( 'post_ID, post_title, post_main_cat_ID, post_canonical_slug_ID' );
  25  $SQL->FROM( 'T_items__item' );
  26  $SQL->WHERE( 'post_main_cat_ID NOT IN (SELECT cat_ID FROM T_categories )' );
  27  
  28  $Results = new Results( $SQL->get(), 'broken_posts_' );
  29  
  30  $Results->title = T_( 'Broken items with no matching category' );
  31  $Results->global_icon( T_('Cancel!'), 'close', regenerate_url( 'action' ) );
  32  
  33  $Results->cols[] = array(
  34      'th' => T_('Item ID'),
  35      'th_class' => 'shrinkwrap',
  36      'td_class' => 'small center',
  37      'order' => 'post_ID',
  38      'td' => '$post_ID$',
  39  );
  40  
  41  $Results->cols[] = array(
  42      'th' => T_('Title'),
  43      'th_class' => 'nowrap',
  44      'order' => 'post_title',
  45      'td' => '$post_title$',
  46      'td_class' => 'small',
  47  );
  48  
  49  $Results->cols[] = array(
  50      'th' => T_('Main Cat ID'),
  51      'th_class' => 'shrinkwrap',
  52      'order' => 'post_main_cat_ID',
  53      'td' => '$post_main_cat_ID$',
  54      'td_class' => 'small center',
  55  );
  56  $Results->cols[] = array(
  57      'th' => T_('Canonical Slug ID'),
  58      'th_class' => 'shrinkwrap',
  59      'order' => 'post_canonical_slug_ID',
  60      'td' => '$post_canonical_slug_ID$',
  61      'td_class' => 'small center',
  62  );
  63  
  64  $Results->display( array(
  65          'page_url' => regenerate_url( 'blog,ctrl,action,results_'.$Results->param_prefix.'page', 'action='.param_action().'&amp;'.url_crumb( 'tools' ) )
  66      ) );
  67  
  68  if( ( $current_User->check_perm('options', 'edit', true) ) && ( $Results->get_num_rows() ) )
  69  { // display Delete link
  70      $redirect_to = regenerate_url( 'action', 'action=del_broken_posts&'.url_crumb( 'tools' ) );
  71      echo '<p>[<a href="'.$redirect_to.'">'.T_( 'Delete these posts' ).'</a>]</p>';
  72  }
  73  
  74  ?>

title

Description

title

Description

title

Description

title

title

Body