Example #1
0
 function display($tpl = null)
 {
     if (JVERSION < 3.0) {
         JHTML::_('behavior.mootools');
     } else {
         JHtmlBehavior::framework();
     }
     $this->_setToolBar();
     $this->setLayout('settings');
     $model = $this->getModel('settings');
     $gatewayplugin = $this->get('APIpluginData');
     $this->assignRef('gatewayplugin', $gatewayplugin);
     $model->refreshUpdateSite();
     $geotable_list = $model->checkgeotables();
     if (!empty($geotable_list)) {
         $geotablepresent = 0;
     } else {
         $geotablepresent = 1;
     }
     $this->assignRef('geotablepresent', $geotablepresent);
     if (JVERSION >= 3.0) {
         $this->sidebar = JHtmlSidebar::render();
     }
     parent::display($tpl);
 }
Example #2
0
    /**
     * Method to get the field input markup.
     *
     * @return  string  The field input markup.
     */
    protected function getInput()
    {
        $plugin = JPluginHelper::isEnabled('system', 'ezset');
        if (!$plugin) {
            return print_r($plugin, 1) . '需要先啟動外掛!';
        }
        $name = str_replace('jform_params_', '', $this->id);
        \JHtmlBehavior::framework(true);
        $token = JFactory::getSession()->getFormToken();
        $ajaxUrl = JURI::root() . 'index.php?cmd=ajax.overlay.' . $name;
        $ajaxCode = <<<AJAX
window.addEvent('domready', function() {

\t\$('{$name}').addEvent('click', function(e) {
\t\tvar myRequest = new Request({
\t\t\tmethod: 'post',
\t\t\tdata: {
\t\t\t\t'{$token}': 1
\t\t\t},
\t\t\turl: '{$ajaxUrl}',
\t\t\tonSuccess: function(responseText) {
\t\t\t\t\$('{$name}_response').set('html', '<input class="btn btn-default" disabled="true" type="button" value="'+responseText+'">');
\t\t\t}
\t\t});

\t\tmyRequest.send();
\t});
});
AJAX;
        $doc = JFactory::getDocument();
        $doc->addScriptDeclaration($ajaxCode);
        $link = '<div id="' . $name . '_response" ><input class="btn btn-default" id="' . $name . '" type="button" value="按此覆蓋"></div>';
        return $link;
    }
Example #3
0
 function fetchButton($type = 'Wizard', $namekey = '', $id = 'wizard')
 {
     if (version_compare(JVERSION, '3.0.0', '<')) {
         JHTML::_('behavior.mootools');
     } else {
         JHtmlBehavior::framework();
     }
     $defaultPage = 'jnewsdoc_glossary';
     if (empty($namekey)) {
         $namekey = $defaultPage;
     } else {
         $namekey = 'jnewsdoc_' . $namekey;
     }
     $langID = substr(JNEWS_CONFIG_LANG, 0, 2);
     $link = 'http://www.joobi.co/index.php?option=com_jlinks&controller=redirect&link=' . $namekey . '&alt=' . $defaultPage . '&lang=' . $langID;
     //.'&Itemid=312';
     $iFrame = "'<iframe src=\\'{$link}\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
     $js = "var wizardOn = true; function showWizard(){\n\t\tvar box=\$('jNewsWizard');\n\t\tif(wizardOn){box.innerHTML = " . $iFrame . ";box.style.display = 'block';box.style.height = '0';}";
     $js .= "try{\n                   var fx = box.effects({duration: 2500, transition:\n\t\t\t\t\tFx.Transitions.Quart.easeOut});\n\t\t\t\t\tif(wizardOn){\n\t\t\t\t\t\tfx.start({'height': 500});\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfx.start({'height': 0}).chain(function() {\n\t\t\t\t\t\t\tbox.innerHTML='';\n\t\t\t\t\t\t\tbox.setStyle('display','none');\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}catch(err){\n\t\t\t\t\tbox.style.height = '500px';\n\t\t\t\t\tvar myVerticalSlide = new Fx.Slide('jNewsWizard');\n \t\t\t\t\tif(wizardOn){\n\t\t\t\t\t\tmyVerticalSlide.slideIn();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmyVerticalSlide.slideOut().chain(function() {\n\t\t\t\t\t\tbox.innerHTML='';\n\t\t\t\t\t\tbox.setStyle('display','none');\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} wizardOn = !wizardOn;}";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration($js);
     if (version_compare(JVERSION, '3.0.0', '<')) {
         return '<a href="' . $link . '" target="_blank" onclick="showWizard();return false;" class="toolbar"><span class="icon-32-wizard" title="' . _JNEWS_WIZARD . '"></span>' . _JNEWS_WIZARD . '</a>';
     } else {
         return '<a class="btn btn-small" href="' . $link . '" target="_blank" onclick="showWizard();return false;" class="toolbar"><span style="float:left;" class="icon-16-wizard" title="' . _JNEWS_WIZARD . '"></span><span style="float:left; margin-left:8px;">' . _JNEWS_WIZARD . '</span></a>';
     }
 }
Example #4
0
 /**
  * Constructor
  *
  * @access  protected
  * @return  void
  * @since   1.5.5
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->_ambit = JoomAmbit::getInstance();
     $this->_config = JoomConfig::getInstance();
     $this->_mainframe = JFactory::getApplication('administrator');
     $this->_user = JFactory::getUser();
     $this->_doc = JFactory::getDocument();
     $this->_doc->addStyleSheet($this->_ambit->getStyleSheet('admin.joomgallery.css'));
     JHtmlBehavior::framework();
     $this->_doc->addScript($this->_ambit->getScript('admin.js'));
     JoomHelper::addSubmenu();
     JHTML::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     // Check for available updates
     if (!($checked = $this->_mainframe->getUserState('joom.update.checked'))) {
         $controller = JRequest::getCmd('controller');
         if ($this->_config->get('jg_checkupdate') && $controller && $controller != 'control') {
             $dated_extensions = JoomExtensions::checkUpdate();
             if (count($dated_extensions)) {
                 $this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
                 $this->_mainframe->setUserState('joom.update.checked', -1);
             } else {
                 $this->_mainframe->setUserState('joom.update.checked', 1);
             }
         }
     } else {
         if ($checked == -1) {
             $controller = JRequest::getCmd('controller');
             if ($controller && $controller != 'control') {
                 $this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
             }
         }
     }
 }
Example #5
0
 /**
  * Display method
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return void
  */
 public function display($tpl = null)
 {
     $objJSNUtils = JSNISFactory::getObj('classes.jsn_is_utils');
     $objJSNXML = JSNISFactory::getObj('classes.jsn_is_readxmldetails');
     $objJSNMsg = JSNISFactory::getObj('classes.jsn_is_message');
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     JHtmlBehavior::framework();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_IMAGESHOW') . ': ' . JText::_('HELP_HELP_AND_SUPPORT'), 'help');
     $shortEdition = '';
     $xml = array();
     // Get messages
     $msgs = '';
     $msgs = $objJSNMsg->getList('HELP_AND_SUPPORT');
     $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     $xml = $objJSNXML->parserXMLDetails();
     $shortEdition = $objJSNUtils->getShortEdition();
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->assignRef('xml', $xml);
     $this->assignRef('shortEdition', $shortEdition);
     $this->_addAssets();
     $this->addToolbar();
     // Display the template
     parent::display($tpl);
 }
Example #6
0
 /**
  * autoThumb
  *
  * @param string     $context
  * @param object     $article
  * @param \JRegistry $params
  *
  * @return  void
  */
 public static function autoThumb($context, $article, $params = null)
 {
     \JHtmlBehavior::modal();
     $minimal = 30;
     $es = \Ezset::getInstance();
     include_once EZSET_ROOT . '/lib/dom/simple_html_dom.php';
     $html = str_get_html($article->text);
     $imgs = $html->find('img');
     foreach ($imgs as $img) {
         $classes = explode(' ', $img->class);
         $imgUrl = UriHelper::pathAddHost($img->src);
         // Has class nothumb, skip to next.
         if (in_array('nothumb', $classes)) {
             continue;
         }
         // If is anchor already, skip to next.
         if ($img->parent->tag == 'a') {
             continue;
         }
         // If img tag has no width and height attrs, skip.
         if (!$img->width && !$img->height) {
             continue;
         }
         // If not localhost image, skip.
         if (!strpos('-' . $imgUrl, \JURI::root()) && $es->params->get('onlyLocalhostThumb', 1)) {
             continue;
         }
         // Get img path and size
         $imgPath = \JPath::clean(str_replace(\JURI::root(), JPATH_ROOT . '/', $imgUrl));
         $size = getimagesize($imgPath);
         // Manul size
         $imgW = $img->width;
         $imgH = $img->height;
         // Original size
         $oriW = $size[0];
         $oriH = $size[1];
         // If too small, skip.
         if ($oriW <= $minimal || $oriH <= $minimal) {
             continue;
         }
         // If large ten origin, skip.
         if ($oriW <= $imgW || $oriW <= $imgW) {
             continue;
         }
         // Get thumb url
         $thumb = new \Windwalker\Image\Thumb();
         $img->src = $thumb->resize($imgUrl, $imgW, $imgH);
         $imgtext = $img->outertext;
         $imgtext = \JHtml::link($imgUrl, $imgtext, array('class' => 'modal'));
         $img->outertext = $imgtext;
         $classes = null;
     }
     $article->text = $html->save();
 }
Example #7
0
 /**
  * Method to get the field input markup.
  *
  * @return    string    The field input markup.
  */
 public function getInput()
 {
     // Load the modal behavior script.
     JHtml::_('behavior.modal', 'a.modal');
     JHtmlBehavior::framework(true);
     $this->setElement();
     // Build the script.
     $script = array();
     $script[] = '	function jSelect' . ucfirst($this->component) . '_' . $this->id . '(id, title) {';
     $script[] = '		document.id("jform_link").value = id;';
     $script[] = '		document.id("jform_link").highlight();';
     $script[] = '		SqueezeBox.close();';
     $script[] = '	}';
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     // Setup variables for display.
     $html = array();
     $link = $this->getLink();
     $title = $this->getTitle();
     if (empty($title)) {
         $title = JText::_('COM_' . strtoupper($this->component) . '_SELECT_ITEM');
     }
     $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
     if (JVERSION >= 3) {
         // The current user display field.
         $html[] = '<span class="">';
         $html[] = '<a class="modal btn" title="' . JText::_('COM_' . strtoupper($this->component) . '_CHANGE_ITEM_BUTTON') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' . JText::_('JSELECT') . '</a>';
         $html[] = '</span>';
     } else {
         // The user select button.
         $html[] = '<div class="button2-left">';
         $html[] = '  <div class="blank">';
         $html[] = '	<a class="modal" title="' . JText::_('COM_' . strtoupper($this->component) . '_CHANGE_ITEM') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('JSELECT') . '</a>';
         $html[] = '  </div>';
         $html[] = '</div>';
     }
     // The active article id field.
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     // class='required' for client side validation
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     $html[] = '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';
     return implode("\n", $html);
 }
Example #8
0
 /**
  * Display method
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return	void
  */
 public function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     $this->_document = JFactory::getDocument();
     JHtmlBehavior::framework();
     // Set the toolbar
     JToolBarHelper::title(JText::_('JSN_IMAGESHOW') . ': ' . JText::_('MAINTENANCE_CONFIGURATION_AND_MAINTENANCE'), 'maintenance');
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('CONFIGURATION_AND_MAINTENANCE');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     $this->_addAssets();
     $this->addToolbar();
     // Type of screen
     $type = JRequest::getWord('type', 'backup');
     $themeName = JRequest::getWord('theme_name');
     $sourceType = JRequest::getString('source_type');
     switch ($type) {
         case 'themeparameters':
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $themeName . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('theme_config');
             break;
         case 'profileparameters':
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $sourceType . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('source_config');
             break;
         case 'editprofile':
             $sourceID = JRequest::getInt('external_source_id');
             $countShowlist = JRequest::getInt('count_showlist');
             $imageSource = JSNISFactory::getSource($sourceType, 'external');
             $imageSource->_source['sourceTable']->load($sourceID);
             $this->assignRef('sourceInfo', $imageSource->_source['sourceTable']);
             $this->assignRef('countShowlist', $countShowlist);
             $this->addTemplatePath(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . 'source' . $sourceType . DS . 'views' . DS . 'maintenance' . DS . 'tmpl');
             echo $this->loadTemplate('edit_source_profile');
             break;
         default:
             // Display the template
             parent::display($tpl);
             break;
     }
 }
Example #9
0
 /**
  * Method to get the field options.
  *
  * @return    array    The field option objects.
  * @since    1.6
  */
 public function getInput()
 {
     // load core and extra mootools
     JHTML::_('behavior.framework');
     JHtmlBehavior::framework();
     JHtmlBehavior::framework(true);
     // Must load admin language files
     $lang = JFactory::getLanguage();
     $lang->load("com_jevents", JPATH_ADMINISTRATOR);
     $node = $this->element;
     $value = $this->value;
     $name = $this->name;
     $control_name = $this->type;
     $help = $node['help'];
     if (!is_null($help) && version_compare(JVERSION, '1.6.0', ">=")) {
         if (is_object($help)) {
             $help = (string) $help;
         }
         $help = isset($help) && JString::strlen($help) <= 0 ? null : $help;
     }
     if (!is_null($help)) {
         $parts = explode(",", $value);
         $helps = explode(",", $help);
         foreach ($parts as $key => $valuepart) {
             $help = $helps[$key];
             list($helpfile, $varname, $part) = explode("::", $help);
             $lang = JFactory::getLanguage();
             $langtag = $lang->getTag();
             if (file_exists(JPATH_COMPONENT_ADMINISTRATOR . '/help/' . $langtag . '/' . $helpfile)) {
                 $jeventHelpPopup = JPATH_COMPONENT_ADMINISTRATOR . '/help/' . $langtag . '/' . $helpfile;
             } else {
                 $jeventHelpPopup = JPATH_COMPONENT_ADMINISTRATOR . '/help/en-GB/' . $helpfile;
             }
             if (!file_exists($jeventHelpPopup)) {
                 return "";
             }
             include $jeventHelpPopup;
             $help = $this->help(${$varname}, $part);
             $parts[$key] = JText::_($valuepart) . $help;
         }
         $value = implode(", ", $parts);
     }
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     return "<strong style='color:#993300'>" . JText::_($value) . "</strong>";
 }
Example #10
0
    /**
     * register
     *
     * @return  void
     */
    public static function register()
    {
        /** @var $doc \JDocumentHtml */
        $doc = \JFactory::getDocument();
        $es = \Ezset::getInstance();
        $input = \JFactory::getApplication()->input;
        if ($doc->getType() !== 'html') {
            return;
        }
        $uri = \JUri::getInstance();
        $root = $uri::root();
        $base = $uri::base();
        $host = $uri->toString(array('scheme', 'host')) . '/';
        if ($smoothScroll = $es->params->get('smoothScroll', 0)) {
            \JHtmlBehavior::framework(true);
        }
        $smoothScroll = $smoothScroll ? 'true' : 'false';
        $confirmLeave = $es->params->get('confirmLeave', 0) && UriChecker::isArticleEdit() ? 'true' : 'false';
        $logoLink = \JFactory::getApplication()->isAdmin() ? 'true' : 'false';
        $script = <<<SCRIPT
<script type="text/javascript">
\tvar ezsetOption = {
\t\tsmoothScroll: {$smoothScroll},
\t\tconfirmLeave: {$confirmLeave},
\t\tlogoLink: {$logoLink}
\t};

\tvar ezsetConfig = {
\t\troot : '{$root}',
\t\tbase : '{$base}',
\t\thost : '{$host}'
\t};

\tEzset.init(ezsetOption, ezsetConfig);
</script>
SCRIPT;
        $doc->addCustomTag($script);
        $doc->addScript(\JUri::root(true) . '/plugins/system/ezset/asset/js/ezset.js');
        $doc->addScript(\JUri::root(true) . '/ezset/js/ezset-custom.js');
    }
<?php

/**
 * Part of Component Akquickicons files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
use Windwalker\Data\Data;
use Windwalker\Html\HtmlElement;
// No direct access
defined('_JEXEC') or die;
// Prepare script
JHtmlBehavior::multiselect('adminForm');
/**
 * Prepare data for this template.
 *
 * @var $container Windwalker\DI\Container
 * @var $data      Windwalker\Data\Data
 * @var $asset     Windwalker\Helper\AssetHelper
 * @var $grid      Windwalker\View\Helper\GridHelper
 * @var $date      \JDate
 */
$container = $this->getContainer();
$asset = $container->get('helper.asset');
$grid = $data->grid;
$date = $container->get('date');
$asset->addCss('akicons.css');
$asset->addCss('font-awesome.css');
// Set order script.
$grid->registerTableSort();
Example #12
0
 /**
  * Plugin that registers the jQuery javascript framework
  */
 public function onAfterDispatch()
 {
     jimport('joomla.html.html.behavior');
     JHtmlBehavior::register('jquery', array('script' => array('media/jquery/jquery.js' => array())));
 }
Example #13
0
 public function onContentPrepare($context, &$row, &$params, $page = 0)
 {
     if (is_file(JPATH_ADMINISTRATOR . '/components/com_imageshow/classes/jsn_is_factory.php')) {
         include_once JPATH_ADMINISTRATOR . '/components/com_imageshow/classes/jsn_is_factory.php';
     } else {
         return;
     }
     if ($this->_application->isAdmin()) {
         return;
     }
     JPlugin::loadLanguage('plg_content_imageshow', JPATH_BASE);
     $dispatcher = JDispatcher::getInstance();
     $objUtils = JSNISFactory::getObj('classes.jsn_is_utils');
     $objJSNShow = JSNISFactory::getObj('classes.jsn_is_show');
     $objJSNShowcase = JSNISFactory::getObj('classes.jsn_is_showcase');
     $objJSNShowlist = JSNISFactory::getObj('classes.jsn_is_showlist');
     $objJSNImages = JSNISFactory::getObj('classes.jsn_is_images');
     $coreData = $objUtils->getComponentInfo();
     $coreInfo = json_decode($coreData->manifest_cache);
     preg_match_all('/\\{imageshow (.*)\\/\\}/U', $row->text, $matches, PREG_SET_ORDER);
     $paramsCom = $this->_application->getParams('com_imageshow');
     $language = '';
     $shortEdition = $objUtils->getShortEdition();
     if ($objUtils->checkSupportLang()) {
         $objLanguage = JFactory::getLanguage();
         $language = $objLanguage->getTag();
     }
     $display = false;
     $authAvailable = $this->_user->getAuthorisedViewLevels();
     if (count($matches)) {
         for ($i = 0, $counti = count($matches); $i < $counti; $i++) {
             $data = explode(' ', $matches[$i][1]);
             $width = '';
             $height = '';
             $html = '';
             $showListID = 0;
             $showCaseID = 0;
             foreach ($data as $values) {
                 $value = $values;
                 if (stristr($values, 'sl')) {
                     $showListValue = explode('=', $values);
                     $showListID = $showListValue[1];
                 } elseif (stristr($values, 'sc')) {
                     $showCaseValue = explode('=', $values);
                     $showCaseID = $showCaseValue[1];
                 } elseif (stristr($values, 'w')) {
                     $widthValue = explode('=', $values);
                     $width = str_replace($values, $widthValue[1], $values);
                 } elseif (stristr($values, 'h')) {
                     $heightValue = explode('=', $values);
                     $height = str_replace($values, $heightValue[1], $values);
                 }
             }
             $showlistInfo = $objJSNShowlist->getShowListByID($showListID);
             if (is_null($showlistInfo)) {
                 $missingDataBox = $objUtils->displayShowlistMissingMessage();
                 $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", $missingDataBox, $row->text);
             }
             $showcaseInfo = $objJSNShowcase->getShowCaseByID($showCaseID);
             if (is_null($showcaseInfo)) {
                 $missingDataBox = $objUtils->displayShowcaseMissingMessage();
                 $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", $missingDataBox, $row->text);
             }
             $themeProfile = false;
             if ($showcaseInfo) {
                 $objJSNTheme = JSNISFactory::getObj('classes.jsn_is_showcasetheme');
                 $themeProfile = $objJSNTheme->getThemeProfile($showcaseInfo->showcase_id);
             }
             if (!$themeProfile) {
                 $missingDataBox = $objUtils->displayThemeMissingMessage();
                 $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", $missingDataBox, $row->text);
             }
             if (!is_null($showcaseInfo) && !is_null($showlistInfo) && $themeProfile) {
                 $themeInfo = $objJSNTheme->getThemeInfo($themeProfile->theme_name);
                 $editionVersion = '<!-- ' . @$coreInfo->description . ' ' . @$coreInfo->version . ' - ' . @$themeInfo->name . ' ' . @$themeInfo->version . ' -->';
                 if ($width != '') {
                     $width = $width;
                 } else {
                     $width = @$showcaseInfo->general_overall_width;
                 }
                 if ($height != '') {
                     $height = $height;
                 } else {
                     $height = @$showcaseInfo->general_overall_height;
                 }
                 $articleAuth = $objJSNShow->getArticleAuth($showListID);
                 $imagesData = $objJSNImages->getImagesByShowlistID($showlistInfo['showlist_id']);
                 if (!in_array($showlistInfo['access'], $authAvailable)) {
                     $display = false;
                 } else {
                     $display = true;
                 }
                 if ($width == '') {
                     $width = '100%';
                 }
                 if ($height == '') {
                     $height = '100';
                 }
                 $posPercentageWidth = strpos($width, '%');
                 if ($posPercentageWidth) {
                     $width = substr($width, 0, $posPercentageWidth + 1);
                 } else {
                     $width = (int) $width;
                 }
                 $height = (int) $height;
                 $object = new stdClass();
                 $object->width = $width;
                 $object->height = $height;
                 $object->showlist_id = $showListID;
                 $object->showcase_id = $showCaseID;
                 $object->item_id = 0;
                 $object->random_number = $objUtils->randSTR(8);
                 $object->language = $language;
                 $object->edition = $shortEdition;
                 $object->images = $imagesData;
                 $object->showlist = $showlistInfo;
                 $object->showcase = $showcaseInfo;
                 $object->theme_id = $themeProfile->theme_id;
                 $object->theme_name = $themeProfile->theme_name;
                 $object->plugin = true;
                 $html .= $editionVersion;
                 $html .= '<div class="jsn-container">';
                 $html .= '<div class="jsn-gallery">';
                 $result = $objJSNTheme->displayTheme($object);
                 if ($result !== false) {
                     $html .= $result;
                 }
                 $html .= '</div>';
                 $html .= '</div>';
                 if ($display) {
                     $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", $html, $row->text);
                 } else {
                     if ($showlistInfo['authorization_status']) {
                         $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", '<div>' . $articleAuth['introtext'] . $articleAuth['fulltext'] . '</div>', $row->text);
                     } else {
                         $row->text = str_replace("{imageshow " . $matches[$i][1] . "/}", '&nbsp;', $row->text);
                     }
                 }
             }
         }
     }
     preg_match_all('/\\{imageshow (.*)\\}(.*)\\{\\/imageshow\\}/U', $row->text, $matchesLink, PREG_SET_ORDER);
     if (count($matchesLink)) {
         for ($z = 0; $z < count($matchesLink); $z++) {
             $dataLink = explode(' ', $matchesLink[$z][1]);
             $width = '';
             $height = '';
             $showCaseID = 0;
             $showListID = 0;
             foreach ($dataLink as $values) {
                 $value = $values;
                 if (stristr($values, 'sl')) {
                     $showListValue = explode('=', $values);
                     $showList = str_replace($values, 'showlist_id=' . $showListValue[1], $values);
                     $showListID = $showListValue[1];
                 } elseif (stristr($values, 'sc')) {
                     $showCaseValue = explode('=', $values);
                     $showCase = str_replace($values, 'showcase_id=' . $showCaseValue[1], $values);
                     $showCaseID = $showCaseValue[1];
                 } elseif (stristr($values, 'w')) {
                     $widthValue = explode('=', $values);
                     $width = str_replace($values, $widthValue[1], $values);
                 } elseif (stristr($values, 'h')) {
                     $heightValue = explode('=', $values);
                     $height = str_replace($values, $heightValue[1], $values);
                 }
             }
             $showlistInfo = $objJSNShowlist->getShowListByID($showListID);
             $showcaseInfo = $objJSNShowcase->getShowCaseByID($showCaseID, true, 'loadAssoc');
             if ($width != '') {
                 $width = $width;
             } else {
                 $width = $showcaseInfo['general_overall_width'];
             }
             if ($height != '') {
                 $height = $height;
             } else {
                 $height = $showcaseInfo['general_overall_height'];
             }
             if (strpos($width, '%')) {
                 $width = '650';
             }
             $width = (int) $width;
             $height = (int) $height;
             $sefRewrite = JFactory::getConfig()->get('sef_rewrite');
             $link = $sefRewrite ? '' : 'index.php';
             $link .= '?option=com_imageshow&amp;tmpl=component&amp;view=show&amp;' . $showList . '&amp;' . $showCase . '&amp;w=' . $width . '&amp;h=' . $height;
             $html = '<a rel="{handler: \'iframe\', size: {x: ' . $width . ', y: ' . $height . '}}" href="' . $link . '" class="modal">' . $matchesLink[$z][2] . '</a>';
             $row->text = str_replace("{imageshow " . $matchesLink[$z][1] . "}" . $matchesLink[$z][2] . "{/imageshow}", $html, $row->text);
         }
     }
     if (count($matchesLink) || count($matches)) {
         JHtmlBehavior::framework();
         JHTML::_('behavior.modal', 'a.modal');
     }
     return true;
 }
Example #14
0
 /**
  * Get Preview Image.
  *
  * @return  string Preview image html.
  */
 public function getPreview()
 {
     // The Preview.
     $preview = (string) $this->element['preview'];
     $showPreview = true;
     $showAsTooltip = false;
     switch ($preview) {
         case 'no':
             // Deprecated parameter value
         // Deprecated parameter value
         case 'false':
         case 'none':
             $showPreview = false;
             break;
         case 'yes':
             // Deprecated parameter value
         // Deprecated parameter value
         case 'true':
         case 'show':
             break;
         case 'tooltip':
         default:
             $this->showAsTooltip = $showAsTooltip = true;
             $options = array('onShow' => 'AKFinderRefreshPreviewTip(this)');
             JHtmlBehavior::tooltip('.hasTipPreview', $options);
             break;
     }
     if ($showPreview) {
         if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) {
             $src = JURI::root() . $this->value;
         } else {
             $src = '';
         }
         $width = (int) XmlHelper::get($this->element, 'preview_width', 300);
         $height = (int) XmlHelper::get($this->element, 'preview_height', 200);
         $style = '';
         $style .= $width > 0 ? 'max-width:' . $width . 'px;' : '';
         $style .= $height > 0 ? 'max-height:' . $height . 'px;' : '';
         $style .= !$showAsTooltip ? 'margin: 10px 0;' : '';
         $imgattr = array('id' => $this->id . '_preview', 'class' => 'media-preview', 'style' => $style);
         $imgattr['class'] = $showAsTooltip ? $imgattr['class'] : $imgattr['class'] . ' img-polaroid';
         $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr);
         $previewImg = '<div id="' . $this->id . '_preview_img"' . ($src ? '' : ' style="display:none"') . '>' . $img . '</div>';
         $previewImgEmpty = '<div id="' . $this->id . '_preview_empty"' . ($src ? ' style="display:none"' : '') . '>' . JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>';
         $html[] = '<div class="media-preview add-on fltlft">';
         if ($showAsTooltip) {
             $tooltip = $previewImgEmpty . $previewImg;
             $options = array('title' => JText::_('JLIB_FORM_MEDIA_PREVIEW_SELECTED_IMAGE'), 'text' => '<i class="icon-eye"></i>', 'class' => 'hasTipPreview');
             $options['text'] = JVERSION >= 3 ? $options['text'] : JText::_('JLIB_FORM_MEDIA_PREVIEW_TIP_TITLE');
             $html[] = JHtml::tooltip($tooltip, $options);
         } else {
             $html[] = ' ' . $previewImgEmpty;
             $html[] = ' ' . $previewImg;
             $html[] = '<script type="text/javascript">AKFinderRefreshPreview("' . $this->id . '");</script>';
         }
         $html[] = '</div>';
     }
     return implode("\n", $html);
 }
 /**
  * Method to load the MooTools & More framework into the document head
  *
  * If debugging mode is on an uncompressed version of MooTools is included for easier debugging.
  *
  * @param   mixed  $debug  Is debugging mode on? [optional]
  *
  * @return  AssetManager Return self to support chaining.
  */
 public function mootools($debug = null)
 {
     \JHtmlBehavior::framework(true, $debug);
     return $this;
 }
Example #16
0
 /**
  * Add JS to head.
  *
  * @return  void
  */
 public function addFieldJs()
 {
     JHtmlBehavior::framework(true);
     $asset = $this->container->get('helper.asset');
     $input = $this->container->get('input');
     $asset->addJS('cck/fields.js', $input->get('option'));
 }
Example #17
0
<?php

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: default.php 84 2012-08-17 07:16:08Z quannv $
 **/
defined('_JEXEC') or die('Restricted access');
JHtmlBehavior::calendar();
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel();
JToolBarHelper::title(JText::_('COM_BOOKPRO_COUPON_EDIT'), 'user.png');
?>
     

<form action="index.php" method="post" name="adminForm" id="adminForm">
			 <div class="form-horizontal">     
			 	<div class="control-group">
					<label class="control-label" for="pickup"> <?php 
echo JText::_('COM_BOOKPRO_TOUR_HOTEL');
?>
					</label>
					<div class="controls">
						<?php 
echo $this->hotels;
?>
					</div>
Example #18
0
    protected function getInput()
    {
        jimport('joomla.filesystem.folder');
        $invalue = str_replace(" ", "", $this->value);
        $invalue = explode(",", $invalue);
        $pluginsDir = JPATH_ROOT . '/plugins/jevents';
        $filterpath = $pluginsDir . "/filters";
        $this->filterpath = array();
        if (JFolder::exists($filterpath)) {
            $this->filterpath[] = $filterpath;
        }
        $this->filterpath[] = JPATH_SITE . "/components/com_jevents/libraries/filters";
        if (JFolder::exists(JPATH_SITE . "/plugins/jevents")) {
            $others = JFolder::folders(JPATH_SITE . "/plugins/jevents", 'filters', true, true);
            if (is_array($others)) {
                $this->filterpath = array_merge($this->filterpath, $others);
            }
        }
        $filters = array();
        include_once JPATH_SITE . "/components/com_jevents/libraries/filters.php";
        foreach ($this->filterpath as $path) {
            foreach (JFolder::files($path, ".php") as $filtername) {
                if (!array_key_exists($filtername, $filters)) {
                    if (strpos($filtername, "-") > 0 || strpos($filtername, ".zip") > 0 || strpos($filtername, ".php") != strlen($filtername) - 4) {
                        continue;
                    }
                    $filterpath = $path . "/" . $filtername;
                    $filtername = substr($filtername, 0, strlen($filtername) - 4);
                    // skip special function filters
                    if ($filtername == "startdate" || $filtername == "Startdate") {
                        continue;
                    }
                    $filter = "jev" . ucfirst($filtername) . "Filter";
                    if (!class_exists($filter)) {
                        include_once $filterpath;
                    }
                    if (!class_exists($filter)) {
                        continue;
                    }
                    $filters[$filtername] = $path . "/" . $filter;
                }
            }
        }
        $validvalues = array();
        $input = '<div style="clear:left"></div><table><tr valign="top">
			<td><div style="font-weight:bold">' . JText::_("JEV_CLICK_TO_ADD_FILTER") . '</div>
			<div id="filterchoices" style="width:150px;margin-top:10px;height:100px;;border:solid 1px #ccc;overflow-y:auto" >';
        foreach ($filters as $filter => $filterpath) {
            if (!in_array($filter, $invalue) && !in_array(strtolower($filter), $invalue)) {
                $input .= '<div>' . $filter . "<span style='display:none'>{$filter}</span></div>";
                $validvalues[] = $filter;
            }
        }
        $validvalue = implode(",", $validvalues);
        $input .= '</div></td>
		<td><div  style="font-weight:bold">' . JText::_("JEV_FILTER_CLICK_TO_REMOVE") . '</div>
			<div id="filtermatches" style="margin:10px 0px 0px 10px;">';
        $invalues = array();
        foreach ($invalue as $filter) {
            if (array_key_exists($filter, $filters) || array_key_exists(ucfirst($filter), $filters)) {
                $filter = ucfirst($filter);
                $input .= '<div id="filter' . $filter . '">' . $filter . "</div>";
                $invalues[] = $filter;
            }
        }
        $invalues = implode(",", $invalues);
        $input .= '</div></td>
			</tr></table>';
        // load core and extra mootools
        JHTML::_('behavior.framework');
        JHtmlBehavior::framework();
        JHtmlBehavior::framework(true);
        JEVHelper::script('modules/mod_jevents_filter/fields/filterSelect.js');
        // Initialize some field attributes.
        $size = $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
        $maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
        $class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
        $readonly = (string) $this->element['readonly'] == 'true' ? ' readonly="readonly"' : '';
        $disabled = (string) $this->element['disabled'] == 'true' ? ' disabled="disabled"' : '';
        // Initialize JavaScript field attributes.
        $onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
        return $input . '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $class . $size . $disabled . $readonly . $onchange . $maxLength . '/>';
    }
Example #19
0
<?php

/**
 * @package     Joomla.Site
 * @subpackage  Layout
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('JPATH_BASE') or die;
JHtmlBehavior::core();
JFactory::getDocument()->addScriptDeclaration('
	jQuery(document).ready(function($)
	{
		if (window.toggleSidebar)
		{
			toggleSidebar(true);
		}
		else
		{
			$("#j-toggle-sidebar-header").css("display", "none");
			$("#j-toggle-button-wrapper").css("display", "none");
		}
	});
');
?>

<div id="j-toggle-sidebar-wrapper">
	<div id="j-toggle-button-wrapper" class="j-toggle-button-wrapper">
		<?php 
echo JLayoutHelper::render('joomla.sidebars.toggle');
Example #20
0
<?php

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: default.php  23-06-2012 23:33:14
 **/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtmlBehavior::modal('a.amodal');
AImporter::helper('form', 'currency');
AImporter::css('common');
$config = JComponentHelper::getParams('com_bookpro');
?>

<form name="frontForm" method="post" action="index.php" id="paymentForm">
	<div class="row-fluid">
		<div class="span7">
		<div class="well well-small">
			<div class="well well-small" style="background-color: white; ">
			<?php 
echo $this->loadTemplate(strtolower($this->order->type));
?>
			<?php 
echo $this->loadTemplate('cart');
?>
			</div>
		 </div>
Example #21
0
<?php

/**
 * @package     RedSHOP.Frontend
 * @subpackage  Template
 *
 * @copyright   Copyright (C) 2005 - 2013 redCOMPONENT.com. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die;
JHtml::_('behavior.tooltip');
JHtmlBehavior::modal();
$uname = '';
$uemail = '';
$address = '';
$telephone = '';
$user = JFactory::getUser();
if ($user->id) {
    $uname = $user->name;
    $uemail = $user->email;
}
$category_id = $this->input->getInt('category_id', null);
JHtml::Script('jquery.tools.min.js', 'components/com_redshop/assets/js/', false);
$template = $this->redTemplate->getTemplate('ask_question_template');
if (count($template) > 0 && $template[0]->template_desc != "") {
    $template_desc = $template[0]->template_desc;
} else {
    $template_desc = '<table border="0"><tbody><tr><td>{user_name_lbl}</td><td>{user_name}</td></tr><tr><td>{user_email_lbl}</td><td>{user_email}</td></tr><tr><td>{user_question_lbl}</td><td>{user_question}</td></tr><tr><td></td><td>{send_button}</td></tr></tbody></table>';
}
?>
<script type="text/javascript" language="javascript">var J = jQuery.noConflict();</script>
Example #22
0
 /**
  * Tests the noframes method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testNoFrames()
 {
     JHtmlBehavior::noframes();
     $this->assertEquals(array('JHtmlBehavior::core' => true, 'JHtmlBehavior::noframes' => true), JHtmlBehaviorInspector::getLoaded(), 'The no frames behavior is not loaded with all dependencies');
 }
Example #23
0
 /**
  * Internal method to get a JavaScript object notation string from an array
  *
  * @param   array  $array	The array to convert to JavaScript object notation
  *
  * @return  string  JavaScript object notation representation of the array
  * @since   11.1
  */
 protected static function _getJSObject($array = array())
 {
     // Initialise variables.
     $object = '{';
     // Iterate over array to build objects
     foreach ((array) $array as $k => $v) {
         if (is_null($v)) {
             continue;
         }
         if (is_bool($v)) {
             if ($k === 'fullScreen') {
                 $object .= 'size: { ';
                 $object .= 'x: ';
                 $object .= 'window.getSize().x-80';
                 $object .= ',';
                 $object .= 'y: ';
                 $object .= 'window.getSize().y-80';
                 $object .= ' }';
                 $object .= ',';
             } else {
                 $object .= ' ' . $k . ': ';
                 $object .= $v ? 'true' : 'false';
                 $object .= ',';
             }
         } else {
             if (!is_array($v) && !is_object($v)) {
                 $object .= ' ' . $k . ': ';
                 $object .= is_numeric($v) || strpos($v, '\\') === 0 ? is_numeric($v) ? $v : substr($v, 1) : "'" . $v . "'";
                 $object .= ',';
             } else {
                 $object .= ' ' . $k . ': ' . JHtmlBehavior::_getJSObject($v) . ',';
             }
         }
     }
     if (substr($object, -1) == ',') {
         $object = substr($object, 0, -1);
     }
     $object .= '}';
     return $object;
 }
Example #24
0
function jnewsbot_content_editab($forms)
{
    if (version_compare(JVERSION, '3.0.0', '<')) {
        JHTML::_('behavior.mootools');
    } else {
        JHtmlBehavior::framework();
    }
    $siteContent = new siteContent();
    //	$limit = -1;
    $limit = 5;
    $limittotal = $siteContent->countSiteCount();
    $setLimit = jnews::setLimitPagination($limittotal);
    $action = JRequest::getVar('act', '', '', 'WORD');
    $task = JRequest::getVar('task');
    $contentsearch = JRequest::getVar('contentsearch', '');
    echo $forms['main'];
    $hidden = '<input type="hidden" name="option" value="' . JNEWS_OPTION . '" />';
    $hidden .= '<input type="hidden" name="limit" value="' . $limit . '" />';
    $toSearch = new stdClass();
    $toSearch->forms = '';
    $toSearch->hidden = $hidden;
    $toSearch->listsearch = $contentsearch;
    $toSearch->id = 'contentsearch';
    $app = JFactory::getApplication();
    $setSort = new stdClass();
    if (!isset($_POST['c_filter_order'])) {
        $setSort->orderValue = "a.id";
    } else {
        $setSort->orderValue = $_POST['filter_order'];
    }
    //$setSort->orderValue = $app->getUserStateFromRequest(JNEWS_OPTION . '.content.filter_order', 'filter_order', 'a.id', 'cmd');
    $setSort->orderDir = $app->getUserStateFromRequest(JNEWS_OPTION . '.content.filter_order_Dir', 'filter_order_Dir', 'desc', 'word');
    //$setSort->orderValue  = "a.id";
    $contentItems = jnewsbot_content_getitems($contentsearch, $setLimit, $setSort);
    ob_start();
    $js = "function setContentTag(id, url, changeType , hide_title)\n           {\n\n                if(hide_title ==undefined)\n                {\n                    var check_title =  document.getElementById('hide_title_no').checked;\n                    if(check_title) hide_title = 0;\n                    else            hide_title = 1;\n\n                }\n\n\n\n                var form = document.adminForm;\n                if(!form)\n                {\n                        form = document.mosForm;\n                }\n\n                if(form.content_type[2].checked === false)\n                {\n                        document.getElementById('hide_title_yes').disabled=false;\n                }\n                else\n                {\n                      document.getElementById('hide_title_no').click();\n                      hide_title = 0;\n                      document.getElementById('hide_title_yes').disabled=true;\n                }\n                if(id!=null)\n                {\n                        for (i=0; i<form.content_type.length; i++)\n                        {\n                                if (form.content_type[i].checked)\n                                {\n                                        var content_type = form.content_type[i].value;\n                                }\n                        }";
    //   if ( @include_once( JNEWSPATH_ADMIN . 'social' .DS. 'class.social.php' ) ) {
    if (!$GLOBALS[JNEWS . 'use_tags'] and class_exists('jNews_Social') or !$GLOBALS[JNEWS . 'use_tags'] and $GLOBALS[JNEWS . 'level'] > 2) {
        $js .= "\n                            if(changeType!=null)\n                                id = document.getElementById('insertbot').value;\n\n                            template = window.top.document.getElementById('template_id');\n                            templateid = template.value;\n\n                            var tag =  id;\n                            if(id != 0)\n                                getContent(id, content_type, url,templateid);\n\n                            form.contenttag.value = tag;\n                    }\n                    //if id == null\n                    else\n                    {\n                            var tag = form.contentreplace.value;";
        if (version_compare(JVERSION, '1.6.0', '<')) {
            //1.5
            $js .= " if(window.top.insertTag(tag)){window.top.document.getElementById('sbox-window').close();}";
        } else {
            if (version_compare(JVERSION, '3.0.0', '<')) {
                $js .= ' if(window.top.insertTag(tag)) {window.parent.SqueezeBox.close();}';
            } else {
                $js .= 'if(window.top.insertTag(tag))
                                        {
                                            var need_click = jQuery(window.top.document).find("div.modal-backdrop");
                                            if(need_click.length == 0) window.parent.SqueezeBox.close();
                                            else    jQuery(window.top.document).find("div.modal-backdrop").click();}';
            }
        }
        $js .= "}\n                      }";
    } else {
        $js .= "\n                                if(changeType==null)\n                                        form.botID.value= id;\n\n                                var tag = '{contentitem:' + form.botID.value + '|' + content_type +'|'+hide_title+ '}';\n\n                                form.contenttag.value = tag;\n                    }\n                    //if id -- null\n                    else\n                    {\n\n                                var tag = form.contenttag.value;";
        if (version_compare(JVERSION, '1.6.0', '<')) {
            //1.5
            $js .= " if(window.top.insertTag(tag)){window.top.document.getElementById('sbox-window').close();}";
        } else {
            if (version_compare(JVERSION, '3.0.0', '<')) {
                $js .= ' if(window.top.insertTag(tag)) {window.parent.SqueezeBox.close();}';
            } else {
                $js .= ' if(window.top.insertTag(tag)) {
                                                var need_click = jQuery(window.top.document).find("div.modal-backdrop");
                                                if(need_click.length == 0) window.parent.SqueezeBox.close();
                                                else    jQuery(window.top.document).find("div.modal-backdrop").click();}';
            }
        }
        $js .= "}\n                            }";
    }
    //end function
    if (version_compare(JVERSION, '1.6.0', '<')) {
        //1.5
        $js .= "\n\n \t\t\tfunction getContent(id, content_type, url, templateid){\n\n \t\t\t\tvar ajax = new Ajax(url,\n \t\t\t\t\t{data: 'artId='+id+'&content_type='+content_type+'&templateid='+templateid,\n \t\t\t\t\tmethod: 'POST',\n \t\t\t\t\tonComplete : function(result){insertContent(result, id); }\n \t\t\t\t\t}\n \t\t\t\t);\n \t\t\t\tajax.request();\n \t\t\t}";
    } else {
        $js .= "\n \t\t\tfunction getContent(id, content_type, url,templateid){\n\n\t\t\t\tvar ajax = new Request({\n\t\t\t\turl : url,\n\t\t\t\tdata: 'artId='+id+'&content_type='+content_type+'&templateid='+templateid,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tonComplete : function(result){insertContent(result, id); }\n\t\t\t\t});\n\t\t\t\tajax.send();\n \t\t\t}";
    }
    $js .= "\n \t\t\tfunction insertContent(html, id){\n\t\t\t\tvar form = document.adminForm;\n\t\t\t\tif(!form){\n\t\t\t\t\tform = document.mosForm;\n\t\t\t\t}\n\n\t\t\t\tvar root = document.createElement('div');\n\n\t\t\t\troot.innerHTML = html;\n\t\t\t\tvar body = document.getElementsByTagName('body')[0].appendChild(root);\n\n\t\t\t\troot.setAttribute(\"style\", \"width:150px; display:none\");\n\t\t\t\tvar element = document.getElementById('artcontent_'+id);\n\n\t\t\t\tform.contentreplace.value = element.innerHTML;\n\n\t\t\t\tdocument.getElementsByTagName('body')[0].removeChild(root);\n\t\t\t}\n\t\t\t";
    $url = jNews_Tools::completeLink('option=' . JNEWS_OPTION . '&act=mailing&task=articleContent', false, false, true);
    $doc = JFactory::getDocument();
    $doc->addScriptDeclaration($js);
    ?>

    <style type="text/css">
        table.smartcontent {
            border: 1px solid #D5D5D5;
            background-color: #F6F6F6;
            width: 100%;
            margin-bottom: 10px;
            -moz-border-radius:3px;
            -webkit-border-radius:3px;
            padding: 5px;
        }
        table.smartcontent td.key {
            background-color: #f6f6f6;
            text-align: left;
            width: 140px;
            color: #666;
            font-weight: bold;
            border-bottom: 1px solid #e9e9e9;
            border-right: 1px solid #e9e9e9;
        }
    </style>
    <div id="element-box">
        <div class="t">
            <div class="t">
                <div class="t"></div>
            </div>
        </div>
        <div class="m">




    <!--<form name="adminForm" method="post" action="index.php?option=<?php 
    echo JNEWS_OPTION;
    ?>
&tmpl=component">-->
            <table class="smartcontent" width="100%"">
                   <tr>
                    <td width="185" class="key">
                        <span class="editlinktip">
                            <?php 
    $tip = _JNEWS_AUTONEWS_TYPE_TIPS;
    $title = _JNEWS_AUTONEWS_TYPE;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
                        </span>
                    </td>
                    <td style="vertical-align: top;">
                        <span class="editlinktip">
    <?php 
    $tip = _JNEWS_TITLE_ONLY_TIPS;
    $title = _JNEWS_TITLE_ONLY;
    $title_only = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    $tip = _JNEWS_INTRO_ONLY_TIPS;
    $title = _JNEWS_INTRO_ONLY;
    $intro_only = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    $tip = _JNEWS_FULL_ARTICLE_TIPS;
    $title = _JNEWS_FULL_ARTICLE;
    $full_article = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    //                                $tip =  _JNEWS_HIDE_TITTLE_ARTICLE_TIPS;
    //				$title =  _JNEWS_HIDE_TITLE ;
    //				$hide_title = "<span class=\"editlinktip\">" . jNews_Tools::toolTip( $tip, '', 280, 'tooltip.png', $title, '', 0 ) . "</span>";
    ?>
                        </span>
                        <span class="editlinktip">
                            <input id="content_type" type="radio" name="content_type" value="0" checked="checked" onclick="setContentTag(1,'<?php 
    echo $url;
    ?>
', 0);"/><?php 
    echo $full_article;
    ?>
                            <input id="content_type" type="radio" name="content_type" value="1" onclick="setContentTag(1, '<?php 
    echo $url;
    ?>
', 1);"/><?php 
    echo $intro_only;
    ?>
                            <input id="content_type" type="radio" name="content_type" value="2" onclick="setContentTag(1, '<?php 
    echo $url;
    ?>
', 2);"/><?php 
    echo $title_only;
    ?>
                            <!--<input id="content_type" type="radio" name="content_type" value="3" onclick="setContentTag(1, '<?php 
    //echo $url
    ?>
', 3);"/><?php 
    //echo $hide_title;
    ?>
-->
                        </span>

                    </td>
                    <td rowspan="2">
                        <input onclick="setContentTag(null,'<?php 
    echo $url;
    ?>
')" class="inserttag" type="button" label="Insert Content" name="Insert Content" value="Insert Content"/>
                    </td>
                </tr>

                <tr>
                    <td width="185" class="key">
                        <span class="editlinktip">
    <?php 
    $tip = _JNEWS_CONTENT_TIP;
    $title = _JNEWS_CONTENT_ID;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
                        </span>
                    </td>
                    <td style="vertical-align: top;">
                                    <!--  <input type="text" onchange="setCaptionTags();" size="60px" name="jnewstagcaption"> -->
                        <input id="insertbot" type="text" size="20px" name="contenttag" value="0"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input id="insertbot" type="hidden" size="60px" name="contentreplace" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input id="botID" size="10px" name="botID" value="0" type="hidden"/>
                    </td>
                </tr>


                <tr>
                    <td width="185" class="key">
                        <span class="editlinktip">
                    <?php 
    $tip = _JNEWS_HIDE_TITTLE_ARTICLE_TIPS;
    $title = _JNEWS_HIDE_TITLE;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
                        </span>
                    </td>
                    <td style="vertical-align: top;">
                        <input id="hide_title_no" onclick="setContentTag(1, '<?php 
    echo $url;
    ?>
', 2, 0);" type="radio" name="hide_title" value="0" checked="checked" /><?php 
    echo 'No';
    ?>
                        <input id="hide_title_yes" onclick="setContentTag(1, '<?php 
    echo $url;
    ?>
', 2, 1);" type="radio" name="hide_title" value="1" /><?php 
    echo 'Yes';
    ?>

                    </td>
                </tr>
            </table>
            <div id="element-box">
                <div class="t">
                    <div class="t">
                        <div class="t"></div>
                    </div>
                </div>
                <div class="m" style="position:relative;">
                                    <?php 
    echo jnews::setTop($toSearch, null);
    $select_cat = version_compare(JVERSION, '1.6.0', '<') ? 'SELECT CATEGORY' : 'JOPTION_SELECT_CATEGORY';
    ?>
                    <div style="position:absolute;top:5px; left:55%;">
                    <?php 
    $sort_select = JRequest::getVar('filter_category_id', '', 'POST', 'int');
    ?>
                        <select name="filter_category_id" class="inputbox" onchange="this.form.submit()">
                            <option value=""><?php 
    echo JText::_($select_cat);
    ?>
</option>
                            <?php 
    if (version_compare(JVERSION, '1.6.0', '<')) {
        echo getCatListFromJoomla15($sort_select);
    } else {
        echo JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $sort_select);
    }
    ?>
                        </select>
                    </div>
<!--                          border: 1px solid #CCCCCC;-->
                    <table class="joobilist" cellpadding="0" cellspacing="0">
                        <tbody>
                        <thead>
                            <tr>
                                <th class="title">
                                      <?php 
    if ($setSort->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                                <a class="hasTip" title="" onclick="Joomla.tableOrdering('a.title','<?php 
    echo $new_sort;
    ?>
', 'content');" href="#">
                                                    <?php 
    echo JText::_(_JNEWS_TAGPICKLIST_TITLE);
    ?>
                                                    <?php 
    if ($setSort->orderValue == 'a.title') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                                </a>
    <?php 
    //echo _JNEWS_TAGPICKLIST_TITLE;
    // echo jnews::HTML_GridSort(_JNEWS_TAGPICKLIST_TITLE, 'a.title', $setSort->orderDir, $setSort->orderValue);
    ?>
                                </th>
                                <th width="80px" class="title">
                        <?php 
    //echo _JNEWS_TAG_ARTICLESECTION;
    if (version_compare(JVERSION, '1.6.0', '<')) {
        //j15
        echo jnews::HTML_GridSort(_JNEWS_TAG_ARTICLESECTION, 'b.title', $setSort->orderDir, $setSort->orderValue);
    } else {
        ?>

                              <?php 
        if ($setSort->orderDir == 'asc') {
            $new_sort = "desc";
        } else {
            $new_sort = "asc";
        }
        ?>
                                    <a class="hasTip" title="" onclick="Joomla.tableOrdering('c.title_2','<?php 
        echo $new_sort;
        ?>
', 'content');" href="#">
                                        <?php 
        echo JText::_(_JNEWS_TAG_ARTICLESECTION);
        ?>
                                         <?php 
        if ($setSort->orderValue == 'c.title_2') {
            ?>
<i class="icon-arrow-<?php 
            echo $new_sort == "asc" ? "up" : "down";
            ?>
"></i><?php 
        }
        ?>
                                    </a>

<!--                            echo jnews::HTML_GridSort(_JNEWS_TAG_ARTICLESECTION, 'b.title', $setSort->orderDir, $setSort->orderValue);-->
                        <?php 
    }
    ?>
                                </th>
                                <th width="80px" class="title">
                                <?php 
    if ($setSort->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                    <a class="hasTip" title="" onclick="Joomla.tableOrdering('c.title','<?php 
    echo $new_sort;
    ?>
', 'content');" href="#">
                                        <?php 
    echo JText::_(_JNEWS_TAG_ARTICLECATEGORY);
    ?>
                                         <?php 
    if ($setSort->orderValue == 'c.title') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                    </a>
                    <?php 
    //echo _JNEWS_TAG_ARTICLECATEGORY;
    // echo jnews::HTML_GridSort(_JNEWS_TAG_ARTICLECATEGORY, 'c.title', $setSort->orderDir, $setSort->orderValue);
    ?>
                                </th>
                                <th width="30px" class="title">
                                    <?php 
    if ($setSort->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                        <a class="hasTip" title="" onclick="Joomla.tableOrdering('a.id','<?php 
    echo $new_sort;
    ?>
', 'content');" href="#">
                                            ID
                                             <?php 
    if ($setSort->orderValue == 'a.id') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                        </a>
                                        <?php 
    //echo jnews::HTML_GridSort('ID', 'a.id', $setSort->orderDir, $setSort->orderValue, 'task');
    ?>
                                </th>
                            </tr>
                        </thead>
    <?php 
    if (sizeof($contentItems) > 0) {
        $k = 0;
        foreach ($contentItems as $contentItem) {
            if (empty($contentItem->section)) {
                $contentItem->section = JText::_('Uncategorised');
            }
            if (empty($contentItem->category)) {
                $contentItem->category = JText::_('Uncategorised');
            }
            echo '<tr style="cursor:pointer" class="row' . $k . '" onclick="setContentTag(\'' . $contentItem->id . '\',\'' . $url . '\');" ><td>' . $contentItem->title . '</td><td nowrap="nowrap" align="center">' . $contentItem->section . '</td><td nowrap="nowrap" align="center">' . $contentItem->category . '</td><td nowrap="nowrap" align="center">' . $contentItem->id . '</td></tr>';
            //echo '<tr style="cursor:pointer" class="row'.$k.'" onclick="setContentTag(\''.$contentItem->id.'\',\''.$url.'\');" ><td>'.$contentItem->title.'</td><td nowrap="nowrap" align="center">'.$contentItem->section.'</td><td nowrap="nowrap" align="center">'.$contentItem->category.'</td><td nowrap="nowrap" align="center">'.$contentItem->id.'</td></tr>';
            $k = 1 - $k;
        }
    }
    ?>
                        </tbody>
                    </table>
    <?php 
    echo jnews::setPaginationBot($setLimit, 'margin:auto;');
    ?>
                    <input type="hidden" value="<?php 
    echo JNEWS_OPTION;
    ?>
" name="option"/>
                    <input type="hidden" value="<?php 
    echo $action;
    ?>
" name="act"/>
                    <input type="hidden" value="<?php 
    echo $task;
    ?>
" name="task"/>
                    <input type="hidden" value="<?php 
    echo $setSort->orderValue;
    ?>
" name="c_filter_order"/>
                    <input type="hidden" value="<?php 
    echo $setSort->orderValue;
    ?>
" name="filter_order"/>
                    <input type="hidden" value="<?php 
    echo $setSort->orderDir;
    ?>
" name="filter_order_Dir"/>
                    </form>
                </div>
                <div class="b">
                    <div class="b">
                        <div class="b"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="b">
            <div class="b">
                <div class="b"></div>
            </div>
        </div>
    </div>
    <?php 
    $return = ob_get_contents();
    ob_end_clean();
    return array(_JNEWS_CONTENT_ITEM, $return);
}
Example #25
0
<?php

/**
 * Part of Component Fbimporter files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access
defined('_JEXEC') or die;
JHtmlBootstrap::tooltip();
JHtmlFormbehavior::chosen('select');
JHtmlBehavior::formvalidation();
/**
 * Prepare data for this template.
 *
 * @var $container Windwalker\DI\Container
 * @var $data      Windwalker\Data\Data
 * @var $item      \stdClass
 */
$container = $this->getContainer();
$form = $data->form;
$item = $data->item;
$fieldsets = $data->form->getFieldsets();
?>
<!-- Validate Script -->
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'format.edit.cancel' || document.formvalidator.isValid(document.id('adminForm')))
		{
Example #26
0
<?php

/**
 * Part of joomla330 project. 
 *
 * @copyright  Copyright (C) 2011 - 2014 SMS Taiwan, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access
defined('_JEXEC') or die;
JHtmlBehavior::formvalidation();
JHtmlBehavior::keepalive();
JHtmlBootstrap::tooltip();
$data = $this->data;
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'user.cancel' || document.formvalidator.isValid(document.id('user-form'))) {
			Joomla.submitform(task, document.getElementById('user-form'));
		}
		else {
			alert('<?php 
echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));
?>
');
		}
	}

	window.addEvent('domready', function(){
		$$('#toolbar-apply a').addClass('btn btn-primary');
Example #27
0
<?php

/**
 * Part of Component {{extension.name.cap}} files.
 *
 * @copyright   Copyright (C) 2016 {ORGANIZATION}. All rights reserved.
 * @license     GNU General Public License version 2 or later.
 */
// No direct access
defined('_JEXEC') or die;
JHtmlBootstrap::tooltip();
JHtmlFormbehavior::chosen('select');
JHtmlBehavior::formvalidator();
/**
 * Prepare data for this template.
 *
 * @var $this      \Windwalker\View\Engine\PhpEngine
 * @var $container \Windwalker\DI\Container
 * @var $data      \Windwalker\Data\Data
 * @var $item      \stdClass
 */
$container = $this->getContainer();
$form = $data->form;
$item = $data->item;
// Setting tabset
$tabs = array('tab_basic');
?>
<!-- Validate Script -->
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
Example #28
0
if (strpos($task = $input->getCmd('task', ''), '.') !== false) {
    list($controller, $task) = explode('.', $task, 2);
}
if ($controller == "updater") {
    $controller = "update";
}
if ($controller == "configuration") {
    $controller = "maintenance";
    JRequest::setVar('view', $controller);
}
if ($controller == "update" || $controller == "installer" || $controller == "upgrade") {
    JRequest::setVar('view', $controller);
}
if ($option != 'image' && $task != 'editimage') {
    if ($view != 'update' && $view != 'upgrade' && $view != 'about') {
        JHtmlBehavior::framework(true);
    }
}
// Check if all dependency is installed
if ($tmpl !== 'component') {
    include_once JPATH_COMPONENT_ADMINISTRATOR . '/dependency.php';
}
if ($controller) {
    $path = JPATH_COMPONENT_ADMINISTRATOR . DS . 'controllers' . DS . $controller . '.php';
    if (file_exists($path)) {
        require_once $path;
    } else {
        $controller = '';
    }
}
$classname = 'ImageShowController' . $controller;
Example #29
0
<?php

/**
 * @version    SVN: <svn_id>
 * @package    Quick2cart
 * @author     Techjoomla <*****@*****.**>
 * @copyright  Copyright (c) 2009-2015 TechJoomla. All rights reserved.
 * @license    GNU General Public License version 2 or later.
 */
// No direct access
defined('_JEXEC') or die;
//jimport('joomla.form.formvalidator');
jimport('joomla.html.pane');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.tooltip');
JHtmlBehavior::framework();
jimport('joomla.html.parameter');
JToolBarHelper::back(JText::_('QTC_HOME'), 'index.php?option=com_quick2cart');
JToolBarHelper::save($task = 'saveCoupon', $alt = JText::_('QTC_SAVE'));
JToolBarHelper::cancel($task = 'cancelcoupon', $alt = JText::_('QTC_CLOSE'));
//added by aniket
$entered_numerics = "'" . JText::_('QTC_ENTER_NUMERICS') . "'";
// added by sj
?>
<script src="<?php 
echo JUri::root() . 'administrator/components/com_quick2cart/assets/js/geo/jquery-1.7.2.js';
?>
"></script>
<script src="<?php 
echo JUri::root() . 'administrator/components/com_quick2cart/assets/js/geo/jquery.ui.core.js';
?>
Example #30
0
 /**
  *
  * Parse all queue to page
  *
  */
 public function addMedia()
 {
     $document = JFactory::getDocument();
     $docType = $document->getType();
     if ($this->_load_js_language) {
         JSNFactory::localimport('libraries.joomlashine.language.javascriptlanguages');
         $jsLang = JSNJavascriptLanguages::getInstance();
         $this->addScriptDeclaration($jsLang->loadLang());
     }
     if ($this->_docType == 'raw') {
         $medias = array();
         //Add all style file to page
         if (count($this->_styles)) {
             foreach ($this->_styles as $style) {
                 $medias[] = '<link  type="text/css" rel="stylesheet" href="' . $style . '" />';
             }
         }
         //Add all script file to page
         if (count($this->_scripts)) {
             foreach ($this->_scripts as $script) {
                 $medias[] = '<script type="text/javascript" src="' . $script . '"></script>';
             }
             if (!in_array(PoweradminHelper::makeUrlWithSuffix(JSN_POWERADMIN_LIB_JSNJS_URI . 'conflict.js'), $this->_scripts)) {
                 $medias[] = '<script type="text/javascript" src="' . PoweradminHelper::makeUrlWithSuffix(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.conflict.js') . '"></script>';
             }
         }
         //Add all custom tag to page
         if (count($this->_customs)) {
             foreach ($this->_customs as $custom) {
                 $medias[] = $custom;
             }
         }
         //Add all style declaration to page
         if (count($this->_styleDeclaration)) {
             $medias[] = '<style type="text/css">' . implode(PHP_EOL, $this->_styleDeclaration) . '</style>';
         }
         //Add all script declaration to page
         if (count($this->_scriptDeclaration)) {
             $medias[] = '<script type="text/javascript">' . implode(PHP_EOL, $this->_scriptDeclaration) . '</script>';
         }
         echo implode(PHP_EOL, $medias);
     } else {
         //behavior mootools
         JHtmlBehavior::framework();
         //behavior modal
         JHtml::_('behavior.modal');
         //behavior tooltip
         JHtml::_('behavior.tooltip');
         //behavior formvalidation
         JHtml::_('behavior.formvalidation');
         //behavior combobox
         JHtml::_('behavior.combobox');
         //Add all style file to page
         if (count($this->_styles)) {
             foreach ($this->_styles as $style) {
                 $document->addStyleSheet($style);
             }
         }
         $system_js = array();
         $user_js = array();
         $docScripts = $document->_scripts;
         if (count($docScripts)) {
             foreach ($docScripts as $key => $script) {
                 if (strpos($key, '/media/system/') !== false) {
                     $system_js[$key] = $script;
                 } else {
                     if (!is_jquery($key)) {
                         $user_js[$key] = $script;
                     }
                 }
             }
             $document->_scripts = array();
         }
         //Add all script file to page
         if (count($this->_scripts)) {
             foreach ($this->_scripts as $script) {
                 JSNHtmlAsset::addScript($script);
             }
             if (!in_array(PoweradminHelper::makeUrlWithSuffix(JSN_POWERADMIN_LIB_JSNJS_URI . 'conflict.js'), $this->_scripts)) {
                 JSNHtmlAsset::addScript(PoweradminHelper::makeUrlWithSuffix(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.conflict.js'));
             }
         }
         $docScripts = $document->_scripts;
         $index = 0;
         $jsn_jquery = array();
         foreach ($docScripts as $key => $script) {
             if ($index < 2) {
                 $jsn_jquery[$key] = $script;
             } else {
                 $user_js[$key] = $script;
             }
             $index++;
         }
         $document->_scripts = $system_js + $jsn_jquery + $user_js;
         //Add all custom tag to page
         if (count($this->_customs)) {
             foreach ($this->_customs as $custom) {
                 $document->addCustomTag($custom);
             }
         }
         //Add all style declaration to page
         if (count($this->_styleDeclaration)) {
             $document->addStyleDeclaration(implode(PHP_EOL, $this->_styleDeclaration));
         }
         //Add all script declaration to page
         if (count($this->_scriptDeclaration)) {
             $document->addScriptDeclaration(implode(PHP_EOL, $this->_scriptDeclaration));
         }
     }
     $this->_dispatch = true;
     $this->__construct();
 }