the-art-of-joomla-archive /exchange/code/trunk/administrator/components/com_exchange/helpers/elements/text/dbprefix.php

Language PHP Lines 37
MD5 Hash f321ad732422768967d66d3c59d18e04 Estimated Cost $260 (why?)
Repository https://bitbucket.org/eddieajau/the-art-of-joomla-archive View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
 * @version		$Id: dbprefix.php 280 2010-09-18 02:14:15Z eddieajau $
 * @package		NewLifeInIT
 * @subpackage	com_exchange
 * @copyright	Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
 * @license		GNU General Public License version 2 or later.
 * @link		http://www.theartofjoomla.com
 */

// no direct access
defined('_JEXEC') or die;

/**
 * @package		NewLifeInIT
 * @subpackage	com_exchange
 */
class JElementText_dbprefix extends JElement
{
	/**
	 * Element name
	 *
	 * @access	protected
	 * @var		string
	 */
	var	$_name = 'Text';

	function fetchElement($name, $value, &$node, $control_name)
	{
		global $mainframe;
		$size	= ($node->attributes('size') ? 'size="'.$node->attributes('size').'"' : '');
		$class	= ($node->attributes('class') ? 'class="'.$node->attributes('class').'"' : 'class="text_area"');
		$value	= empty($value) ? $mainframe->getCfg('dbprefix') : $value;

		return '<input type="text" name="'.$control_name.'['.$name.']" id="'.$control_name.$name.'" value="'.htmlspecialchars($value).'" '.$class.' '.$size.' />';
	}
}
Back to Top