Server IP : 180.180.241.3 / Your IP : 216.73.216.252 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 : /AppServ/www/app/webroot/news/administrator/components/com_jfusion/fields/ |
Upload File : |
<?php /** * This is the jfusion AdvancedParam 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(); /** * JFusion Element class AdvancedParam * * @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.orgrg */ class JFormFieldJFusionAdvancedParam extends JFormField { public $type = 'JFusionAdvancedParam'; /** * Get an element * * @return string html */ protected function getInput() { //used to give unique ids to elements when more than one advanced param is loaded (for example in configuring JoomFish) static $elNum; if (!isset($elNum)) { $elNum = 0; } $ename = 'jfusionadvancedparam'.$elNum; $lang = JFactory::getLanguage(); $lang->load('com_jfusion'); $doc = JFactory::getDocument(); $fieldName = $this->name; $feature = $this->element['feature']; if (!$feature) { $feature = 'any'; } $multiselect = $this->element['multiselect']; if (!defined('JFUSION_ADVANCEDPARAM_JS_LOADED')) { define('JFUSION_ADVANCEDPARAM_JS_LOADED', 1); if (!is_null($feature)) { $cfile = '&feature='.$feature; } else { $cfile = ''; } if (!is_null($multiselect)) { $mselect = '&multiselect=1'; } else { $mselect = ''; } $js = <<<JS function jAdvancedParamSet(title, base64, name) { $(name + '_id').value = base64; $(name + '_name').value = title; SqueezeBox.close(); } JS; $doc->addScriptDeclaration($js); } //Create Link $link = 'index.php?option=com_jfusion&task=advancedparam&tmpl=component&ename='.$ename; if (!is_null($feature)) { $link.= '&feature=' . $feature; } if (!is_null($multiselect)) { $link.= '&multiselect=1'; } jimport( 'joomla.user.helper' ); $hash = JUtility::getHash( $fieldName.JUserHelper::genRandomPassword()); $session = JFactory::getSession(); $session->set($hash, $this->value); $link .= '&'.$ename.'='.$hash; //Get JParameter from given string if (empty($this->value)) { $params = array(); } else { $params = base64_decode($this->value); $params = unserialize($params); if (!is_array($params)) { $params = array(); } } $title = ''; if (isset($params['jfusionplugin'])) { $title = $params['jfusionplugin']; } else if ($multiselect) { $del = ''; foreach ($params as $key => $param) { if (isset($param['jfusionplugin'])) { $title.= $del . $param['jfusionplugin']; $del = '; '; } } } if (empty($title)) { $title = JText::_('NO_PLUGIN_SELECTED'); } $select_plugin = JText::_('SELECT_PLUGIN'); $select = JText::_('SELECT'); //Replace new Lines with the placeholder \n JHTML::_('behavior.modal', 'a.modal'); $html =<<<HTML <div style="float: left;"> <input style="background: #ffffff;" type="text" id="{$ename}_name" value="{$title}" disabled="disabled" /> </div> <div class="button2-left"> <div class="blank"> <a id="{$ename}_link" class="modal" title="{$select_plugin}" href="{$link}" rel="{handler: 'iframe', size: {x: window.getSize().x-80, y: window.getSize().y-80}}">{$select}</a> </div> </div> <input type="hidden" id="{$ename}_id" name="{$fieldName}" value="{$this->value}" /> HTML; $elNum++; return $html; } }