b2evolution PHP Cross Reference Blogging Systems

Source: /inc/skins/views/_skin_list.view.php - 98 lines - 3415 bytes - Text - Print

Description: This file implements the UI view for the installed skins.

   1  <?php
   2  /**
   3   * This file implements the UI view for the installed skins.
   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   *
  10   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
  11   *
  12   * @package admin
  13   *
  14   * @version $Id: _skin_list.view.php 6136 2014-03-08 07:59:48Z manuel $
  15   */
  16  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  17  
  18  // Create result set:
  19  $SQL = new SQL();
  20  $SQL->SELECT( 'T_skins__skin.*, COUNT( DISTINCT( cset_coll_ID ) ) AS nb_blogs' );
  21  $SQL->FROM( 'T_skins__skin LEFT JOIN T_coll_settings ON skin_ID = cset_value AND
  22              ( cset_name = "normal_skin_ID" OR cset_name = "mobile_skin_ID" OR cset_name = "tablet_skin_ID" )' );
  23  $SQL->GROUP_BY( 'skin_ID' );
  24  
  25  $CountSQL = new SQL();
  26  $CountSQL->SELECT( 'COUNT( * )' );
  27  $CountSQL->FROM( 'T_skins__skin' );
  28  
  29  $Results = new Results( $SQL->get(), 'skin_', '', NULL, $CountSQL->get() );
  30  
  31  $Results->Cache = & get_SkinCache();
  32  
  33  $Results->title = T_('Installed skins').get_manual_link('installed_skins');
  34  
  35  if( $current_User->check_perm( 'options', 'edit', false ) )
  36  { // We have permission to modify:
  37      $Results->cols[] = array(
  38                              'th' => T_('Name'),
  39                              'order' => 'skin_name',
  40                              'td' => '<strong><a href="'.regenerate_url( '', 'skin_ID=$skin_ID$&amp;action=edit' ).'" title="'.TS_('Edit skin properties...').'">$skin_name$</a></strong>',
  41                          );
  42  }
  43  else
  44  { // We have NO permission to modify:
  45      $Results->cols[] = array(
  46                              'th' => T_('Name'),
  47                              'order' => 'skin_name',
  48                              'td' => '<strong>$skin_name$</strong>',
  49                          );
  50  }
  51  
  52  $Results->cols[] = array(
  53                          'th' => T_('Skin type'),
  54                          'order' => 'skin_type',
  55                          'td_class' => 'center',
  56                          'td' => '$skin_type$',
  57                      );
  58  
  59  $Results->cols[] = array(
  60                          'th' => T_('Blogs'),
  61                          'order' => 'nb_blogs',
  62                          'th_class' => 'shrinkwrap',
  63                          'td_class' => 'center',
  64                          'td' => '~conditional( (#nb_blogs# > 0), #nb_blogs#, \'&nbsp;\' )~',
  65                      );
  66  
  67  $Results->cols[] = array(
  68                          'th' => T_('Skin Folder'),
  69                          'order' => 'skin_folder',
  70                          'td' => '$skin_folder$',
  71                      );
  72  
  73  if( $current_User->check_perm( 'options', 'edit', false ) )
  74  { // We have permission to modify:
  75      $Results->cols[] = array(
  76                              'th' => T_('Actions'),
  77                              'th_class' => 'shrinkwrap',
  78                              'td_class' => 'shrinkwrap',
  79                              'td' => action_icon( TS_('Edit skin properties...'), 'properties',
  80                              '%regenerate_url( \'\', \'skin_ID=$skin_ID$&amp;action=edit\')%' )
  81                          .action_icon( TS_('Reload containers!'), 'reload',
  82                              '%regenerate_url( \'\', \'skin_ID=$skin_ID$&amp;action=reload&amp;'.url_crumb('skin').'\')%' )
  83                                              .'~conditional( #nb_blogs# < 1, \''
  84                                              .action_icon( TS_('Uninstall this skin!'), 'delete',
  85                              '%regenerate_url( \'\', \'skin_ID=$skin_ID$&amp;action=delete&amp;'.url_crumb('skin').'\')%' ).'\', \''
  86                              .get_icon( 'delete', 'noimg' ).'\' )~',
  87                          );
  88  
  89    $Results->global_icon( T_('Install new skin...'), 'new', regenerate_url( 'action,blog', 'action=new'), T_('Install new'), 3, 4  );
  90  }
  91  
  92  
  93  // $fadeout_array = array( 'skin_ID' => array(6) );
  94  $fadeout_array = NULL;
  95  
  96  $Results->display( NULL, 'session' );
  97  
  98  ?>

title

Description

title

Description

title

Description

title

title

Body