[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

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

   1  <?php
   2  /**
   3  * @version        $Id: mod_stats.php 18162 2010-07-16 07:00:47Z ian $
   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  $db =& JFactory::getDBO();
  18  $query = 'SELECT menutype, COUNT(id) AS numitems'
  19  . ' FROM #__menu'
  20  . ' WHERE published = 1'
  21  . ' GROUP BY menutype'
  22  ;
  23  $db->setQuery( $query );
  24  $rows = $db->loadObjectList();
  25  ?>
  26  <table class="adminlist">
  27      <tr>
  28          <td class="title" width="80%">
  29              <strong><?php echo JText::_( 'Menu' ); ?></strong>
  30          </td>
  31          <td class="title">
  32              <strong><?php echo JText::_( 'Num Items' ); ?></strong>
  33          </td>
  34      </tr>
  35  <?php
  36  foreach ($rows as $row)
  37  {
  38      $link = 'index.php?option=com_menus&amp;task=view&amp;menutype=' . $row->menutype;
  39      ?>
  40      <tr>
  41          <td>
  42              <a href="<?php echo $link; ?>">
  43                  <?php echo $row->menutype;?></a>
  44          </td>
  45          <td>
  46              <?php echo $row->numitems;?>
  47          </td>
  48      </tr>
  49  <?php
  50  }
  51  ?>
  52  </table>


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