| Server IP : 180.180.241.3 / Your IP : 216.73.216.216 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/news/administrator/components/com_jfusion/elements/ |
Upload File : |
<?php
/**
* This is the jfusion Itemid element file
*
* PHP version 5
*
* @category JFusion
* @package Elements
* @author JFusion Team <webmaster@jfusion.org>
* @copyright 2008 JFusion. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.jfusion.org
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
/**
* JFusion Element class Itemid
*
* @category JFusion
* @package Elements
* @author JFusion Team <webmaster@jfusion.org>
* @copyright 2008 JFusion. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.jfusion.org
*/
class JElementJFusionItemid extends JElement
{
var $_name = 'JFusionItemid';
/**
* Get an element
*
* @param string $name name of element
* @param string $value value of element
* @param JSimpleXMLElement &$node node of element
* @param string $control_name name of controller
*
* @return string|void html
*/
function fetchElement($name, $value, &$node, $control_name)
{
JHTML::_('behavior.modal', 'a.modal');
$lang = JFactory::getLanguage();
$lang->load('com_jfusion');
$mainframe = JFactory::getApplication();
static $elId;
static $js;
if (!is_int($elId)) {
$elId = 0;
} else {
$elId++;
}
$doc = JFactory::getDocument();
$fieldName = $control_name . '[' . $name . ']';
if (!$js) {
$js = <<<JS
function jSelectItemid(name,id,num) {
$(name+'_id'+num).value = id;
$(name+'_name'+num).value = id;
$(name+'_save'+num).src = 'components/com_jfusion/images/filesave.png';
SqueezeBox.close();
}
JS;
$doc->addScriptDeclaration($js);
}
$feature = $node->attributes('feature');
if (!$feature) {
$feature = 'any';
}
if($value) {
$src = 'components/com_jfusion/images/tick.png';
} else {
$src = 'components/com_jfusion/images/clear.png';
}
$link = 'index.php?option=com_jfusion&task=itemidselect&tmpl=component&ename=' . $name . '&elId=' . $elId . '&feature=' . $feature;
$select_menuitem = JText::_('SELECT_MENUITEM');
$select = JText::_('SELECT');
$html = <<<HTML
<div style="float: left;">
<input style="background: #ffffff;" type="text" id="{$name}_name{$elId}" value="{$value}" disabled="disabled" />
</div>
<div class="button2-left">
<div class="blank">
<a class="modal" title="{$select_menuitem}" href="{$link}" rel="{handler: 'iframe', size: {x: 650, y: 375}}">{$select}</a>
</div>
</div>
<img id="{$name}_save{$elId}" src="{$src}" alt="Save">
<input type="hidden" id="{$name}_id{$elId}" name="{$fieldName}" value="{$value}" />
HTML;
return $html;
}
}