[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/administrator/modules/mod_quickicon/ -> mod_quickicon.php (source)

   1  <?php
   2  /**
   3  * @version        $Id: mod_quickicon.php 14401 2010-01-26 14:10:00Z louis $
   4  * @package        Joomla
   5  * @copyright    Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
   6  * @license        GNU/GPL, see LICENSE.php
   7  * Joomla! is free software. This version may have been modified pursuant
   8  * to the GNU General Public License, and as distributed it includes or
   9  * is derivative of works licensed under the GNU General Public License or
  10  * other free or open source software licenses.
  11  * See COPYRIGHT.php for copyright notices and details.
  12  */
  13  
  14  // no direct access
  15  defined( '_JEXEC' ) or die( 'Restricted access' );
  16  
  17  if (!defined( '_JOS_QUICKICON_MODULE' ))
  18  {
  19      /** ensure that functions are declared only once */
  20      define( '_JOS_QUICKICON_MODULE', 1 );
  21  
  22  	function quickiconButton( $link, $image, $text )
  23      {
  24          global $mainframe;
  25          $lang        =& JFactory::getLanguage();
  26          $template    = $mainframe->getTemplate();
  27          ?>
  28          <div style="float:<?php echo ($lang->isRTL()) ? 'right' : 'left'; ?>;">
  29              <div class="icon">
  30                  <a href="<?php echo $link; ?>">
  31                      <?php echo JHTML::_('image.site',  $image, '/templates/'. $template .'/images/header/', NULL, NULL, $text ); ?>
  32                      <span><?php echo $text; ?></span></a>
  33              </div>
  34          </div>
  35          <?php
  36      }
  37  
  38      ?>
  39      <div id="cpanel">
  40          <?php
  41          $link = 'index.php?option=com_content&amp;task=add';
  42          quickiconButton( $link, 'icon-48-article-add.png', JText::_( 'Add New Article' ) );
  43  
  44          $link = 'index.php?option=com_content';
  45          quickiconButton( $link, 'icon-48-article.png', JText::_( 'Article Manager' ) );
  46  
  47          $link = 'index.php?option=com_frontpage';
  48          quickiconButton( $link, 'icon-48-frontpage.png', JText::_( 'Frontpage Manager' ) );
  49  
  50          $link = 'index.php?option=com_sections&amp;scope=content';
  51          quickiconButton( $link, 'icon-48-section.png', JText::_( 'Section Manager' ) );
  52  
  53          $link = 'index.php?option=com_categories&amp;section=com_content';
  54          quickiconButton( $link, 'icon-48-category.png', JText::_( 'Category Manager' ) );
  55  
  56          $link = 'index.php?option=com_media';
  57          quickiconButton( $link, 'icon-48-media.png', JText::_( 'Media Manager' ) );
  58  
  59          // Get the current JUser object
  60          $user = &JFactory::getUser();
  61  
  62          if ( $user->get('gid') > 23 ) {
  63              $link = 'index.php?option=com_menus';
  64              quickiconButton( $link, 'icon-48-menumgr.png', JText::_( 'Menu Manager' ) );
  65          }
  66  
  67          if ( $user->get('gid') > 24 ) {
  68              $link = 'index.php?option=com_languages&amp;client=0';
  69              quickiconButton( $link, 'icon-48-language.png', JText::_( 'Language Manager' ) );
  70          }
  71  
  72          if ( $user->get('gid') > 23 ) {
  73              $link = 'index.php?option=com_users';
  74              quickiconButton( $link, 'icon-48-user.png', JText::_( 'User Manager' ) );
  75          }
  76  
  77          if ( $user->get('gid') > 24 ) {
  78              $link = 'index.php?option=com_config';
  79              quickiconButton( $link, 'icon-48-config.png', JText::_( 'Global Configuration' ) );
  80          }
  81          ?>
  82      </div>
  83      <?php
  84  }


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1