* VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * */ if (substr($selected_template, strlen($selected_template)) !== '/') { $selected_template .= '/'; } JHTMLOPC::stylesheet('tabcontent1.css', 'components/com_onepage/themes/' . $selected_template, array()); JHTMLOPC::script('tabcontent.js', 'components/com_onepage/themes/' . $selected_template, false); //JHTMLOPC::script('placeholder.js', 'components/com_onepage/themes/'.$selected_template, false); $javascript = ' window.addEvent("domready", function(){ jQuery(document).ready(function($) { $(\'#edit_address_bt\').live("click", function() { $(this).facebox({ iframe: \'\' }); return false; }); }); } '; $document = JFactory::getDocument(); //$document->addScriptDeclaration($javascript); //$currentlang = JLanguage::getInstance($lang->lang_code); $lang = JFactory::getLanguage(); if (method_exists($lang, 'isRTL')) { if ($lang->isRTL()) { JHTMLOPC::stylesheet('rtl.css', 'components/com_onepage/themes/' . $selected_template, array()); } }
*/ /* $x = file_get_contents(JPATH_SITE.DS.'components'.DS.'com_onepage'.DS.'themes'.DS.'sandwitch'.DS.'blue.css'); $m = array(); preg_match_all('((#([0-9A-Fa-f]{3,6})\b)|(aqua)|(black)|(blue)|(fuchsia)|(gray)|(green)|(lime)|(maroon)|(navy)|(olive)|(orange)|(purple)|(red)|(silver)|(teal)|(white)|(yellow)|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))', $x, $m, PREG_OFFSET_CAPTURE); var_dump($m); die(); */ $version = ''; if (!defined('OPCVERSION')) { if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'version.php')) { include JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'version.php'; } } JHTMLOPC::stylesheet('bootstrap.min.css', 'components/com_onepage/themes/extra/bootstrap/', array()); jimport('joomla.html.html.bootstrap'); JHTMLOPC::stylesheet('order_export.css', 'administrator/components/com_onepage/views/order_export/tmpl/', false); JHTMLOPC::script('toggle_langs.js', 'administrator/components/com_onepage/views/config/tmpl/js/', false); JHtml::_('behavior.keepalive'); //JHtml::_('formbehavior.chosen', 'select'); if (OPCVERSION != '{OPCVERSION}') { $version = ' (' . OPCVERSION . ')'; } defined('_JEXEC') or die('Restricted access'); JToolBarHelper::Title(JText::_('COM_ONEPAGE_CONFIGURATION_TITLE') . $version, 'generic.png'); JToolBarHelper::apply(); $document = JFactory::getDocument(); $selectText = JText::_('COM_ONEPAGE_TAXES_DONOT_DELETE_GIFTS_STATUSES'); $vm2string = "editImage: 'edit image',select_all_text: '" . JText::_('Select All') . "',select_some_options_text: '" . JText::_($selectText) . "'"; if (!class_exists('VmConfig')) { require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php'; }
/* * * @copyright Copyright (C) 2007 - 2014 RuposTel - All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * One Page checkout is free software released under GNU/GPL and uses code from VirtueMart * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * */ defined('_JEXEC') or die('Restricted access'); if (!defined('_VALID_MOS') && !defined('_JEXEC')) { die('Direct Access to ' . basename(__FILE__) . ' is not allowed.'); } $ajax = JRequest::getVar('ajax', '0'); if ($ajax === 'yes') { require JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_onepage' . DS . 'views' . DS . 'order_details' . DS . 'tmpl' . DS . 'ajax' . DS . 'onepage_ajax.php'; die; } JHTMLOPC::script('toggle_langs.js', 'administrator/components/com_onepage/views/config/tmpl/js/', false); JHTMLOPC::script('order_edit.js', 'administrator/components/com_onepage/views/order_details/tmpl/ajax/', false); JHTMLOPC::script('onepage_ajax.js', 'administrator/components/com_onepage/views/order_details/tmpl/ajax/', false); JHTMLOPC::stylesheet('order_edit.css', 'administrator/components/com_onepage/views/order_details/tmpl/ajax/', false); if (OPCJ3) { jimport('joomla.html.html.bootstrap'); JHtml::_('bootstrap.framework'); } JHTMLOPC::stylesheet('bootstrap.min.css', 'components/com_onepage/themes/extra/bootstrap/', array());
/** * @version $Id: default.php 21837 2011-07-12 18:12:35Z dextercowley $ * @package Joomla.Administrator * @subpackage com_banners * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // no direct access defined('_JEXEC') or die; $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_ONEPAGE_OPC_THEME_EDITOR')); JToolBarHelper::Title(JText::_('COM_ONEPAGE_OPC_THEME_EDITOR'), 'generic.png'); JHTMLOPC::script('translation_helper.js', 'administrator/components/com_onepage/assets/'); JHTMLOPC::script('colorPicker.js', 'administrator/components/com_onepage/assets/colorPicker/'); JHTMLOPC::stylesheet('edittheme.css', 'administrator/components/com_onepage/assets/css/'); $javascript = ' var op_secureurl = "' . JURI::base() . 'index.php?option=com_onepage&view=edittheme&format=raw&tmpl=component&task=ajax"; var op_css = true; var changedColors = new Array(); var origColors = new Array(); '; foreach ($this->colors as $idcolor => $color) { $javascript .= ' origColors.push(\'' . str_replace('#', '', $idcolor) . '\');'; } $document->addScriptDeclaration($javascript); if (!empty($this->msgs)) { echo '<div style="color: red; clear: both;">' . $this->msgs . '</div>'; } ?> <input type="hidden" name="current_template" id="current_template" value="<?php if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'onepage.cfg.php')) { include JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'onepage.cfg.php';
if (!class_exists('VmConfig')) { require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php'; } VmConfig::loadConfig(); if (method_exists('vmJsApi', 'js')) { $app = JFactory::getApplication(); $jq = $app->get('jquery', false); $jq_ui = $app->get('jquery-ui', false); if (empty($jq) && !OPCJ3) { //DEPRECATED IN VM3: //vmJsApi::js('jquery','//ajax.googleapis.com/ajax/libs/jquery/1.6.4','',TRUE); //vmJsApi::js ('jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16', '', TRUE); $document->addScript('//code.jquery.com/jquery-latest.min.js'); if (empty($jq_ui)) { JHTMLOPC::script('jquery-ui.min.js', 'components/com_onepage/themes/extra/jquery-ui/', false); JHTMLOPC::stylesheet('jquery-ui.min.css', 'components/com_onepage/themes/extra/jquery-ui/', false); } $document->addScript('//code.jquery.com/jquery-migrate-1.2.1.min.js'); $app->set('jquery', true); $app->set('jquery-migrate', true); } if (OPCJ3) { JHtml::_('jquery.framework'); JHtml::_('jquery.ui'); JHtml::_('formbehavior.chosen', 'select'); } else { vmJsApi::js('chosen.jquery.min'); vmJsApi::css('chosen'); } $document->addScriptDeclaration(' //<![CDATA[
public static function loadJquery() { // stAn - this block will enable including newest jquery library, uncomment if needed $document = JFactory::getDocument(); $app = JFactory::getApplication(); $jq = $app->get('jquery', false); if (empty($jq)) { //jquery-1.11.0.min.js //$document->addScript('//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'); //$document->addScript('//code.jquery.com/jquery-1.11.0.min.js'); $document->addScript('//code.jquery.com/jquery-latest.min.js'); JHTMLOPC::script('jquery-ui.min.js', 'components/com_onepage/themes/extra/jquery-ui/', false); JHTMLOPC::stylesheet('jquery-ui.min.css', 'components/com_onepage/themes/extra/jquery-ui/', false); //$document->addScript('//code.jquery.com/jquery-2.1.0.min.js'); $document->addScript('//code.jquery.com/jquery-migrate-1.2.1.min.js'); $app->set('jquery', true); $app->set('jquery-migrate', true); } /* $ui = $app->get('jquery-ui', false); if (empty($ui)) { $document->addScript( '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16'); $app->set('jquery-ui', true); } */ $document = JFactory::getDocument(); $base = JURI::base(); $jbase = str_replace('/administrator', '', $base); if (substr($jbase, -1) !== '/') { $jbase .= '/'; } if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_virtuemart' . DS . 'assets' . DS . 'js' . DS . 'jquery.noConflict.js')) { $document->addScript($jbase . 'components/com_virtuemart/assets/js/jquery.noConflict.js'); } else { if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_virtuemart' . DS . 'assets' . DS . 'js' . DS . 'jquery.noconflict.js')) { $document->addScript($jbase . 'components/com_virtuemart/assets/js/jquery.noconflict.js'); } } if (class_exists('plgSystemOpc')) { plgSystemOpc::$opc_jquery_loaded = true; } // END of the block }
//JHTMLOPC::script('checkbox.js', 'components/com_virtuemart/themes/default/templates/onepage/'.$selected_template, false); JHTML::_('behavior.tooltip'); $javascript = 'window.addEvent("domready", function(){ var userN = document.getElementById(\'username_login\'); if (userN != null && userN.value != \'\') { var labelU = document.getElementById(\'label_username_login\'); if (labelU != null) labelU.innerHTML = \'\'; } var userP = document.getElementById(\'passwd_login\'); if (userP != null && userP.value != \'\') { var labelP = document.getElementById(\'label_passwd_login\'); if (labelP != null) labelP.innerHTML = \'\'; } });' . "\n\n"; $document = JFactory::getDocument(); $css = ' <!--[if lte IE 7]> <link href="' . JURI::root() . 'components/com_onepage/themes/' . $selected_template . '/ie.css" rel="stylesheet" type="text/css"> <![endif]--> '; // $css .= ' @import url("'.JURI::root().'components/com_onepage/themes/'.$selected_template.'/ie.css"); $document->addScriptDeclaration($javascript); $document->addCustomTag($css); if (file_exists(JPATH_SITE . DS . 'plugins' . DS . 'content' . DS . 'slimbox' . DS . 'slimbox.js')) { JHTMLOPC::script('slimbox.js', 'plugins/content/slimbox/', false); JHTMLOPC::stylesheet('slimbox.css', 'plugins/content/slimbox/', array()); }
function shopper($userFields) { // Shopper info if (!class_exists('VirtueMartModelShopperGroup')) { require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'shoppergroup.php'; } $_shoppergroup = VirtueMartModelShopperGroup::getShoppergroupById($this->_model->getId()); if (!class_exists('Permissions')) { require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php'; } if (Permissions::getInstance()->check('admin,storeadmin')) { $shoppergrps = array(); foreach ($_shoppergroup as $group) { $shoppergrps[] = $group['virtuemart_shoppergroup_id']; } $this->_lists['shoppergroups'] = ShopFunctions::renderShopperGroupList($shoppergrps); $this->_lists['vendors'] = ShopFunctions::renderVendorList($this->_userDetails->virtuemart_vendor_id); } else { $this->_lists['shoppergroups'] = ''; foreach ($_shoppergroup as $group) { $this->_lists['shoppergroups'] .= $group['shopper_group_name'] . ', '; } $this->_lists['shoppergroups'] = substr($this->_lists['shoppergroups'], 0, -2); if (!empty($this->_userDetails->virtuemart_vendor_id)) { $this->_lists['vendors'] = $this->_userDetails->virtuemart_vendor_id; } if (empty($this->_lists['vendors'])) { $this->_lists['vendors'] = JText::_('COM_VIRTUEMART_USER_NOT_A_VENDOR'); // . $_setVendor; } } //todo here is something broken we use $_userDetailsList->perms and $this->_userDetailsList->perms and perms seems not longer to exist if (Permissions::getInstance()->check("admin,storeadmin")) { $this->_lists['perms'] = JHTML::_('select.genericlist', Permissions::getUserGroups(), 'perms', '', 'group_name', 'group_name', $this->_userDetails->perms); } else { if (!empty($this->_userDetails->perms)) { $this->_lists['perms'] = $this->_userDetails->perms; $_hiddenInfo = '<input type="hidden" name="perms" value = "' . $this->_lists['perms'] . '" />'; $this->_lists['perms'] .= $_hiddenInfo; } } // Load the required scripts if (count($userFields['scripts']) > 0) { foreach ($userFields['scripts'] as $_script => $_path) { JHTMLOPC::script($_script, $_path); } } // Load the required styresheets if (count($userFields['links']) > 0) { foreach ($userFields['links'] as $_link => $_path) { JHTMLOPC::stylesheet($_link, $_path); } } }