function content_55d2f3b11be328_53847820($_smarty_tpl) { fn_preload_lang_vars(array('add', 'or_saved_search')); if ($_smarty_tpl->tpl_vars['search']->value['p_ids']) { ?> <?php $_smarty_tpl->tpl_vars["product_ids"] = new Smarty_variable(explode(",", $_smarty_tpl->tpl_vars['search']->value['p_ids']), null, 0); } ?> <?php echo $_smarty_tpl->getSubTemplate("pickers/products/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "added_products", 'but_text' => __("add"), 'item_ids' => $_smarty_tpl->tpl_vars['product_ids']->value, 'input_name' => "p_ids", 'type' => "links", 'no_container' => true, 'picker_view' => true), 0); ?> <?php $_smarty_tpl->tpl_vars["views"] = new Smarty_variable(fn_get_views("products"), null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['views']->value) { ?> <?php echo $_smarty_tpl->__("or_saved_search"); ?> : <select name="product_view_id"> <option value="0">--</option> <?php $_smarty_tpl->tpl_vars["f"] = new Smarty_Variable(); $_smarty_tpl->tpl_vars["f"]->_loop = false; $_from = $_smarty_tpl->tpl_vars['views']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars["f"]->key => $_smarty_tpl->tpl_vars["f"]->value) { $_smarty_tpl->tpl_vars["f"]->_loop = true; ?> <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['f']->value['view_id'], ENT_QUOTES, 'UTF-8'); ?> " <?php if ($_smarty_tpl->tpl_vars['search']->value['product_view_id'] == $_smarty_tpl->tpl_vars['f']->value['view_id']) { ?> selected="selected"<?php } ?> ><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['f']->value['name'], ENT_QUOTES, 'UTF-8'); ?> </option> <?php } ?> </select> <?php } }
function content_55db8f5815d397_15312311($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php'; } fn_preload_lang_vars(array('saved_search', 'all', 'more', 'more', 'delete', 'new_saved_search')); $_smarty_tpl->tpl_vars["views"] = new Smarty_variable(fn_get_views($_smarty_tpl->tpl_vars['view_type']->value), null, 0); ?> <?php $_smarty_tpl->tpl_vars["max_items"] = new Smarty_variable("4", null, 0); $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "advanced_search:views")); $_block_repeat = true; echo smarty_block_hook(array('name' => "advanced_search:views"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['views']->value) { ?> <div class="sidebar-row" id="views"> <h6><?php echo $_smarty_tpl->__("saved_search"); ?> </h6> <ul class="nav nav-list saved-search"> <?php if ($_smarty_tpl->tpl_vars['views']->value) { ?> <li <?php if (!$_smarty_tpl->tpl_vars['search']->value['view_id']) { ?> class="active"<?php } ?> > <a href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['dispatch']->value . ".reset_view?" . (string) $_smarty_tpl->tpl_vars['view_suffix']->value), ENT_QUOTES, 'UTF-8'); ?> "><?php echo $_smarty_tpl->__("all"); ?> </a> </li> <?php $_smarty_tpl->tpl_vars['view'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['view']->_loop = false; $_from = $_smarty_tpl->tpl_vars['views']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars['view']->total = $_smarty_tpl->_count($_from); $_smarty_tpl->tpl_vars['smarty']->value['foreach']['views']['total'] = $_smarty_tpl->tpl_vars['view']->total; $_smarty_tpl->tpl_vars['smarty']->value['foreach']['views']['index'] = -1; foreach ($_from as $_smarty_tpl->tpl_vars['view']->key => $_smarty_tpl->tpl_vars['view']->value) { $_smarty_tpl->tpl_vars['view']->_loop = true; $_smarty_tpl->tpl_vars['smarty']->value['foreach']['views']['index']++; ?> <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['views']['index'] == $_smarty_tpl->tpl_vars['max_items']->value) { ?> <?php $_smarty_tpl->tpl_vars['s_id'] = new Smarty_variable(sprintf("saved_searches_%s", fn_crc32($_smarty_tpl->tpl_vars['dispatch']->value)), null, 0); ?> <li> <span class="more hand"> <a id="on_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['s_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="collapsed cm-combination cm-save-state <?php if ($_COOKIE[$_smarty_tpl->tpl_vars['s_id']->value]) { ?> hidden<?php } ?> "><?php echo $_smarty_tpl->__("more"); ?> <i class="exicon-collapse"></i></a> <a id="off_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['s_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-combination cm-save-state <?php if (!$_COOKIE[$_smarty_tpl->tpl_vars['s_id']->value]) { ?> hidden<?php } ?> "><?php echo $_smarty_tpl->__("more"); ?> <i class="exicon-collapse"></i></a> </span> </li> <li id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['s_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="<?php if (!$_COOKIE[$_smarty_tpl->tpl_vars['s_id']->value]) { ?> hidden<?php } ?> "> <ul class="nav nav-list"> <?php } ?> <li <?php if ($_smarty_tpl->tpl_vars['view']->value['view_id'] == $_smarty_tpl->tpl_vars['search']->value['view_id']) { ?> class="active"<?php } ?> > <?php $_smarty_tpl->tpl_vars["return_current_url"] = new Smarty_variable(fn_query_remove($_smarty_tpl->tpl_vars['config']->value['current_url'], "view_id", "new_view"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["redirect_current_url"] = new Smarty_variable(rawurlencode($_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0); ?> <a href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['dispatch']->value . ".delete_view?view_id=" . (string) $_smarty_tpl->tpl_vars['view']->value['view_id'] . "&redirect_url=" . (string) $_smarty_tpl->tpl_vars['redirect_current_url']->value), ENT_QUOTES, 'UTF-8'); ?> " class="cm-confirm cm-tooltip icon-trash" title="<?php echo $_smarty_tpl->__("delete"); ?> "></a> <a class="cm-view-name" data-ca-view-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['view']->value['view_id'], ENT_QUOTES, 'UTF-8'); ?> " href="<?php echo htmlspecialchars(fn_url((string) $_smarty_tpl->tpl_vars['dispatch']->value . "?view_id=" . (string) $_smarty_tpl->tpl_vars['view']->value['view_id'] . "&" . (string) $_smarty_tpl->tpl_vars['view_suffix']->value), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['view']->value['name'], ENT_QUOTES, 'UTF-8'); ?> </a> </li> <?php } ?> <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['views']['total'] > $_smarty_tpl->tpl_vars['max_items']->value) { ?> </ul> </li> <?php } ?> <?php } ?> <li class="last"> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_text' => __("new_saved_search"), 'but_role' => "text", 'but_meta' => "text-button cm-dialog-opener", 'but_target_id' => "adv_search"), 0); ?> </li> </ul> </div> <hr> <?php } $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "advanced_search:views"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); }
function content_55ccecb5093f97_06209276($_smarty_tpl) { if (!is_callable('smarty_function_script')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php'; } fn_preload_lang_vars(array('object_exists', 'advanced_search', 'advanced_search', 'cancel', 'save_this_search_as', 'name', 'name', 'save', 'advanced_search_options')); echo smarty_function_script(array('src' => "js/tygh/advanced_search.js"), $_smarty_tpl); ?> <script type="text/javascript"> Tygh.tr('object_exists', '<?php echo strtr($_smarty_tpl->__("object_exists"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/")); ?> '); </script> <input type="hidden" name="is_search" value="Y" /> <?php $_smarty_tpl->tpl_vars["a_id"] = new Smarty_variable(sprintf("s_%s", fn_crc32($_smarty_tpl->tpl_vars['dispatch']->value)), null, 0); $_smarty_tpl->tpl_vars["views"] = new Smarty_variable(fn_get_views($_smarty_tpl->tpl_vars['view_type']->value), null, 0); ?> <?php if (!$_smarty_tpl->tpl_vars['in_popup']->value) { ?> <?php if ($_smarty_tpl->tpl_vars['simple_search']->value) { ?> <div id="simple_search_common"> <div id="simple_search"> <?php echo $_smarty_tpl->tpl_vars['simple_search']->value; ?> </div> </div> <?php } ?> <div class="sidebar-field"> <?php echo $_smarty_tpl->getSubTemplate("buttons/search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[" . (string) $_smarty_tpl->tpl_vars['dispatch']->value . "]"), 0); ?> <?php if (!$_smarty_tpl->tpl_vars['no_adv_link']->value) { ?> <a class="advanced-search cm-dialog-opener" id="adv_search_opener" data-ca-target-id="adv_search"><?php echo $_smarty_tpl->__("advanced_search"); ?> </a> <?php } ?> </div> <div id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['a_id']->value, ENT_QUOTES, 'UTF-8'); ?> "> <div class="hidden adv-search" id="adv_search" title="<?php echo $_smarty_tpl->__("advanced_search"); ?> "> <?php if ($_smarty_tpl->tpl_vars['simple_search']->value) { ?> <div class="group" id="simple_search_popup"></div> <?php } ?> <?php echo $_smarty_tpl->tpl_vars['advanced_search']->value; ?> <div class="modal-footer buttons-container"> <div class="pull-right"> <a class="cm-dialog-closer cm-cancel tool-link btn" data-dismiss="modal"><?php echo $_smarty_tpl->__("cancel"); ?> </a> <?php echo $_smarty_tpl->getSubTemplate("buttons/search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[" . (string) $_smarty_tpl->tpl_vars['dispatch']->value . "]", 'but_role' => "submit", 'method' => "GET"), 0); ?> </div> <?php if (!$_smarty_tpl->tpl_vars['not_saved']->value) { ?> <div class="pull-left"> <?php if (strpos($_REQUEST['dispatch'], ".picker") === false) { ?> <span class="pull-left"><?php echo $_smarty_tpl->__("save_this_search_as"); ?> </span> <div class="input-append"> <input type="text" id="view_name" name="new_view" value="<?php if ($_smarty_tpl->tpl_vars['search']->value['view_id'] && $_smarty_tpl->tpl_vars['views']->value[$_smarty_tpl->tpl_vars['search']->value['view_id']]) { echo htmlspecialchars($_smarty_tpl->tpl_vars['views']->value[$_smarty_tpl->tpl_vars['search']->value['view_id']]['name'], ENT_QUOTES, 'UTF-8'); } else { echo $_smarty_tpl->__("name"); } ?> " title="<?php echo $_smarty_tpl->__("name"); ?> " class="input-medium cm-hint" /> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_text' => __("save"), 'but_id' => "adv_search_save", 'but_role' => "advanced-search"), 0); ?> </div> <?php } ?> </div> <?php } ?> </div> </div> </div> <?php } else { ?> <?php echo $_smarty_tpl->tpl_vars['simple_search']->value; ?> <div class="sidebar-field in-popup"> <?php echo $_smarty_tpl->getSubTemplate("buttons/search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[" . (string) $_smarty_tpl->tpl_vars['dispatch']->value . "]"), 0); ?> <?php if (trim($_smarty_tpl->tpl_vars['advanced_search']->value) != '') { ?> <a id="sw_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['a_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="cm-combination cm-save-state" title="<?php echo $_smarty_tpl->__("advanced_search_options"); ?> "> <i id="on_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['a_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="icon-chevron-down cm-combination cm-save-state <?php if ($_COOKIE[$_smarty_tpl->tpl_vars['a_id']->value]) { ?> hidden<?php } ?> "></i> <i id="off_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['a_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="icon-chevron-up cm-combination cm-save-state <?php if (!$_COOKIE[$_smarty_tpl->tpl_vars['a_id']->value]) { ?> hidden<?php } ?> "></i> </a> <?php } ?> </div> <div id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['a_id']->value, ENT_QUOTES, 'UTF-8'); ?> " class="search-advanced <?php if (!$_COOKIE[$_smarty_tpl->tpl_vars['a_id']->value]) { ?> hidden<?php } ?> "> <?php echo $_smarty_tpl->tpl_vars['advanced_search']->value; ?> </div> <?php } }