[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/administrator/components/com_contact/elements/ -> contact.php (source)

   1  <?php
   2  /**
   3  * @version        $Id: contact.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  // Check to ensure this file is included in Joomla!
  15  defined('_JEXEC') or die( 'Restricted access' );
  16  
  17  class JElementContact extends JElement
  18  {
  19      /**
  20       * Element name
  21       *
  22       * @access    protected
  23       * @var        string
  24       */
  25      var    $_name = 'Contact';
  26  
  27  	function fetchElement($name, $value, &$node, $control_name)
  28      {
  29          $db = &JFactory::getDBO();
  30  
  31          $query = 'SELECT a.id, CONCAT( a.name, " - ",a.con_position ) AS text, a.catid '
  32          . ' FROM #__contact_details AS a'
  33          . ' INNER JOIN #__categories AS c ON a.catid = c.id'
  34          . ' WHERE a.published = 1'
  35          . ' AND c.published = 1'
  36          . ' ORDER BY a.catid, a.name'
  37          ;
  38          $db->setQuery( $query );
  39          $options = $db->loadObjectList( );
  40  
  41          return JHTML::_('select.genericlist',  $options, ''.$control_name.'['.$name.']', 'class="inputbox"', 'id', 'text', $value, $control_name.$name );
  42      }
  43  }


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