/**
 * ...
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 *
 * @package application.helper.smarty
 * @author Integry Systems
 */
function smarty_function_liveCustomization($params, LiveCartSmarty $smarty)
{
    $app = $smarty->getApplication();
    if ($app->isCustomizationMode()) {
        // theme dropdown
        $themes = array_merge(array('barebone' => 'barebone'), array_diff($app->getRenderer()->getThemeList(), array('barebone')));
        $smarty->assign('themes', $themes);
        $smarty->assign('currentTheme', $app->getTheme());
        if (!isset($params['action'])) {
            include_once 'function.includeJs.php';
            include_once 'function.includeCss.php';
            smarty_function_includeJs(array('file' => "library/prototype/prototype.js"), $smarty);
            smarty_function_includeJs(array('file' => "library/scriptaculous/scriptaculous.js"), $smarty);
            smarty_function_includeJs(array('file' => "library/livecart.js"), $smarty);
            smarty_function_includeJs(array('file' => "library/form/ActiveForm.js"), $smarty);
            smarty_function_includeJs(array('file' => "library/form/Validator.js"), $smarty);
            smarty_function_includeJs(array('file' => "backend/Backend.js"), $smarty);
            smarty_function_includeJs(array('file' => "frontend/Customize.js"), $smarty);
            smarty_function_includeCss(array('file' => "frontend/LiveCustomization.css"), $smarty);
        } else {
            $smarty->assign('mode', $app->getCustomizationModeType());
            $smarty->assign('theme', $app->getTheme());
            if ('menu' == $params['action']) {
                return $smarty->fetch('customize/menu.tpl');
            } else {
                if ('lang' == $params['action']) {
                    return $smarty->fetch('customize/translate.tpl');
                }
            }
        }
    }
}
示例#2
0
/**
 * ...
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 *
 * @package application.helper.smarty
 * @author Integry Systems
 */
function smarty_function_loadJs($params, LiveCartSmarty $smarty)
{
    include_once 'function.includeJs.php';
    $files = array();
    $files[] = "library/prototype/prototype.js";
    $files[] = "library/livecart.js";
    $files[] = "library/FooterToolbar.js";
    // need to be before Frontend.js
    $files[] = "frontend/Frontend.js";
    $files[] = "library/lightbox/lightbox.js";
    $files[] = "library/scriptaculous/scriptaculous.js";
    $files[] = "library/scriptaculous/builder.js";
    $files[] = "library/scriptaculous/effects.js";
    $files[] = "library/scriptaculous/dragdrop.js";
    $files[] = "library/scriptaculous/controls.js";
    $files[] = "library/scriptaculous/slider.js";
    $files[] = "library/scriptaculous/sound.js";
    if (isset($params['form'])) {
        $files[] = "library/form/Validator.js";
        $files[] = "library/form/ActiveForm.js";
    }
    foreach ($files as $file) {
        smarty_function_includeJs(array('file' => $file), $smarty);
    }
    smarty_function_includeCss(array('file' => "library/lightbox/lightbox.css"), $smarty);
}
示例#3
0
/**
 * ...
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 *
 * @package application.helper.smarty
 * @author Integry Systems
 */
function smarty_function_includeJs($params, Smarty_Internal_Template $smarty)
{
    static $jsPath;
    if (!$jsPath) {
        $jsPath = ClassLoader::getRealPath('public.javascript.');
    }
    $fileName = $params['file'];
    $filePath = substr($fileName, 0, 1) != '/' ? $jsPath . $fileName : ClassLoader::getRealPath('public') . $fileName;
    $fileName = substr($fileName, 0, 1) != '/' ? 'javascript/' . $fileName : substr($fileName, 1);
    //  fix slashes
    $filePath = str_replace('\\', DIRECTORY_SEPARATOR, $filePath);
    $filePath = str_replace('/', DIRECTORY_SEPARATOR, $filePath);
    if (isset($params['path'])) {
        $filePath = $params['path'];
    }
    if (!is_file($filePath) || substr($filePath, -3) != '.js') {
        return;
    }
    if (isset($params['inline']) && $params['inline'] == 'true') {
        return '<script src="' . str_replace(DIRECTORY_SEPARATOR, '/', $fileName) . '?' . filemtime($filePath) . '" type="text/javascript"></script>' . "\n";
    } else {
        $includedJavascriptTimestamp = $smarty->getGlobal("INCLUDED_JAVASCRIPT_TIMESTAMP");
        if (!($includedJavascriptFiles = $smarty->getGlobal('INCLUDED_JAVASCRIPT_FILES'))) {
            $includedJavascriptFiles = array();
        }
        if (isset($includedJavascriptFiles[$filePath])) {
            if (!isset($params['front'])) {
                return false;
            } else {
                unset($includedJavascriptFiles[$filePath]);
            }
        }
        $fileMTime = filemtime($filePath);
        if ($fileMTime > (int) $includedJavascriptTimestamp) {
            $smarty->setGlobal('INCLUDED_JAVASCRIPT_TIMESTAMP', $fileMTime);
        }
        if (isset($params['front'])) {
            $includedJavascriptFiles = array_merge(array($filePath => $fileName), $includedJavascriptFiles);
        } else {
            $includedJavascriptFiles[$filePath] = $fileName;
        }
        $smarty->setGlobal('INCLUDED_JAVASCRIPT_FILES', $includedJavascriptFiles);
    }
    foreach ($smarty->getApplication()->getConfigContainer()->getFilesByRelativePath('public/' . $fileName, true) as $file) {
        if (realpath($file) == realpath($filePath)) {
            continue;
        }
        $file = substr($file, strlen(ClassLoader::getRealPath('public')));
        $params['file'] = $file;
        smarty_function_includeJs($params, $smarty);
    }
}
示例#4
0
/**
 * ...
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 *
 * @package application.helper.smarty
 * @author Integry Systems
 */
function smarty_function_loadJs($params, Smarty_Internal_Template $smarty)
{
    include_once 'function.includeJs.php';
    $files = array();
    $files[] = "library/jquery/jquery-min.js";
    $files[] = "library/jquery/jquery.ui.core.min.js";
    $files[] = "library/jquery/jquery.ui.effect.min.js";
    $files[] = "library/jquery/plugins.js";
    $files[] = "library/prototype/prototype.js";
    $files[] = "library/livecart.js";
    $files[] = "frontend/Frontend.js";
    if (isset($params['form'])) {
        $files[] = "library/form/Validator.js";
        $files[] = "library/form/ActiveForm.js";
        $files[] = "library/form/State.js";
    }
    foreach ($files as $file) {
        smarty_function_includeJs(array('file' => $file), $smarty);
    }
    smarty_function_includeCss(array('file' => "library/lightbox/lightbox.css"), $smarty);
    smarty_function_includeCss(array('file' => "library/jquery/jquery-plugins.css"), $smarty);
}
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/ActiveForm.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/State.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/Validator.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/CsvImport.js"), $this);
?>


<?php 
$this->_tag_stack[] = array('pageTitle', array());
$_block_repeat = true;
smarty_block_pageTitle($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
while ($_block_repeat) {
    ob_start();
    echo smarty_function_translate(array('text' => '_import_csv'), $this);
    $_block_content = ob_get_contents();
    ob_end_clean();
    $_block_repeat = false;
    echo smarty_block_pageTitle($this->_tag_stack[count($this->_tag_stack) - 1][1], $_block_content, $this, $_block_repeat);
}
	<?php 
echo smarty_function_includeJs(array('file' => "library/scriptaculous/builder.js", 'front' => true), $this);
?>

	<?php 
echo smarty_function_includeJs(array('file' => "library/scriptaculous/effects.js", 'front' => true), $this);
?>

	<?php 
echo smarty_function_includeJs(array('file' => "library/prototype/prototype.js", 'front' => true), $this);
?>


	<?php 
echo smarty_function_includeJs(array('file' => "backend/BackendToolbar.js"), $this);
?>


	<?php 
echo smarty_function_compiledJs(array('glue' => true, 'nameMethod' => 'hash'), $this);
?>


	<?php 
echo '
	<script language="javascript" type="text/javascript">
	if(window.opener)
	{
	   try
	   {
<?php 
echo smarty_function_includeCss(array('file' => "backend/Category.css"), $this);
?>


<?php 
echo smarty_function_includeJs(array('file' => "backend/Discount.js"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "backend/Discount.css"), $this);
?>


<?php 
echo smarty_function_includeJs(array('file' => "library/ActiveList.js"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "library/ActiveGrid.css"), $this);
?>


<?php 
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "custom:backend/eav/includes.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>

<?php 
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/ProductBundle.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/ProductVariation.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/RatingType.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/Review.js"), $this);
?>


<?php 
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "custom:backend/eav/includes.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>

<?php 
echo smarty_function_includeCss(array('file' => "library/ActiveList.css"), $this);
?>

<?php 

<?php 
echo smarty_function_includeJs(array('file' => "library/dhtmlCalendar/calendar.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/dhtmlCalendar/lang/calendar-en.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/dhtmlCalendar/lang/calendar-" . $this->_tpl_vars['curLanguageCode'] . ".js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/dhtmlCalendar/calendar-setup.js"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "library/dhtmlCalendar/calendar-win2k-cold-2.css"), $this);
?>


<?php 
$this->_tag_stack[] = array('pageTitle', array('help' => "tools.newsletter"));
$_block_repeat = true;
smarty_block_pageTitle($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
while ($_block_repeat) {
    ob_start();
    echo smarty_function_translate(array('text' => '_newsletters'), $this);
    $_block_content = ob_get_contents();
示例#10
0
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/ActiveForm.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/Settings.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/User.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/lightbox/lightbox.js"), $this);
?>


<?php 
echo smarty_function_includeCss(array('file' => "library/dhtmlxtree/dhtmlXTree.css"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "backend/Settings.css"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "library/lightbox/lightbox.css"), $this);
?>
示例#11
0
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/dhtmlxtree/dhtmlXTree.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/Validator.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/ActiveForm.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/StaticPage.js"), $this);
?>


<?php 
echo smarty_function_includeCss(array('file' => "library/dhtmlxtree/dhtmlXTree.css"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "backend/StaticPage.css"), $this);
?>


<?php 
$this->_tag_stack[] = array('pageTitle', array('help' => "content.pages"));
$_block_repeat = true;
示例#12
0
   compiled from /home/illumin/public_html/application/view///backend/report/index.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'includeJs', '/home/illumin/public_html/application/view///backend/report/index.tpl', 1, false), array('function', 'includeCss', '/home/illumin/public_html/application/view///backend/report/index.tpl', 6, false), array('function', 'translate', '/home/illumin/public_html/application/view///backend/report/index.tpl', 8, false), array('function', 'link', '/home/illumin/public_html/application/view///backend/report/index.tpl', 15, false), array('function', 'renderBlock', '/home/illumin/public_html/application/view///backend/report/index.tpl', 41, false), array('function', 'maketext', '/home/illumin/public_html/application/view///backend/report/index.tpl', 43, false), array('block', 'pageTitle', '/home/illumin/public_html/application/view///backend/report/index.tpl', 8, false), array('modifier', 'escape', '/home/illumin/public_html/application/view///backend/report/index.tpl', 45, false))), $this);
echo smarty_function_includeJs(array('file' => "library/form/Validator.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/ActiveForm.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/Report.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/openFlashChart/js/swfobject.js"), $this);
?>


<?php 
echo smarty_function_includeCss(array('file' => "backend/Report.css"), $this);
?>


<?php 
$this->_tag_stack[] = array('pageTitle', array('help' => "content.pages"));
$_block_repeat = true;
smarty_block_pageTitle($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
while ($_block_repeat) {
    ob_start();
    echo smarty_function_translate(array('text' => '_reports'), $this);
示例#13
0
<?php 
echo smarty_function_includeCss(array('file' => "backend/OrderLog.css"), $this);
?>


<?php 
echo smarty_function_includeJs(array('file' => "backend/CustomerOrder.js"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "backend/CustomerOrder.css"), $this);
?>


<?php 
echo smarty_function_includeJs(array('file' => "frontend/Frontend.js"), $this);
?>
 
<?php 
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "custom:backend/eav/includes.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>

<?php 
$this->_tag_stack[] = array('pageTitle', array('help' => 'order'));
$_block_repeat = true;
smarty_block_pageTitle($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
while ($_block_repeat) {
    ob_start();
示例#14
0
   compiled from /home/illumin/public_html/application/view///backend/module/index.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'includeJs', '/home/illumin/public_html/application/view///backend/module/index.tpl', 1, false), array('function', 'includeCss', '/home/illumin/public_html/application/view///backend/module/index.tpl', 5, false), array('function', 'translate', '/home/illumin/public_html/application/view///backend/module/index.tpl', 7, false), array('function', 'link', '/home/illumin/public_html/application/view///backend/module/index.tpl', 13, false), array('function', 'json', '/home/illumin/public_html/application/view///backend/module/index.tpl', 20, false), array('block', 'pageTitle', '/home/illumin/public_html/application/view///backend/module/index.tpl', 7, false))), $this);
echo smarty_function_includeJs(array('file' => "library/form/ActiveForm.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/Validator.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/form/State.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/Module.js"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "backend/Module.css"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "library/ActiveList.css"), $this);
?>

<?php 
$this->_tag_stack[] = array('pageTitle', array('help' => "settings.modules"));
$_block_repeat = true;
smarty_block_pageTitle($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
while ($_block_repeat) {
示例#15
0
?>

<?php 
echo smarty_function_includeJs(array('file' => "backend/Template.js"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/TabControl.js"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "library/TabControl.css"), $this);
?>

<?php 
echo smarty_function_includeJs(array('file' => "library/editarea/edit_area_full.js"), $this);
?>


<?php 
echo smarty_function_includeCss(array('file' => "backend/Template.css"), $this);
?>

<?php 
echo smarty_function_includeCss(array('file' => "library/dhtmlxtree/dhtmlXTree.css"), $this);
?>


<?php 
$this->_tag_stack[] = array('pageTitle', array('help' => "customize.templates"));
$_block_repeat = true;
示例#16
0
<?php

/* Smarty version 2.6.26, created on 2015-12-01 10:48:40
   compiled from /home/illumin/public_html/application/view///product/index.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'loadJs', '/home/illumin/public_html/application/view///product/index.tpl', 1, false), array('function', 'includeJs', '/home/illumin/public_html/application/view///product/index.tpl', 4, false), array('function', 'productUrl', '/home/illumin/public_html/application/view///product/index.tpl', 9, false), array('function', 'link', '/home/illumin/public_html/application/view///product/index.tpl', 20, false), array('function', 'translate', '/home/illumin/public_html/application/view///product/index.tpl', 42, false), array('function', 'maketext', '/home/illumin/public_html/application/view///product/index.tpl', 46, false), array('modifier', 'config', '/home/illumin/public_html/application/view///product/index.tpl', 3, false), array('modifier', 'strip_tags', '/home/illumin/public_html/application/view///product/index.tpl', 7, false), array('modifier', 'default', '/home/illumin/public_html/application/view///product/index.tpl', 10, false), array('modifier', 'count', '/home/illumin/public_html/application/view///product/index.tpl', 45, false), array('block', 'canonical', '/home/illumin/public_html/application/view///product/index.tpl', 9, false), array('block', 'pageTitle', '/home/illumin/public_html/application/view///product/index.tpl', 10, false))), $this);
echo smarty_function_loadJs(array('form' => true), $this);
?>


<?php 
if (is_array($_tmp = 'PRODUCT_TABS') ? $this->_run_mod_handler('config', true, $_tmp) : $this->_plugins['modifier']['config'][0][0]->config($_tmp)) {
    ?>
	<?php 
    echo smarty_function_includeJs(array('file' => "library/tabber/tabber.js"), $this);
    ?>

<?php 
}
?>

<?php 
$this->assign('metaDescription', smarty_modifier_strip_tags($this->_tpl_vars['product']['shortDescription_lang']));
$this->assign('metaKeywords', $this->_tpl_vars['product']['keywords']);
$this->_tag_stack[] = array('canonical', array());
$_block_repeat = true;
smarty_block_canonical($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
while ($_block_repeat) {
    ob_start();
    echo smarty_function_productUrl(array('product' => $this->_tpl_vars['product']), $this);
    $_block_content = ob_get_contents();