Exemple #1
0
        $items_per_page = Registry::get('settings.Appearance.admin_pages_per_page');
    }
    $params['add_root'] = !empty($_REQUEST['root']) ? $_REQUEST['root'] : '';
    $params['simple'] = true;
    list($pages, $params) = fn_get_pages($params, $items_per_page);
    Registry::get('view')->assign('pages_tree', $pages);
    Registry::get('view')->assign('search', $params);
    if (empty($params['full_search'])) {
        Registry::get('view')->assign('page_types', fn_get_page_type_filter($page_type));
    } else {
        Registry::get('view')->assign('page_types', fn_get_page_object_by_type());
    }
    Registry::get('view')->assign('is_exclusive_page_type', fn_is_exclusive_page_type($page_type));
    if (!empty($_REQUEST['except_id'])) {
        Registry::get('view')->assign('except_id', $_REQUEST['except_id']);
    }
    if (fn_show_picker('pages', PAGE_THRESHOLD) == false) {
        $params = array('page_type' => fn_is_exclusive_page_type($page_type) ? $page_type : '');
        Registry::get('view')->assign('parent_pages', fn_get_pages_plain_list($params));
    }
    if ($mode == 'picker') {
        if (!empty($_REQUEST['combination_suffix'])) {
            Registry::get('view')->assign('combination_suffix', $_REQUEST['combination_suffix']);
        }
        Registry::get('view')->display('pickers/pages/picker_contents.tpl');
        exit;
    }
}
Registry::get('view')->assign('usergroups', fn_get_usergroups(array('type' => 'C', 'status' => array('A', 'H')), DESCR_SL));
/* /Preparing page data for templates and performing simple actions*/
/** /Body **/
    function content_55deaa218142f2_54665521($_smarty_tpl)
    {
        if (!is_callable('smarty_block_hook')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
        }
        fn_preload_lang_vars(array('search', 'category', 'all_categories', 'feature', 'filter'));
        if ($_smarty_tpl->tpl_vars['in_popup']->value) {
            ?>
    <div class="adv-search">
    <div class="group">
<?php 
        } else {
            ?>
    <div class="sidebar-row">
    <h6><?php 
            echo $_smarty_tpl->__("search");
            ?>
</h6>
<?php 
        }
        ?>

<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" name="product_filters_search_form" method="get" class="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
<?php 
        if ($_smarty_tpl->tpl_vars['put_request_vars']->value) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["v"]->_loop = false;
            $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable();
            $_from = $_REQUEST;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) {
                $_smarty_tpl->tpl_vars["v"]->_loop = true;
                $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key;
                ?>
        <?php 
                if ($_smarty_tpl->tpl_vars['v']->value && $_smarty_tpl->tpl_vars['k']->value != "callback") {
                    ?>
            <input type="hidden" name="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
        <?php 
                }
                ?>
    <?php 
            }
        }
        $_smarty_tpl->_capture_stack[0][] = array("simple_search", null, null);
        ob_start();
        echo $_smarty_tpl->tpl_vars['extra']->value;
        ?>

<div class="sidebar-field">
        <label><?php 
        echo $_smarty_tpl->__("category");
        ?>
</label>
        <div class="break clear correct-picker-but">
        <?php 
        if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) {
            ?>
            <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['category_ids']) {
                ?>
                <?php 
                $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['category_ids'], null, 0);
                ?>
            <?php 
            } else {
                ?>
                <?php 
                $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable("0", null, 0);
                ?>
            <?php 
            }
            ?>
            <?php 
            echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_category", 'input_name' => "category_ids", 'item_ids' => $_smarty_tpl->tpl_vars['s_cid']->value, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_categories"), 'extra' => ''), 0);
            ?>

        <?php 
        } else {
            ?>
            <?php 
            echo $_smarty_tpl->getSubTemplate("common/select_category.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('name' => "category_ids", 'id' => $_smarty_tpl->tpl_vars['search']->value['category_ids']), 0);
            ?>

        <?php 
        }
        ?>
        </div>
</div>
<div class="sidebar-field">
    <label for="elm_feature_name"><?php 
        echo $_smarty_tpl->__("feature");
        ?>
:</label>
    <div class="break">
        <input type="text" name="feature_name" id="elm_feature_name" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['feature_name'], ENT_QUOTES, 'UTF-8');
        ?>
" size="30" class="search-input-text" />
    </div>
</div>
<div class="sidebar-field">
    <label for="elm_filter_name"><?php 
        echo $_smarty_tpl->__("filter");
        ?>
:</label>
    <div class="break">
        <input type="text" name="filter_name" id="elm_filter_name" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['filter_name'], ENT_QUOTES, 'UTF-8');
        ?>
" size="30" class="search-input-text" />
    </div>
</div>
<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("advanced_search", null, null);
        ob_start();
        ?>
    <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "product_filters:search_form"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "product_filters:search_form"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

    <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "product_filters:search_form"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/advanced_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('simple_search' => Smarty::$_smarty_vars['capture']['simple_search'], 'advanced_search' => Smarty::$_smarty_vars['capture']['advanced_search'], 'dispatch' => $_smarty_tpl->tpl_vars['dispatch']->value, 'view_type' => "product_filters", 'in_popup' => $_smarty_tpl->tpl_vars['in_popup']->value), 0);
        ?>


</form>
<?php 
        if ($_smarty_tpl->tpl_vars['in_popup']->value) {
            ?>
    </div></div>
<?php 
        } else {
            ?>
    </div><hr>
<?php 
        }
    }
    function content_55d3121dab33e1_00340469($_smarty_tpl)
    {
        if (!is_callable('smarty_block_hook')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_modifier_truncate')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.truncate.php';
        }
        if (!is_callable('smarty_function_set_id')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
        }
        fn_preload_lang_vars(array('find_results_with', 'any_words', 'all_words', 'exact_phrase', 'search_in', 'product_name', 'short_description', 'full_description', 'keywords', 'search_in_category', 'all_categories', 'all_categories', 'search_in_subcategories', 'advanced_search_options', 'search_by_vendor', 'all_vendors', 'search_by_sku', 'search_by_price', 'search_by_weight', 'or', 'reset', 'search_options', 'find_results_with', 'any_words', 'all_words', 'exact_phrase', 'search_in', 'product_name', 'short_description', 'full_description', 'keywords', 'search_in_category', 'all_categories', 'all_categories', 'search_in_subcategories', 'advanced_search_options', 'search_by_vendor', 'all_vendors', 'search_by_sku', 'search_by_price', 'search_by_weight', 'or', 'reset', 'search_options'));
        if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
            $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
            ob_start();
            $_smarty_tpl->_capture_stack[0][] = array("section", null, null);
            ob_start();
            ?>

<div class="ls_advanced_search_form_container">
<form action="<?php 
            echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
            ?>
" name="advanced_search_form" method="get" class="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
<input type="hidden" name="search_performed" value="Y" />

<?php 
            if ($_smarty_tpl->tpl_vars['put_request_vars']->value) {
                ?>

<?php 
                $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["v"]->_loop = false;
                $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable();
                $_from = $_REQUEST;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) {
                    $_smarty_tpl->tpl_vars["v"]->_loop = true;
                    $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key;
                    ?>

<?php 
                    if ($_smarty_tpl->tpl_vars['v']->value && $_smarty_tpl->tpl_vars['k']->value != "callback") {
                        ?>

<input type="hidden" name="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" />
<?php 
                    }
                    ?>

<?php 
                }
                ?>

<?php 
            }
            ?>


<?php 
            echo $_smarty_tpl->tpl_vars['search_extra']->value;
            ?>


<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_query_input"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:search_query_input"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

<div class="ls_simple_search_options span6">
    <div class="ty-control-group">
        <label for="match" class="ty-control-group__title"><?php 
                echo $_smarty_tpl->__("find_results_with");
                ?>
</label>
        <select name="match" id="match">
            <option <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['match'] == "any") {
                    ?>
selected="selected"<?php 
                }
                ?>
 value="any"><?php 
                echo $_smarty_tpl->__("any_words");
                ?>
</option>
            <option <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['match'] == "all") {
                    ?>
selected="selected"<?php 
                }
                ?>
 value="all"><?php 
                echo $_smarty_tpl->__("all_words");
                ?>
</option>
            <option <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['match'] == "exact") {
                    ?>
selected="selected"<?php 
                }
                ?>
 value="exact"><?php 
                echo $_smarty_tpl->__("exact_phrase");
                ?>
</option>
        </select>&nbsp;&nbsp;
        <input type="text" name="q" size="38" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['q'], ENT_QUOTES, 'UTF-8');
                ?>
" class="ty-search-form__input ty-search-form__input-large" />
    </div>

    <div class="ty-control-group">
        <label class="ty-control-group__title"><?php 
                echo $_smarty_tpl->__("search_in");
                ?>
</label>
        <div class="ty-select-field">
            <input type="hidden" name="pname" value="N" />
            <input type="hidden" name="ls_cname" value="N" />
            <label for="pname" class="ty-select-field__label">
                <input type="checkbox" value="Y" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['pname'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['pname']) {
                    ?>
checked="checked"<?php 
                }
                ?>
 name="pname" id="pname" class="checkbox ty-select-field__checkbox" /><?php 
                echo $_smarty_tpl->__("product_name");
                ?>

            </label>
            <label for="pshort" class="ty-select-field__label">
                <input type="checkbox" value="Y" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['pshort'] == "Y") {
                    ?>
checked="checked"<?php 
                }
                ?>
 name="pshort" id="pshort" class="checkbox ty-select-field__checkbox" /><?php 
                echo $_smarty_tpl->__("short_description");
                ?>

            </label>

            <label for="pfull" class="ty-select-field__label">
                <input type="checkbox" value="Y" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['pfull'] == "Y") {
                    ?>
checked="checked"<?php 
                }
                ?>
 name="pfull" id="pfull" class="checkbox ty-select-field__checkbox" /><?php 
                echo $_smarty_tpl->__("full_description");
                ?>

            </label>

            <label for="pkeywords" class="ty-select-field__label">
                <input type="checkbox" value="Y" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['pkeywords'] == "Y") {
                    ?>
checked="checked"<?php 
                }
                ?>
 name="pkeywords" id="pkeywords" class="checkbox ty-select-field__checkbox" /><?php 
                echo $_smarty_tpl->__("keywords");
                ?>

            </label>

            <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_in"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:search_in"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:search_in"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

        </div>
    </div>
    <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:search_query_input"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

    <div class="ty-control-group">
        <label class="ty-control-group__title"><?php 
            echo $_smarty_tpl->__("search_in_category");
            ?>
</label>
        <?php 
            if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) {
                ?>

            <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['cid']) {
                    ?>

                <?php 
                    $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['cid'], null, 0);
                    ?>

            <?php 
                } else {
                    ?>

                <?php 
                    $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable("0", null, 0);
                    ?>

            <?php 
                }
                ?>

            <?php 
                echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_category", 'input_name' => "cid", 'item_ids' => $_smarty_tpl->tpl_vars['s_cid']->value, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_categories"), 'extra' => ''), 0);
                ?>

        <?php 
            } else {
                ?>

        <div class="ty-float-left">
            <?php 
                $_smarty_tpl->tpl_vars["all_categories"] = new Smarty_variable(fn_get_plain_categories_tree(0, false), null, 0);
                ?>

            <select name="cid">
                <option value="0" <?php 
                if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == "0") {
                    ?>
selected<?php 
                }
                ?>
>- <?php 
                echo $_smarty_tpl->__("all_categories");
                ?>
 -</option>
                <?php 
                $_smarty_tpl->tpl_vars["cat"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["cat"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['all_categories']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["cat"]->key => $_smarty_tpl->tpl_vars["cat"]->value) {
                    $_smarty_tpl->tpl_vars["cat"]->_loop = true;
                    ?>

                <option value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category_id'], ENT_QUOTES, 'UTF-8');
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['cat']->value['disabled']) {
                        ?>
disabled="disabled"<?php 
                    }
                    if ($_smarty_tpl->tpl_vars['search']->value['cid'] == $_smarty_tpl->tpl_vars['cat']->value['category_id']) {
                        ?>
 selected="selected"<?php 
                    }
                    ?>
 title="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo preg_replace('!^!m', str_repeat("&#166;&nbsp;&nbsp;&nbsp;&nbsp;", $_smarty_tpl->tpl_vars['cat']->value['level']), smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8', true), 50, "...", true));
                    ?>
</option>
                <?php 
                }
                ?>

            </select>
        </div>
        <?php 
            }
            ?>

        <div class="ty-select-field ty-subcategories-field clearfix">
            <input type="hidden" name="subcats" value="N" />
            <label for="subcats" class="ty-select-field__label">
                <input type="checkbox" value="Y"<?php 
            if ($_smarty_tpl->tpl_vars['search']->value['subcats'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['subcats']) {
                ?>
 checked="checked"<?php 
            }
            ?>
 name="subcats" id="subcats" class="checkbox ty-select-field__checkbox" />
                <?php 
            echo $_smarty_tpl->__("search_in_subcategories");
            ?>

            </label>
        </div>
    </div>
</div>
<?php 
            if (!$_smarty_tpl->tpl_vars['simple_search_form']->value) {
                ?>

<div class="ls_advanced_search_options span5">    
    
    <div class="ty-control-group__title"><?php 
                echo $_smarty_tpl->__("advanced_search_options");
                ?>
</div>
    <div class="ty-control-group">
        <input type="hidden" name="company_id" id="company_id" value="<?php 
                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search']->value['company_id']) === null || $tmp === '' ? '' : $tmp, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <?php 
                if (fn_allowed_for("MULTIVENDOR")) {
                    ?>

            <?php 
                    echo $_smarty_tpl->getSubTemplate("common/ajax_select_object.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('label' => __("search_by_vendor"), 'data_url' => "companies.get_companies_list?show_all=Y&search=Y", 'text' => ($tmp = @fn_get_company_name($_smarty_tpl->tpl_vars['search']->value['company_id'])) === null || $tmp === '' ? $_smarty_tpl->__("all_vendors") : $tmp, 'result_elm' => "company_id", 'id' => "company_id_selector"), 0);
                    ?>

        <?php 
                }
                ?>

    </div>
    
    <div class="ty-control-group">
        <label for="pcode" class="ty-select-field__label"><?php 
                echo $_smarty_tpl->__("search_by_sku");
                ?>
</label>
        <input type="text" name="pcode" id="pcode" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['pcode'], ENT_QUOTES, 'UTF-8');
                ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />
    </div>

    <?php 
                $_smarty_tpl->tpl_vars["have_price_filter"] = new Smarty_variable(0, null, 0);
                ?>

    <?php 
                $_smarty_tpl->tpl_vars["ff"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["ff"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['filter_features']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["ff"]->key => $_smarty_tpl->tpl_vars["ff"]->value) {
                    $_smarty_tpl->tpl_vars["ff"]->_loop = true;
                    if ($_smarty_tpl->tpl_vars['ff']->value['field_type'] == "P") {
                        $_smarty_tpl->tpl_vars["have_price_filter"] = new Smarty_variable(1, null, 0);
                    }
                }
                ?>

    <?php 
                if (!$_smarty_tpl->tpl_vars['have_price_filter']->value) {
                    ?>

    <div class="ty-control-group">
        <label for="price_from" class="ty-select-field__label"><?php 
                    echo $_smarty_tpl->__("search_by_price");
                    ?>
&nbsp;(<?php 
                    echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
                    ?>
)</label>
        <input type="text" name="price_from" id="price_from" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_from'], ENT_QUOTES, 'UTF-8');
                    ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />&nbsp;-&nbsp;<input type="text" name="price_to" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_to'], ENT_QUOTES, 'UTF-8');
                    ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />
    </div>
    <?php 
                }
                ?>


    <div class="ty-control-group">
        <label for="weight_from" class="ty-select-field__label"><?php 
                echo $_smarty_tpl->__("search_by_weight");
                ?>
&nbsp;(<?php 
                if ($_smarty_tpl->tpl_vars['config']->value['localization']['weight_symbol']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['localization']['weight_symbol'], ENT_QUOTES, 'UTF-8');
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['General']['weight_symbol'], ENT_QUOTES, 'UTF-8');
                }
                ?>
)</label>
        <input type="text" name="weight_from" id="weight_from" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_from'], ENT_QUOTES, 'UTF-8');
                ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />&nbsp;-&nbsp;<input type="text" name="weight_to" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_to'], ENT_QUOTES, 'UTF-8');
                ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />
    </div>
   
    <?php 
                echo $_smarty_tpl->getSubTemplate("views/products/components/product_filters_advanced_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                ?>

<?php 
            }
            ?>

</div>
<div class="ty-search-form__buttons-container buttons-container ls_search_page_buttons span12">
    <?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);
            ?>
&nbsp;&nbsp;<?php 
            echo $_smarty_tpl->__("or");
            ?>
<a class="ty-btn ty-btn__tertiary cm-reset-link"><?php 
            echo $_smarty_tpl->__("reset");
            ?>
</a>
</div>
</form>
</div>
<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>

<?php 
            echo $_smarty_tpl->getSubTemplate("common/section.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section_title' => __("search_options"), 'section_content' => Smarty::$_smarty_vars['capture']['section'], 'class' => "ty-search-form"), 0);
            ?>

<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            if (trim(Smarty::$_smarty_vars['capture']['template_content'])) {
                if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") {
                    ?>
<span class="cm-template-box template-box" data-ca-te-template="views/products/components/products_search_form.tpl" id="<?php 
                    echo smarty_function_set_id(array('name' => "views/products/components/products_search_form.tpl"), $_smarty_tpl);
                    ?>
"><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php 
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                    ?>
<!--[/tpl_id]--></span><?php 
                } else {
                    echo Smarty::$_smarty_vars['capture']['template_content'];
                }
            }
        } else {
            $_smarty_tpl->_capture_stack[0][] = array("section", null, null);
            ob_start();
            ?>

<div class="ls_advanced_search_form_container">
<form action="<?php 
            echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
            ?>
" name="advanced_search_form" method="get" class="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8');
            ?>
">
<input type="hidden" name="search_performed" value="Y" />

<?php 
            if ($_smarty_tpl->tpl_vars['put_request_vars']->value) {
                ?>

<?php 
                $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["v"]->_loop = false;
                $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable();
                $_from = $_REQUEST;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) {
                    $_smarty_tpl->tpl_vars["v"]->_loop = true;
                    $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key;
                    ?>

<?php 
                    if ($_smarty_tpl->tpl_vars['v']->value && $_smarty_tpl->tpl_vars['k']->value != "callback") {
                        ?>

<input type="hidden" name="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8');
                        ?>
" />
<?php 
                    }
                    ?>

<?php 
                }
                ?>

<?php 
            }
            ?>


<?php 
            echo $_smarty_tpl->tpl_vars['search_extra']->value;
            ?>


<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_query_input"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:search_query_input"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

<div class="ls_simple_search_options span6">
    <div class="ty-control-group">
        <label for="match" class="ty-control-group__title"><?php 
                echo $_smarty_tpl->__("find_results_with");
                ?>
</label>
        <select name="match" id="match">
            <option <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['match'] == "any") {
                    ?>
selected="selected"<?php 
                }
                ?>
 value="any"><?php 
                echo $_smarty_tpl->__("any_words");
                ?>
</option>
            <option <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['match'] == "all") {
                    ?>
selected="selected"<?php 
                }
                ?>
 value="all"><?php 
                echo $_smarty_tpl->__("all_words");
                ?>
</option>
            <option <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['match'] == "exact") {
                    ?>
selected="selected"<?php 
                }
                ?>
 value="exact"><?php 
                echo $_smarty_tpl->__("exact_phrase");
                ?>
</option>
        </select>&nbsp;&nbsp;
        <input type="text" name="q" size="38" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['q'], ENT_QUOTES, 'UTF-8');
                ?>
" class="ty-search-form__input ty-search-form__input-large" />
    </div>

    <div class="ty-control-group">
        <label class="ty-control-group__title"><?php 
                echo $_smarty_tpl->__("search_in");
                ?>
</label>
        <div class="ty-select-field">
            <input type="hidden" name="pname" value="N" />
            <input type="hidden" name="ls_cname" value="N" />
            <label for="pname" class="ty-select-field__label">
                <input type="checkbox" value="Y" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['pname'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['pname']) {
                    ?>
checked="checked"<?php 
                }
                ?>
 name="pname" id="pname" class="checkbox ty-select-field__checkbox" /><?php 
                echo $_smarty_tpl->__("product_name");
                ?>

            </label>
            <label for="pshort" class="ty-select-field__label">
                <input type="checkbox" value="Y" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['pshort'] == "Y") {
                    ?>
checked="checked"<?php 
                }
                ?>
 name="pshort" id="pshort" class="checkbox ty-select-field__checkbox" /><?php 
                echo $_smarty_tpl->__("short_description");
                ?>

            </label>

            <label for="pfull" class="ty-select-field__label">
                <input type="checkbox" value="Y" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['pfull'] == "Y") {
                    ?>
checked="checked"<?php 
                }
                ?>
 name="pfull" id="pfull" class="checkbox ty-select-field__checkbox" /><?php 
                echo $_smarty_tpl->__("full_description");
                ?>

            </label>

            <label for="pkeywords" class="ty-select-field__label">
                <input type="checkbox" value="Y" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['pkeywords'] == "Y") {
                    ?>
checked="checked"<?php 
                }
                ?>
 name="pkeywords" id="pkeywords" class="checkbox ty-select-field__checkbox" /><?php 
                echo $_smarty_tpl->__("keywords");
                ?>

            </label>

            <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_in"));
                $_block_repeat = true;
                echo smarty_block_hook(array('name' => "products:search_in"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_hook(array('name' => "products:search_in"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

        </div>
    </div>
    <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:search_query_input"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

    <div class="ty-control-group">
        <label class="ty-control-group__title"><?php 
            echo $_smarty_tpl->__("search_in_category");
            ?>
</label>
        <?php 
            if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) {
                ?>

            <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['cid']) {
                    ?>

                <?php 
                    $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['cid'], null, 0);
                    ?>

            <?php 
                } else {
                    ?>

                <?php 
                    $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable("0", null, 0);
                    ?>

            <?php 
                }
                ?>

            <?php 
                echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_category", 'input_name' => "cid", 'item_ids' => $_smarty_tpl->tpl_vars['s_cid']->value, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_categories"), 'extra' => ''), 0);
                ?>

        <?php 
            } else {
                ?>

        <div class="ty-float-left">
            <?php 
                $_smarty_tpl->tpl_vars["all_categories"] = new Smarty_variable(fn_get_plain_categories_tree(0, false), null, 0);
                ?>

            <select name="cid">
                <option value="0" <?php 
                if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == "0") {
                    ?>
selected<?php 
                }
                ?>
>- <?php 
                echo $_smarty_tpl->__("all_categories");
                ?>
 -</option>
                <?php 
                $_smarty_tpl->tpl_vars["cat"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["cat"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['all_categories']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["cat"]->key => $_smarty_tpl->tpl_vars["cat"]->value) {
                    $_smarty_tpl->tpl_vars["cat"]->_loop = true;
                    ?>

                <option value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category_id'], ENT_QUOTES, 'UTF-8');
                    ?>
" <?php 
                    if ($_smarty_tpl->tpl_vars['cat']->value['disabled']) {
                        ?>
disabled="disabled"<?php 
                    }
                    if ($_smarty_tpl->tpl_vars['search']->value['cid'] == $_smarty_tpl->tpl_vars['cat']->value['category_id']) {
                        ?>
 selected="selected"<?php 
                    }
                    ?>
 title="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo preg_replace('!^!m', str_repeat("&#166;&nbsp;&nbsp;&nbsp;&nbsp;", $_smarty_tpl->tpl_vars['cat']->value['level']), smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8', true), 50, "...", true));
                    ?>
</option>
                <?php 
                }
                ?>

            </select>
        </div>
        <?php 
            }
            ?>

        <div class="ty-select-field ty-subcategories-field clearfix">
            <input type="hidden" name="subcats" value="N" />
            <label for="subcats" class="ty-select-field__label">
                <input type="checkbox" value="Y"<?php 
            if ($_smarty_tpl->tpl_vars['search']->value['subcats'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['subcats']) {
                ?>
 checked="checked"<?php 
            }
            ?>
 name="subcats" id="subcats" class="checkbox ty-select-field__checkbox" />
                <?php 
            echo $_smarty_tpl->__("search_in_subcategories");
            ?>

            </label>
        </div>
    </div>
</div>
<?php 
            if (!$_smarty_tpl->tpl_vars['simple_search_form']->value) {
                ?>

<div class="ls_advanced_search_options span5">    
    
    <div class="ty-control-group__title"><?php 
                echo $_smarty_tpl->__("advanced_search_options");
                ?>
</div>
    <div class="ty-control-group">
        <input type="hidden" name="company_id" id="company_id" value="<?php 
                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search']->value['company_id']) === null || $tmp === '' ? '' : $tmp, ENT_QUOTES, 'UTF-8');
                ?>
" />
        <?php 
                if (fn_allowed_for("MULTIVENDOR")) {
                    ?>

            <?php 
                    echo $_smarty_tpl->getSubTemplate("common/ajax_select_object.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('label' => __("search_by_vendor"), 'data_url' => "companies.get_companies_list?show_all=Y&search=Y", 'text' => ($tmp = @fn_get_company_name($_smarty_tpl->tpl_vars['search']->value['company_id'])) === null || $tmp === '' ? $_smarty_tpl->__("all_vendors") : $tmp, 'result_elm' => "company_id", 'id' => "company_id_selector"), 0);
                    ?>

        <?php 
                }
                ?>

    </div>
    
    <div class="ty-control-group">
        <label for="pcode" class="ty-select-field__label"><?php 
                echo $_smarty_tpl->__("search_by_sku");
                ?>
</label>
        <input type="text" name="pcode" id="pcode" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['pcode'], ENT_QUOTES, 'UTF-8');
                ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />
    </div>

    <?php 
                $_smarty_tpl->tpl_vars["have_price_filter"] = new Smarty_variable(0, null, 0);
                ?>

    <?php 
                $_smarty_tpl->tpl_vars["ff"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["ff"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['filter_features']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["ff"]->key => $_smarty_tpl->tpl_vars["ff"]->value) {
                    $_smarty_tpl->tpl_vars["ff"]->_loop = true;
                    if ($_smarty_tpl->tpl_vars['ff']->value['field_type'] == "P") {
                        $_smarty_tpl->tpl_vars["have_price_filter"] = new Smarty_variable(1, null, 0);
                    }
                }
                ?>

    <?php 
                if (!$_smarty_tpl->tpl_vars['have_price_filter']->value) {
                    ?>

    <div class="ty-control-group">
        <label for="price_from" class="ty-select-field__label"><?php 
                    echo $_smarty_tpl->__("search_by_price");
                    ?>
&nbsp;(<?php 
                    echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
                    ?>
)</label>
        <input type="text" name="price_from" id="price_from" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_from'], ENT_QUOTES, 'UTF-8');
                    ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />&nbsp;-&nbsp;<input type="text" name="price_to" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_to'], ENT_QUOTES, 'UTF-8');
                    ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />
    </div>
    <?php 
                }
                ?>


    <div class="ty-control-group">
        <label for="weight_from" class="ty-select-field__label"><?php 
                echo $_smarty_tpl->__("search_by_weight");
                ?>
&nbsp;(<?php 
                if ($_smarty_tpl->tpl_vars['config']->value['localization']['weight_symbol']) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['config']->value['localization']['weight_symbol'], ENT_QUOTES, 'UTF-8');
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['General']['weight_symbol'], ENT_QUOTES, 'UTF-8');
                }
                ?>
)</label>
        <input type="text" name="weight_from" id="weight_from" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_from'], ENT_QUOTES, 'UTF-8');
                ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />&nbsp;-&nbsp;<input type="text" name="weight_to" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_to'], ENT_QUOTES, 'UTF-8');
                ?>
" onfocus="this.select();" class="ty-search-form__input" size="30" />
    </div>
   
    <?php 
                echo $_smarty_tpl->getSubTemplate("views/products/components/product_filters_advanced_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                ?>

<?php 
            }
            ?>

</div>
<div class="ty-search-form__buttons-container buttons-container ls_search_page_buttons span12">
    <?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);
            ?>
&nbsp;&nbsp;<?php 
            echo $_smarty_tpl->__("or");
            ?>
<a class="ty-btn ty-btn__tertiary cm-reset-link"><?php 
            echo $_smarty_tpl->__("reset");
            ?>
</a>
</div>
</form>
</div>
<?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>

<?php 
            echo $_smarty_tpl->getSubTemplate("common/section.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section_title' => __("search_options"), 'section_content' => Smarty::$_smarty_vars['capture']['section'], 'class' => "ty-search-form"), 0);
            ?>

<?php 
        }
    }
    function content_55ccecb4b64bd2_27511562($_smarty_tpl)
    {
        if (!is_callable('smarty_block_hook')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
        }
        if (!is_callable('smarty_modifier_truncate')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.truncate.php';
        }
        fn_preload_lang_vars(array('search', 'find_results_with', 'price', 'search_in_category', 'all_categories', 'all_categories', 'search_in', 'product_name', 'short_description', 'full_description', 'keywords', 'search_by_product_filters', 'search_by_product_features', 'search_by_sku', 'popularity', 'ttc_popularity', 'subcategories', 'shipping_freight', 'weight', 'quantity', 'free_shipping', 'yes', 'no', 'status', 'active', 'hidden', 'disabled', 'purchased_in_orders', 'no_items', 'sort_by', 'list_price', 'name', 'price', 'sku', 'quantity', 'status', 'desc', 'asc'));
        if ($_smarty_tpl->tpl_vars['in_popup']->value) {
            ?>
    <div class="adv-search">
    <div class="group">
<?php 
        } else {
            ?>
    <div class="sidebar-row">
    <h6><?php 
            echo $_smarty_tpl->__("search");
            ?>
</h6>
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['page_part']->value) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["_page_part"] = new Smarty_variable("#" . (string) $_smarty_tpl->tpl_vars['page_part']->value, null, 0);
        }
        ?>

<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        echo htmlspecialchars($_smarty_tpl->tpl_vars['_page_part']->value, ENT_QUOTES, 'UTF-8');
        ?>
" name="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['product_search_form_prefix']->value, ENT_QUOTES, 'UTF-8');
        ?>
search_form" method="get" class="cm-disable-empty <?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
<input type="hidden" name="type" value="<?php 
        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search_type']->value) === null || $tmp === '' ? "simple" : $tmp, ENT_QUOTES, 'UTF-8');
        ?>
" />
<?php 
        if ($_REQUEST['redirect_url']) {
            ?>
    <input type="hidden" name="redirect_url" value="<?php 
            echo htmlspecialchars($_REQUEST['redirect_url'], ENT_QUOTES, 'UTF-8');
            ?>
" />
<?php 
        }
        if ($_smarty_tpl->tpl_vars['selected_section']->value != '') {
            ?>
    <input type="hidden" id="selected_section" name="selected_section" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['selected_section']->value, ENT_QUOTES, 'UTF-8');
            ?>
" />
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['put_request_vars']->value) {
            $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["v"]->_loop = false;
            $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable();
            $_from = $_REQUEST;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) {
                $_smarty_tpl->tpl_vars["v"]->_loop = true;
                $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key;
                if ($_smarty_tpl->tpl_vars['v']->value && $_smarty_tpl->tpl_vars['k']->value != "callback") {
                    ?>
<input type="hidden" name="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
<?php 
                }
            }
        }
        ?>

<?php 
        echo $_smarty_tpl->tpl_vars['extra']->value;
        ?>


<?php 
        $_smarty_tpl->_capture_stack[0][] = array("simple_search", null, null);
        ob_start();
        ?>
    <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:simple_search"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products:simple_search"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

    <div class="sidebar-field">
        <label><?php 
            echo $_smarty_tpl->__("find_results_with");
            ?>
</label>
        <input type="text" name="q" size="20" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['q'], ENT_QUOTES, 'UTF-8');
            ?>
" />
    </div>

    <div class="sidebar-field">
        <label><?php 
            echo $_smarty_tpl->__("price");
            ?>
&nbsp;(<?php 
            echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
            ?>
)</label>
        <input type="text" name="price_from" size="1" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_from'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();" class="input-small" /> - <input type="text" size="1" name="price_to" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['price_to'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();" class="input-small" />
    </div>

    <div class="sidebar-field">
        <label><?php 
            echo $_smarty_tpl->__("search_in_category");
            ?>
</label>
        <?php 
            if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) {
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['cid']) {
                    ?>
                <?php 
                    $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['cid'], null, 0);
                    ?>
            <?php 
                } else {
                    ?>
                <?php 
                    $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable("0", null, 0);
                    ?>
            <?php 
                }
                ?>
            <?php 
                echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('company_ids' => $_smarty_tpl->tpl_vars['picker_selected_companies']->value, 'data_id' => "location_category", 'input_name' => "cid", 'item_ids' => $_smarty_tpl->tpl_vars['s_cid']->value, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_categories"), 'extra' => ''), 0);
                ?>

        <?php 
            } else {
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['runtime']->value['mode'] == "picker") {
                    ?>
                <?php 
                    $_smarty_tpl->tpl_vars["trunc"] = new Smarty_variable("38", null, 0);
                    ?>
            <?php 
                } else {
                    ?>
                <?php 
                    $_smarty_tpl->tpl_vars["trunc"] = new Smarty_variable("25", null, 0);
                    ?>
            <?php 
                }
                ?>
            <select name="cid">
                <option value="0" <?php 
                if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == "0") {
                    ?>
selected="selected"<?php 
                }
                ?>
>- <?php 
                echo $_smarty_tpl->__("all_categories");
                ?>
 -</option>
                <?php 
                $_smarty_tpl->tpl_vars["search_cat"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["search_cat"]->_loop = false;
                $_from = fn_get_plain_categories_tree(0, false, @constant('CART_LANGUAGE'), $_smarty_tpl->tpl_vars['picker_selected_companies']->value);
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                $_smarty_tpl->tpl_vars["search_cat"]->index = -1;
                foreach ($_from as $_smarty_tpl->tpl_vars["search_cat"]->key => $_smarty_tpl->tpl_vars["search_cat"]->value) {
                    $_smarty_tpl->tpl_vars["search_cat"]->_loop = true;
                    $_smarty_tpl->tpl_vars["search_cat"]->index++;
                    $_smarty_tpl->tpl_vars["search_cat"]->first = $_smarty_tpl->tpl_vars["search_cat"]->index === 0;
                    $_smarty_tpl->tpl_vars['smarty']->value['foreach']['search_cat']['first'] = $_smarty_tpl->tpl_vars["search_cat"]->first;
                    ?>
                <?php 
                    if ($_smarty_tpl->tpl_vars['search_cat']->value['store']) {
                        ?>
                <?php 
                        if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['search_cat']['first']) {
                            ?>
                    </optgroup>
                <?php 
                        }
                        ?>

                <optgroup label="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['search_cat']->value['category'], ENT_QUOTES, 'UTF-8');
                        ?>
">
                    <?php 
                        $_smarty_tpl->tpl_vars["close_optgroup"] = new Smarty_variable(true, null, 0);
                        ?>
                    <?php 
                    } else {
                        ?>
                    <option value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['search_cat']->value['category_id'], ENT_QUOTES, 'UTF-8');
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['search_cat']->value['disabled']) {
                            ?>
disabled="disabled"<?php 
                        }
                        ?>
 <?php 
                        if ($_smarty_tpl->tpl_vars['search']->value['cid'] == $_smarty_tpl->tpl_vars['search_cat']->value['category_id']) {
                            ?>
selected="selected"<?php 
                        }
                        ?>
 title="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['search_cat']->value['category'], ENT_QUOTES, 'UTF-8');
                        ?>
"><?php 
                        echo preg_replace('!^!m', str_repeat("&#166;&nbsp;&nbsp;&nbsp;&nbsp;", $_smarty_tpl->tpl_vars['search_cat']->value['level']), smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['search_cat']->value['category'], ENT_QUOTES, 'UTF-8', true), $_smarty_tpl->tpl_vars['trunc']->value, "...", true));
                        ?>
</option>
                    <?php 
                    }
                    ?>
                    <?php 
                }
                ?>
                    <?php 
                if ($_smarty_tpl->tpl_vars['close_optgroup']->value) {
                    ?>
                </optgroup>
                <?php 
                }
                ?>
            </select>
        <?php 
            }
            ?>
    </div>
    <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "products:simple_search"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("advanced_search", null, null);
        ob_start();
        ?>

<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:advanced_search"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "products:advanced_search"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

    <div class="group form-horizontal">
    <div class="control-group">
    <label><?php 
            echo $_smarty_tpl->__("search_in");
            ?>
</label>
    <table width="100%">
        <tr class="nowrap">
            <td><label for="pname" class="checkbox inline"><input type="checkbox" value="Y" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['pname'] == "Y") {
                ?>
checked="checked"<?php 
            }
            ?>
 name="pname" id="pname" /><?php 
            echo $_smarty_tpl->__("product_name");
            ?>
</label></td>
            <td><label for="pshort" class="checkbox inline"><input type="checkbox" value="Y" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['pshort'] == "Y") {
                ?>
checked="checked"<?php 
            }
            ?>
 name="pshort" id="pshort"  /><?php 
            echo $_smarty_tpl->__("short_description");
            ?>
</label></td>
            <td><label for="pfull" class="checkbox  inline"><input type="checkbox" value="Y" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['pfull'] == "Y") {
                ?>
checked="checked"<?php 
            }
            ?>
 name="pfull" id="pfull" /><?php 
            echo $_smarty_tpl->__("full_description");
            ?>
</label></td>
            <td><label for="pkeywords" class="checkbox  inline"><input type="checkbox" value="Y" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['pkeywords'] == "Y") {
                ?>
checked="checked"<?php 
            }
            ?>
 name="pkeywords" id="pkeywords"  /><?php 
            echo $_smarty_tpl->__("keywords");
            ?>
</label></td>
        </tr>
    </table>
    </div>
</div>

<div class="group form-horizontal">
<?php 
            if (!fn_allowed_for("ULTIMATE:FREE") && $_smarty_tpl->tpl_vars['filter_items']->value) {
                ?>
<div class="control-group">

    <a href="#" class="search-link cm-combination open cm-save-state" id="sw_filter">
    <span id="on_filter" class="exicon-expand cm-save-state <?php 
                if ($_COOKIE['filter']) {
                    ?>
hidden<?php 
                }
                ?>
"> </span>
    <span id="off_filter" class="exicon-collapse cm-save-state <?php 
                if (!$_COOKIE['filter']) {
                    ?>
hidden<?php 
                }
                ?>
"></span>
    <?php 
                echo $_smarty_tpl->__("search_by_product_filters");
                ?>
</a>

    <div class="controls">
        <div id="filter"<?php 
                if (!$_COOKIE['filter']) {
                    ?>
 class="hidden"<?php 
                }
                ?>
>
            <?php 
                echo $_smarty_tpl->getSubTemplate("views/products/components/advanced_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('filter_features' => $_smarty_tpl->tpl_vars['filter_items']->value, 'prefix' => "filter_"), 0);
                ?>

        </div>
    </div>
</div>
<?php 
            }
            ?>
</div>

<?php 
            if ($_smarty_tpl->tpl_vars['feature_items']->value) {
                ?>
<div class="group form-horizontal">
    <div class="control-group">

        <a class="search-link cm-combination nowrap open cm-save-state" id="sw_feature"><span id="on_feature" class="cm-combination cm-save-state <?php 
                if ($_COOKIE['feature']) {
                    ?>
hidden<?php 
                }
                ?>
"><span class="exicon-expand"></span></span><span id="off_feature" class="cm-combination cm-save-state <?php 
                if (!$_COOKIE['feature']) {
                    ?>
hidden<?php 
                }
                ?>
"><span class="exicon-collapse"></span></span><?php 
                echo $_smarty_tpl->__("search_by_product_features");
                ?>
</a>

        <div class="controls">
        <div id="feature"<?php 
                if (!$_COOKIE['feature']) {
                    ?>
 class="hidden"<?php 
                }
                ?>
>
            <input type="hidden" name="advanced_filter" value="Y" />
            <?php 
                echo $_smarty_tpl->getSubTemplate("views/products/components/advanced_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('filter_features' => $_smarty_tpl->tpl_vars['feature_items']->value, 'prefix' => "feature_"), 0);
                ?>

        </div>
        </div>
    </div>
</div>
<?php 
            }
            ?>

<div class="row-fluid">
<div class="group span6">
    <div class="form-horizontal">
        <div class="control-group">
            <label for="pcode" class="control-label"><?php 
            echo $_smarty_tpl->__("search_by_sku");
            ?>
</label>
            <div class="controls">
                <input type="text" name="pcode" id="pcode" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['pcode'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="popularity_from"><?php 
            echo $_smarty_tpl->__("popularity");
            echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("ttc_popularity")), 0);
            ?>
</label>
            <div class="controls">
                <input type="text" name="popularity_from" id="popularity_from" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['popularity_from'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();" class="input-mini" /> - <input type="text" name="popularity_to" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['popularity_to'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();" class="input-mini" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="subcats"><?php 
            echo $_smarty_tpl->__("subcategories");
            ?>
</label>
            <div class="controls">
                <input type="hidden" name="subcats" value="N" />
                <input type="checkbox" value="Y"<?php 
            if ($_smarty_tpl->tpl_vars['search']->value['subcats'] == "Y" || !$_smarty_tpl->tpl_vars['search']->value['subcats']) {
                ?>
 checked="checked"<?php 
            }
            ?>
 name="subcats"  id="subcats" />
            </div>
        </div>
    </div>
</div>

<div class="group span6 form-horizontal">
    <div class="control-group">
        <label class="control-label" for="shipping_freight_from"><?php 
            echo $_smarty_tpl->__("shipping_freight");
            ?>
&nbsp;(<?php 
            echo $_smarty_tpl->tpl_vars['currencies']->value[$_smarty_tpl->tpl_vars['primary_currency']->value]['symbol'];
            ?>
)</label>
        <div class="controls">
            <input type="text" name="shipping_freight_from" id="shipping_freight_from" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['shipping_freight_from'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();" class="input-mini" /> - <input type="text" name="shipping_freight_to" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['shipping_freight_to'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();" class="input-mini" />
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="weight_from"><?php 
            echo $_smarty_tpl->__("weight");
            ?>
&nbsp;(<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['settings']->value['General']['weight_symbol'], ENT_QUOTES, 'UTF-8');
            ?>
)</label>
        <div class="controls">
            <input type="text" name="weight_from" id="weight_from" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_from'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();" class="input-mini" /> - <input type="text" name="weight_to" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['weight_to'], ENT_QUOTES, 'UTF-8');
            ?>
" onfocus="this.select();" class="input-mini" />
        </div>
    </div>

    <?php 
            $_smarty_tpl->tpl_vars["have_amount_filter"] = new Smarty_variable(0, null, 0);
            ?>
    <?php 
            if (!fn_allowed_for("ULTIMATE:FREE")) {
                ?>
        <?php 
                $_smarty_tpl->tpl_vars["ff"] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars["ff"]->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['filter_items']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars["ff"]->key => $_smarty_tpl->tpl_vars["ff"]->value) {
                    $_smarty_tpl->tpl_vars["ff"]->_loop = true;
                    ?>
            <?php 
                    if ($_smarty_tpl->tpl_vars['ff']->value['field_type'] == "A") {
                        ?>
                <?php 
                        $_smarty_tpl->tpl_vars["have_amount_filter"] = new Smarty_variable(1, null, 0);
                        ?>
            <?php 
                    }
                    ?>
        <?php 
                }
                ?>
    <?php 
            }
            ?>
    <?php 
            if (!$_smarty_tpl->tpl_vars['have_amount_filter']->value) {
                ?>
    <div class="control-group">
        <label class="control-label" for="amount_from"><?php 
                echo $_smarty_tpl->__("quantity");
                ?>
:</label>
        <div class="controls">
            <input type="text" name="amount_from" id="amount_from" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['amount_from'], ENT_QUOTES, 'UTF-8');
                ?>
" onfocus="this.select();" class="input-mini" /> - <input type="text" name="amount_to" value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['amount_to'], ENT_QUOTES, 'UTF-8');
                ?>
" onfocus="this.select();" class="input-mini" />
        </div>
    </div>
    <?php 
            }
            ?>

    <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "companies:products_advanced_search"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "companies:products_advanced_search"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

    <?php 
                if (fn_string_not_empty($_smarty_tpl->tpl_vars['picker_selected_company']->value)) {
                    ?>
        <input type="hidden" name="company_id" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['picker_selected_company']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
    <?php 
                } else {
                    ?>
        <?php 
                    echo $_smarty_tpl->getSubTemplate("common/select_vendor.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                    ?>

    <?php 
                }
                ?>
    <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "companies:products_advanced_search"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>


</div>
</div>

<div class="row-fluid">
    <div class="group span6 form-horizontal">
        <div class="control-group">
            <label class="control-label" for="free_shipping"><?php 
            echo $_smarty_tpl->__("free_shipping");
            ?>
</label>
            <div class="controls">
            <select name="free_shipping" id="free_shipping">
                <option value="">--</option>
                <option value="Y" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['free_shipping'] == "Y") {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->__("yes");
            ?>
</option>
                <option value="N" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['free_shipping'] == "N") {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->__("no");
            ?>
</option>
            </select>
            </div>
        </div>

        <div class="control-group">
            <label for="status" class="control-label"><?php 
            echo $_smarty_tpl->__("status");
            ?>
</label>
            <div class="controls">
            <select name="status" id="status">
                <option value="">--</option>
                <option value="A" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['status'] == "A") {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->__("active");
            ?>
</option>
                <option value="H" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['status'] == "H") {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->__("hidden");
            ?>
</option>
                <option value="D" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['status'] == "D") {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->__("disabled");
            ?>
</option>
            </select>
            </div>
        </div>
                
        <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_form"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:search_form"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:search_form"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

    </div>

    <div class="group span6 form-horizontal">
        
        <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "products:search_in_orders"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "products:search_in_orders"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

        <div class="control-group">
            <label class="control-label" for="popularity_from"><?php 
                echo $_smarty_tpl->__("purchased_in_orders");
                ?>
</label>
            <div class="controls">
                <?php 
                echo $_smarty_tpl->getSubTemplate("pickers/orders/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('item_ids' => $_smarty_tpl->tpl_vars['search']->value['order_ids'], 'no_item_text' => __("no_items"), 'data_id' => "order_ids", 'input_name' => "order_ids", 'view_mode' => "simple"), 0);
                ?>

            </div>
        </div>
        <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "products:search_in_orders"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

        <div class="control-group">
            <label class="control-label" for="sort_by"><?php 
            echo $_smarty_tpl->__("sort_by");
            ?>
</label>
            <div class="controls">
            <select class="input-mini" name="sort_by" id="sort_by">
                <option <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "list_price") {
                ?>
selected="selected"<?php 
            }
            ?>
 value="list_price"><?php 
            echo $_smarty_tpl->__("list_price");
            ?>
</option>
                <option <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "product") {
                ?>
selected="selected"<?php 
            }
            ?>
 value="product"><?php 
            echo $_smarty_tpl->__("name");
            ?>
</option>
                <option <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "price") {
                ?>
selected="selected"<?php 
            }
            ?>
 value="price"><?php 
            echo $_smarty_tpl->__("price");
            ?>
</option>
                <option <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "code") {
                ?>
selected="selected"<?php 
            }
            ?>
 value="code"><?php 
            echo $_smarty_tpl->__("sku");
            ?>
</option>
                <option <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "amount") {
                ?>
selected="selected"<?php 
            }
            ?>
 value="amount"><?php 
            echo $_smarty_tpl->__("quantity");
            ?>
</option>
                <option <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_by'] == "status") {
                ?>
selected="selected"<?php 
            }
            ?>
 value="status"><?php 
            echo $_smarty_tpl->__("status");
            ?>
</option>
            </select> -
            <select class="input-mini" name="sort_order" id="sort_order">
                <option <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_order_rev'] == "asc") {
                ?>
selected="selected"<?php 
            }
            ?>
 value="desc"><?php 
            echo $_smarty_tpl->__("desc");
            ?>
</option>
                <option <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['sort_order_rev'] == "desc") {
                ?>
selected="selected"<?php 
            }
            ?>
 value="asc"><?php 
            echo $_smarty_tpl->__("asc");
            ?>
</option>
            </select>
            </div>
        </div>
    </div>
</div>
<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "products:advanced_search"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/advanced_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('simple_search' => Smarty::$_smarty_vars['capture']['simple_search'], 'advanced_search' => Smarty::$_smarty_vars['capture']['advanced_search'], 'dispatch' => $_smarty_tpl->tpl_vars['dispatch']->value, 'view_type' => "products", 'in_popup' => $_smarty_tpl->tpl_vars['in_popup']->value), 0);
        ?>


</form>
<?php 
        if ($_smarty_tpl->tpl_vars['in_popup']->value) {
            ?>
    </div></div>
<?php 
        } else {
            ?>
    </div><hr>
<?php 
        }
    }
    function content_55ddd1046232f5_25391883($_smarty_tpl)
    {
        if (!is_callable('smarty_block_hook')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
        }
        fn_preload_lang_vars(array('information', 'name', 'location', 'root_level', 'location', 'root_level', 'description', 'images', 'text_category_icon', 'text_category_detailed_image', 'seo_meta_data', 'page_title', 'ttc_page_title', 'meta_description', 'meta_keywords', 'availability', 'usergroups', 'ttc_usergroups', 'to_all_subcats', 'position', 'creation_date', 'product_details_view', 'use_custom_view', 'product_columns', 'available_views', 'default_category_view', 'add_subcategory', 'add_product', 'preview', 'view_products', 'delete_this_category', 'categories', 'new_category', 'editing_category'));
        if ($_smarty_tpl->tpl_vars['category_data']->value['category_id']) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['category_data']->value['category_id'], null, 0);
        } else {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0);
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
        ob_start();
        ?>
<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" method="post" name="category_update_form" class="form-horizontal form-edit <?php 
        if (fn_check_form_permissions('')) {
            ?>
 cm-hide-inputs<?php 
        }
        ?>
" enctype="multipart/form-data">
<input type="hidden" name="fake" value="1" />
<input type="hidden" name="category_id" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
        ?>
" />
<input type="hidden" name="selected_section" value="<?php 
        echo htmlspecialchars($_REQUEST['selected_section'], ENT_QUOTES, 'UTF-8');
        ?>
" />

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null);
        ob_start();
        ?>

<div id="content_detailed">

    <?php 
        echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("information"), 'target' => "#acc_information"), 0);
        ?>

    <div id="acc_information" class="collapsed in">
    <div class="control-group">
        <label for="elm_category_name" class="control-label cm-required"><?php 
        echo $_smarty_tpl->__("name");
        ?>
:</label>
        <div class="controls">
            <input type="text" name="category_data[category]" id="elm_category_name" size="55" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['category'], ENT_QUOTES, 'UTF-8');
        ?>
" class="input-large" />
        </div>
    </div>
    <div class="control-group">
        <?php 
        if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) {
            ?>
            <label class="control-label cm-required" for="elm_category_parent_id"><?php 
            echo $_smarty_tpl->__("location");
            ?>
:</label>
            <div class="controls">
                <?php 
            echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_category", 'input_name' => "category_data[parent_id]", 'item_ids' => ($tmp = @$_smarty_tpl->tpl_vars['category_data']->value['parent_id']) === null || $tmp === '' ? "0" : $tmp, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("root_level"), 'display_input_id' => "elm_category_parent_id", 'except_id' => $_smarty_tpl->tpl_vars['id']->value), 0);
            ?>

            </div>
        <?php 
        } else {
            ?>
            <label class="control-label" for="elm_category_parent_id"><?php 
            echo $_smarty_tpl->__("location");
            ?>
:</label>

            <div class="controls">
            <select name="category_data[parent_id]" id="elm_category_parent_id">
                <option value="0" <?php 
            if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == "0") {
                ?>
selected="selected"<?php 
            }
            ?>
>- <?php 
            echo $_smarty_tpl->__("root_level");
            ?>
 -</option>
                <?php 
            $_smarty_tpl->tpl_vars["cat"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["cat"]->_loop = false;
            $_from = fn_get_plain_categories_tree(0, false);
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars["cat"]->index = -1;
            foreach ($_from as $_smarty_tpl->tpl_vars["cat"]->key => $_smarty_tpl->tpl_vars["cat"]->value) {
                $_smarty_tpl->tpl_vars["cat"]->_loop = true;
                $_smarty_tpl->tpl_vars["cat"]->index++;
                $_smarty_tpl->tpl_vars["cat"]->first = $_smarty_tpl->tpl_vars["cat"]->index === 0;
                $_smarty_tpl->tpl_vars['smarty']->value['foreach']["categories"]['first'] = $_smarty_tpl->tpl_vars["cat"]->first;
                ?>
                <?php 
                if (!fn_allowed_for("ULTIMATE")) {
                    ?>
                    <?php 
                    if (strpos($_smarty_tpl->tpl_vars['cat']->value['id_path'], (string) $_smarty_tpl->tpl_vars['category_data']->value['id_path'] . "/") === false && $_smarty_tpl->tpl_vars['cat']->value['category_id'] != $_smarty_tpl->tpl_vars['id']->value || !$_smarty_tpl->tpl_vars['id']->value) {
                        ?>
                        <option value="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category_id'], ENT_QUOTES, 'UTF-8');
                        ?>
" <?php 
                        if ($_smarty_tpl->tpl_vars['cat']->value['disabled']) {
                            ?>
disabled="disabled"<?php 
                        }
                        ?>
 <?php 
                        if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == $_smarty_tpl->tpl_vars['cat']->value['category_id']) {
                            ?>
selected="selected"<?php 
                        }
                        ?>
><?php 
                        echo preg_replace('!^!m', str_repeat("&#166;&nbsp;&nbsp;&nbsp;&nbsp;", $_smarty_tpl->tpl_vars['cat']->value['level']), htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8', true));
                        ?>
</option>
                    <?php 
                    }
                    ?>
                <?php 
                }
                ?>
                <?php 
                if (fn_allowed_for("ULTIMATE")) {
                    ?>
                    <?php 
                    if ($_smarty_tpl->tpl_vars['cat']->value['store']) {
                        ?>
                        <?php 
                        if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['categories']['first']) {
                            ?>
                            </optgroup>
                        <?php 
                        }
                        ?>
                        <optgroup label="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8');
                        ?>
">
                    <?php 
                    } else {
                        ?>
                        <?php 
                        if (strpos($_smarty_tpl->tpl_vars['cat']->value['id_path'], (string) $_smarty_tpl->tpl_vars['category_data']->value['id_path'] . "/") === false && $_smarty_tpl->tpl_vars['cat']->value['category_id'] != $_smarty_tpl->tpl_vars['id']->value || !$_smarty_tpl->tpl_vars['id']->value) {
                            ?>
                            <option value="<?php 
                            echo htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category_id'], ENT_QUOTES, 'UTF-8');
                            ?>
" <?php 
                            if ($_smarty_tpl->tpl_vars['cat']->value['disabled']) {
                                ?>
disabled="disabled"<?php 
                            }
                            ?>
 <?php 
                            if ($_smarty_tpl->tpl_vars['category_data']->value['parent_id'] == $_smarty_tpl->tpl_vars['cat']->value['category_id']) {
                                ?>
selected="selected"<?php 
                            }
                            ?>
><?php 
                            echo preg_replace('!^!m', str_repeat("&#166;&nbsp;&nbsp;&nbsp;&nbsp;", $_smarty_tpl->tpl_vars['cat']->value['level']), htmlspecialchars($_smarty_tpl->tpl_vars['cat']->value['category'], ENT_QUOTES, 'UTF-8', true));
                            ?>
</option>
                        <?php 
                        }
                        ?>
                    <?php 
                    }
                    ?>
                <?php 
                }
                ?>
                <?php 
            }
            ?>
            </select>
            </div>
        <?php 
        }
        ?>
    </div>

    <div class="control-group">
        <label class="control-label" for="elm_category_descr"><?php 
        echo $_smarty_tpl->__("description");
        ?>
:</label>
        <div class="controls">
            <textarea id="elm_category_descr" name="category_data[description]" cols="55" rows="8" class="input-large cm-wysiwyg input-textarea-long"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['description'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>
        </div>
    </div>

    <?php 
        echo $_smarty_tpl->getSubTemplate("common/select_status.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('input_name' => "category_data[status]", 'id' => "elm_category_status", 'obj' => $_smarty_tpl->tpl_vars['category_data']->value, 'hidden' => true), 0);
        ?>


    <?php 
        if (fn_allowed_for("ULTIMATE")) {
            ?>
    <?php 
            echo $_smarty_tpl->getSubTemplate("views/companies/components/company_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('name' => "category_data[company_id]", 'id' => "category_data_company_id", 'selected' => $_smarty_tpl->tpl_vars['category_data']->value['company_id']), 0);
            ?>

    <?php 
        }
        ?>

    <div class="control-group">
        <label class="control-label"><?php 
        echo $_smarty_tpl->__("images");
        ?>
:</label>
        <div class="controls">
            <?php 
        echo $_smarty_tpl->getSubTemplate("common/attach_images.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('image_name' => "category_main", 'image_object_type' => "category", 'image_pair' => $_smarty_tpl->tpl_vars['category_data']->value['main_pair'], 'image_object_id' => $_smarty_tpl->tpl_vars['id']->value, 'icon_text' => __("text_category_icon"), 'detailed_text' => __("text_category_detailed_image"), 'no_thumbnail' => true), 0);
        ?>

        </div>
    </div>

    </div>
    <hr />

    <?php 
        echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("seo_meta_data"), 'target' => "#acc_seo"), 0);
        ?>


    <div id="acc_seo" class="collapsed in">
    <div class="control-group">
        <label class="control-label" for="elm_category_page_title"><?php 
        echo $_smarty_tpl->__("page_title");
        echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("ttc_page_title")), 0);
        ?>
:</label>
        <div class="controls">
            <input type="text" name="category_data[page_title]" id="elm_category_page_title" size="55" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['page_title'], ENT_QUOTES, 'UTF-8');
        ?>
" class="input-large" />
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="elm_category_meta_description"><?php 
        echo $_smarty_tpl->__("meta_description");
        ?>
:</label>
        <div class="controls">
            <textarea name="category_data[meta_description]" id="elm_category_meta_description" cols="55" rows="4" class="input-large"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['meta_description'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="elm_category_meta_keywords"><?php 
        echo $_smarty_tpl->__("meta_keywords");
        ?>
:</label>
        <div class="controls">
            <textarea name="category_data[meta_keywords]" id="elm_category_meta_keywords" cols="55" rows="4" class="input-large"><?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['meta_keywords'], ENT_QUOTES, 'UTF-8');
        ?>
</textarea>
        </div>
    </div>
    </div>
    <hr />
    <?php 
        if (!fn_allowed_for("ULTIMATE:FREE")) {
            ?>
    <?php 
            echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("availability"), 'target' => "#acc_availability"), 0);
            ?>

    <div id="acc_availability">
    <div class="control-group">
        <label class="control-label"><?php 
            echo $_smarty_tpl->__("usergroups");
            echo $_smarty_tpl->getSubTemplate("common/tooltip.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tooltip' => __("ttc_usergroups")), 0);
            ?>
:</label>
            <div class="controls">
                <?php 
            echo $_smarty_tpl->getSubTemplate("common/select_usergroups.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "ug_id", 'name' => "category_data[usergroup_ids]", 'usergroups' => fn_get_usergroups("C", @constant('DESCR_SL')), 'usergroup_ids' => $_smarty_tpl->tpl_vars['category_data']->value['usergroup_ids'], 'input_extra' => '', 'list_mode' => false), 0);
            ?>

                <label class="checkbox" for="usergroup_to_subcats"><?php 
            echo $_smarty_tpl->__("to_all_subcats");
            ?>

                    <input id="usergroup_to_subcats" type="checkbox" name="category_data[usergroup_to_subcats]" value="Y" />
                </label>
            </div>
    </div>
    <?php 
        }
        ?>

    <div class="control-group">
        <label class="control-label" for="elm_category_position"><?php 
        echo $_smarty_tpl->__("position");
        ?>
:</label>
        <div class="controls">
            <input type="text" name="category_data[position]" id="elm_category_position" size="10" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['position'], ENT_QUOTES, 'UTF-8');
        ?>
" class="input-text-short" />
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="elm_category_creation_date"><?php 
        echo $_smarty_tpl->__("creation_date");
        ?>
:</label>
        <div class="controls">
            <?php 
        echo $_smarty_tpl->getSubTemplate("common/calendar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('date_id' => "elm_category_creation_date", 'date_name' => "category_data[timestamp]", 'date_val' => ($tmp = @$_smarty_tpl->tpl_vars['category_data']->value['timestamp']) === null || $tmp === '' ? @constant('TIME') : $tmp, 'start_year' => $_smarty_tpl->tpl_vars['settings']->value['Company']['company_start_year']), 0);
        ?>

        </div>
    </div>

    <?php 
        echo $_smarty_tpl->getSubTemplate("views/localizations/components/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_from' => $_smarty_tpl->tpl_vars['category_data']->value['localization'], 'data_name' => "category_data[localization]"), 0);
        ?>

</div>
</div>

<div id="content_views">
    <div id="extra">
        <div class="control-group">
            <label class="control-label" for="elm_category_product_layout"><?php 
        echo $_smarty_tpl->__("product_details_view");
        ?>
:</label>
            <div class="controls">
            <select id="elm_category_product_layout" name="category_data[product_details_layout]">
                <?php 
        $_smarty_tpl->tpl_vars["item"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["item"]->_loop = false;
        $_smarty_tpl->tpl_vars["layout"] = new Smarty_Variable();
        $_from = fn_get_product_details_views("category");
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["item"]->key => $_smarty_tpl->tpl_vars["item"]->value) {
            $_smarty_tpl->tpl_vars["item"]->_loop = true;
            $_smarty_tpl->tpl_vars["layout"]->value = $_smarty_tpl->tpl_vars["item"]->key;
            ?>
                    <option <?php 
            if ($_smarty_tpl->tpl_vars['category_data']->value['product_details_layout'] == $_smarty_tpl->tpl_vars['layout']->value) {
                ?>
selected="selected"<?php 
            }
            ?>
 value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value, ENT_QUOTES, 'UTF-8');
            ?>
</option>
                <?php 
        }
        ?>
            </select>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_category_use_custom_templates"><?php 
        echo $_smarty_tpl->__("use_custom_view");
        ?>
:</label>
            <div class="controls">
            <input type="hidden" value="N" name="category_data[use_custom_templates]"/>
            <input type="checkbox" class="cm-toggle-checkbox" value="Y" name="category_data[use_custom_templates]" id="elm_category_use_custom_templates"<?php 
        if ($_smarty_tpl->tpl_vars['category_data']->value['selected_layouts']) {
            ?>
 checked="checked"<?php 
        }
        ?>
 />
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_category_product_columns"><?php 
        echo $_smarty_tpl->__("product_columns");
        ?>
:</label>
            <div class="controls">
            <input type="text" name="category_data[product_columns]" id="elm_category_product_columns" size="10" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_data']->value['product_columns'], ENT_QUOTES, 'UTF-8');
        ?>
" class="cm-toggle-element" <?php 
        if (!$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts']) {
            ?>
disabled="disabled"<?php 
        }
        ?>
 />
            </div>
        </div>

        <?php 
        $_smarty_tpl->tpl_vars["layouts"] = new Smarty_variable(fn_get_products_views('', false, false), null, 0);
        ?>
        <div class="control-group">
            <label class="control-label"><?php 
        echo $_smarty_tpl->__("available_views");
        ?>
:</label>
            <div class="controls">
                <?php 
        $_smarty_tpl->tpl_vars["item"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["item"]->_loop = false;
        $_smarty_tpl->tpl_vars["layout"] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['layouts']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["item"]->key => $_smarty_tpl->tpl_vars["item"]->value) {
            $_smarty_tpl->tpl_vars["item"]->_loop = true;
            $_smarty_tpl->tpl_vars["layout"]->value = $_smarty_tpl->tpl_vars["item"]->key;
            ?>
                    <label class="checkbox" for="elm_category_layout_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><input type="checkbox" class="cm-combo-checkbox cm-toggle-element" name="category_data[selected_layouts][<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8');
            ?>
]" id="elm_category_layout_<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8');
            ?>
" value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8');
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['category_data']->value['selected_layouts'][$_smarty_tpl->tpl_vars['layout']->value] || !$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts'] && $_smarty_tpl->tpl_vars['item']->value['active']) {
                ?>
checked="checked"<?php 
            }
            ?>
 <?php 
            if (!$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts']) {
                ?>
disabled="disabled"<?php 
            }
            ?>
 /><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['title'], ENT_QUOTES, 'UTF-8');
            ?>
</label>
                <?php 
        }
        ?>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="elm_category_default_layout"><?php 
        echo $_smarty_tpl->__("default_category_view");
        ?>
:</label>
            <div class="controls">
            <select id="elm_category_default_layout" class="cm-combo-select cm-toggle-element" name="category_data[default_layout]" <?php 
        if (!$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts']) {
            ?>
disabled="disabled"<?php 
        }
        ?>
>
                <?php 
        $_smarty_tpl->tpl_vars["item"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["item"]->_loop = false;
        $_smarty_tpl->tpl_vars["layout"] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['layouts']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["item"]->key => $_smarty_tpl->tpl_vars["item"]->value) {
            $_smarty_tpl->tpl_vars["item"]->_loop = true;
            $_smarty_tpl->tpl_vars["layout"]->value = $_smarty_tpl->tpl_vars["item"]->key;
            ?>
                    <?php 
            if ($_smarty_tpl->tpl_vars['category_data']->value['selected_layouts'][$_smarty_tpl->tpl_vars['layout']->value] || !$_smarty_tpl->tpl_vars['category_data']->value['selected_layouts'] && $_smarty_tpl->tpl_vars['item']->value['active']) {
                ?>
                        <option <?php 
                if ($_smarty_tpl->tpl_vars['category_data']->value['default_layout'] == $_smarty_tpl->tpl_vars['layout']->value) {
                    ?>
selected="selected"<?php 
                }
                ?>
 value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value, ENT_QUOTES, 'UTF-8');
                ?>
"><?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['item']->value['title'], ENT_QUOTES, 'UTF-8');
                ?>
</option>
                    <?php 
            }
            ?>
                <?php 
        }
        ?>
            </select>
            </div>
        </div>
    </div>
</div>

<div id="content_addons">
<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "categories:detailed_content"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "categories:detailed_content"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "categories:detailed_content"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

</div>

<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "categories:tabs_content"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "categories:tabs_content"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "categories:tabs_content"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


<?php 
        $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null);
        ob_start();
        ?>
    <?php 
        if ($_smarty_tpl->tpl_vars['id']->value) {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("common/view_tools.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('url' => "categories.update?category_id="), 0);
            ?>


        <?php 
            $_smarty_tpl->tpl_vars['view_uri'] = new Smarty_variable(fn_get_preview_url("categories.view?category_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, $_smarty_tpl->tpl_vars['category_data']->value, $_smarty_tpl->tpl_vars['auth']->value['user_id']), null, 0);
            ?>

        <?php 
            $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
            ob_start();
            ?>
            <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "categories:update_tools_list"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "categories:update_tools_list"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'href' => "categories.add?parent_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'text' => __("add_subcategory")));
                ?>
</li>
                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'href' => "products.add?category_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'text' => __("add_product")));
                ?>
</li>
                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'target' => "_blank", 'text' => __("preview"), 'href' => $_smarty_tpl->tpl_vars['view_uri']->value));
                ?>
</li>
                <li class="divider"></li>
                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'href' => "products.manage?cid=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'text' => __("view_products")));
                ?>
</li>
                <li><?php 
                smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'class' => "cm-confirm", 'text' => __("delete_this_category"), 'href' => "categories.delete?category_id=" . (string) $_smarty_tpl->tpl_vars['id']->value));
                ?>
</li>
            <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "categories:update_tools_list"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

        <?php 
            list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
            if (!empty($_capture_buffer)) {
                if (isset($_capture_assign)) {
                    $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                }
                if (isset($_capture_append)) {
                    $_smarty_tpl->append($_capture_append, ob_get_contents());
                }
                Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
            } else {
                $_smarty_tpl->capture_error();
            }
            ?>
        <?php 
            smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list']));
            ?>

    <?php 
        }
        ?>
    <?php 
        echo $_smarty_tpl->getSubTemplate("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_role' => "submit-link", 'but_target_form' => "category_update_form", 'but_name' => "dispatch[categories.update]", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0);
        ?>

<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['id']->value) {
            ?>
    <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "categories:tabs_extra"));
            $_block_repeat = true;
            echo smarty_block_hook(array('name' => "categories:tabs_extra"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

    <?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_hook(array('name' => "categories:tabs_extra"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>

<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['tabsbox'], 'group_name' => $_smarty_tpl->tpl_vars['runtime']->value['controller'], 'active_tab' => $_REQUEST['selected_section'], 'track' => true), 0);
        ?>

</form>
<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("sidebar", null, null);
        ob_start();
        if ($_smarty_tpl->tpl_vars['categories_tree']->value) {
            ?>
    <div class="sidebar-row">
        <h6><?php 
            echo $_smarty_tpl->__("categories");
            ?>
</h6>
        <div class="nested-tree">
            <?php 
            echo $_smarty_tpl->getSubTemplate("views/categories/components/categories_links_tree.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('show_all' => false, 'categories_tree' => $_smarty_tpl->tpl_vars['categories_tree']->value), 0);
            ?>

        </div>
    </div>
<?php 
        }
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        if (!$_smarty_tpl->tpl_vars['id']->value) {
            ?>
    <?php 
            echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("new_category"), 'sidebar' => Smarty::$_smarty_vars['capture']['sidebar'], 'sidebar_position' => "left", 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'buttons' => Smarty::$_smarty_vars['capture']['buttons']), 0);
            ?>

<?php 
        } else {
            ?>
    <?php 
            ob_start();
            echo $_smarty_tpl->__("editing_category");
            $_tmp1 = ob_get_clean();
            echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('sidebar' => Smarty::$_smarty_vars['capture']['sidebar'], 'sidebar_position' => "left", 'title' => $_tmp1 . ": " . (string) $_smarty_tpl->tpl_vars['category_data']->value['category'], 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'select_languages' => true, 'buttons' => Smarty::$_smarty_vars['capture']['buttons'], 'adv_buttons' => Smarty::$_smarty_vars['capture']['adv_buttons']), 0);
            ?>

<?php 
        }
        ?>


<?php 
    }
    function content_55deab254a7b30_93084451($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_in_array')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.in_array.php';
        }
        if (!is_callable('smarty_block_hook')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
        }
        fn_preload_lang_vars(array('search', 'category', 'all_categories', 'feature', 'type', 'checkbox', 'single', 'checkbox', 'multiple', 'selectbox', 'text', 'selectbox', 'number', 'selectbox', 'brand_type', 'others', 'text', 'others', 'number', 'others', 'date', 'display_on', 'product', 'catalog_pages', 'group', 'ungroupped_features'));
        ?>
<div class="sidebar-row">
<h6><?php 
        echo $_smarty_tpl->__("search");
        ?>
</h6>

<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" name="product_features_search_form" method="get">

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("simple_search", null, null);
        ob_start();
        ?>
<div class="sidebar-field">
    <label><?php 
        echo $_smarty_tpl->__("category");
        ?>
:</label>
    <div class="break clear correct-picker-but">
    <?php 
        if (fn_show_picker("categories", @constant('CATEGORY_THRESHOLD'))) {
            ?>
        <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['category_ids']) {
                ?>
            <?php 
                $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable($_smarty_tpl->tpl_vars['search']->value['category_ids'], null, 0);
                ?>
        <?php 
            } else {
                ?>
            <?php 
                $_smarty_tpl->tpl_vars["s_cid"] = new Smarty_variable("0", null, 0);
                ?>
        <?php 
            }
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("pickers/categories/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_category", 'input_name' => "category_ids", 'item_ids' => $_smarty_tpl->tpl_vars['s_cid']->value, 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_categories"), 'extra' => ''), 0);
            ?>

    <?php 
        } else {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("common/select_category.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('name' => "category_ids", 'id' => $_smarty_tpl->tpl_vars['search']->value['category_ids']), 0);
            ?>

    <?php 
        }
        ?>
    </div>
</div>
<div class="sidebar-field">
    <label for="fname"><?php 
        echo $_smarty_tpl->__("feature");
        ?>
:</label>
    <input type="text" name="description" id="fname" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['description'], ENT_QUOTES, 'UTF-8');
        ?>
" size="30" />
</div>
<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("advanced_search", null, null);
        ob_start();
        ?>
<div class="group form-horizontal">
    <?php 
        echo $_smarty_tpl->__("type");
        ?>

    
        <table width="100%">
            <tr class="nowrap">
                <td><label for="elm_checkbox_single" class="checkbox"><input id="elm_checkbox_single"  type="checkbox" name="feature_types[]" <?php 
        if (smarty_modifier_in_array("C", $_smarty_tpl->tpl_vars['search']->value['feature_types'])) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="C"/><?php 
        echo $_smarty_tpl->__("checkbox");
        ?>
:&nbsp;<?php 
        echo $_smarty_tpl->__("single");
        ?>
</label></td>
                <td><label for="elm_checkbox_multiple" class="checkbox"><input id="elm_checkbox_multiple" type="checkbox" name="feature_types[]" <?php 
        if (smarty_modifier_in_array("M", $_smarty_tpl->tpl_vars['search']->value['feature_types'])) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="M"/><?php 
        echo $_smarty_tpl->__("checkbox");
        ?>
:&nbsp;<?php 
        echo $_smarty_tpl->__("multiple");
        ?>
</label></td>
                <td><label for="elm_selectbox_text" class="checkbox"><input id="elm_selectbox_text"  type="checkbox" name="feature_types[]" <?php 
        if (smarty_modifier_in_array("S", $_smarty_tpl->tpl_vars['search']->value['feature_types'])) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="S"/><?php 
        echo $_smarty_tpl->__("selectbox");
        ?>
:&nbsp;<?php 
        echo $_smarty_tpl->__("text");
        ?>
</label></td>
                <td><label for="elm_selectbox_number" class="checkbox"><input id="elm_selectbox_number"  type="checkbox" name="feature_types[]" <?php 
        if (smarty_modifier_in_array("N", $_smarty_tpl->tpl_vars['search']->value['feature_types'])) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="N"/><?php 
        echo $_smarty_tpl->__("selectbox");
        ?>
:&nbsp;<?php 
        echo $_smarty_tpl->__("number");
        ?>
</label></td>
            </tr>
            <tr>
            <td><label for="elm_selectbox_brand_type" class="checkbox"><input id="elm_selectbox_brand_type"  type="checkbox" name="feature_types[]" <?php 
        if (smarty_modifier_in_array("E", $_smarty_tpl->tpl_vars['search']->value['feature_types'])) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="E"/><?php 
        echo $_smarty_tpl->__("selectbox");
        ?>
:&nbsp;<?php 
        echo $_smarty_tpl->__("brand_type");
        ?>
</label></td>
                <td><label for="elm_others_text" class="checkbox"><input id="elm_others_text"  type="checkbox" name="feature_types[]" <?php 
        if (smarty_modifier_in_array("T", $_smarty_tpl->tpl_vars['search']->value['feature_types'])) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="T"/><?php 
        echo $_smarty_tpl->__("others");
        ?>
:&nbsp;<?php 
        echo $_smarty_tpl->__("text");
        ?>
</label></td>
                <td><label for="elm_others_number" class="checkbox"><input id="elm_others_number"  type="checkbox" name="feature_types[]" <?php 
        if (smarty_modifier_in_array("O", $_smarty_tpl->tpl_vars['search']->value['feature_types'])) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="O"/><?php 
        echo $_smarty_tpl->__("others");
        ?>
:&nbsp;<?php 
        echo $_smarty_tpl->__("number");
        ?>
</label></td>
                <td><label for="elm_others_date" class="checkbox"><input id="elm_others_date"  type="checkbox" name="feature_types[]" <?php 
        if (smarty_modifier_in_array("D", $_smarty_tpl->tpl_vars['search']->value['feature_types'])) {
            ?>
checked="checked"<?php 
        }
        ?>
 value="D"/><?php 
        echo $_smarty_tpl->__("others");
        ?>
:&nbsp;<?php 
        echo $_smarty_tpl->__("date");
        ?>
</label></td>
            </tr>
        </table>
    
</div>

<div class="group form-horizontal">
    <div class="control-group">
    <label class="control-label" for="elm_display_on"><?php 
        echo $_smarty_tpl->__("display_on");
        ?>
:</label>
    <div class="controls">
    <select name="display_on" id="elm_display_on">
        <option value="">--</option>
        <option value="product" <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['display_on'] == "product") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("product");
        ?>
</option>
        <option value="catalog" <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['display_on'] == "catalog") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("catalog_pages");
        ?>
</option>
    </select>
    </div>
    </div>

    <div class="control-group">
    <label for="elm_parent_id" class="control-label"><?php 
        echo $_smarty_tpl->__("group");
        ?>
:</label>
    <div class="controls">
    <select name="parent_id" id="elm_parent_id">
        <option value="">--</option>
        <option <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['parent_id'] === "0") {
            ?>
selected="selected"<?php 
        }
        ?>
 value="0"><?php 
        echo $_smarty_tpl->__("ungroupped_features");
        ?>
</option>
        <?php 
        $_smarty_tpl->tpl_vars["group_feature"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["group_feature"]->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['group_features']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["group_feature"]->key => $_smarty_tpl->tpl_vars["group_feature"]->value) {
            $_smarty_tpl->tpl_vars["group_feature"]->_loop = true;
            ?>
            <option value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['group_feature']->value['feature_id'], ENT_QUOTES, 'UTF-8');
            ?>
"<?php 
            if ($_smarty_tpl->tpl_vars['group_feature']->value['feature_id'] == $_smarty_tpl->tpl_vars['search']->value['parent_id']) {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['group_feature']->value['description'], ENT_QUOTES, 'UTF-8');
            ?>
</option>
        <?php 
        }
        ?>
    </select>
    </div>
    </div>

    <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "product_features:search_form"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "product_features:search_form"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

    <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "product_features:search_form"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

</div>
<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/advanced_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('simple_search' => Smarty::$_smarty_vars['capture']['simple_search'], 'advanced_search' => Smarty::$_smarty_vars['capture']['advanced_search'], 'dispatch' => $_smarty_tpl->tpl_vars['dispatch']->value, 'view_type' => "product_features"), 0);
        ?>


</form>
</div><?php 
    }
    function content_55cdb2a78536e0_76680754($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_truncate')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/modifier.truncate.php';
        }
        if (!is_callable('smarty_function_math')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.math.php';
        }
        if (!is_callable('smarty_block_hook')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
        }
        fn_preload_lang_vars(array('search', 'find_results_with', 'type', 'parent_page', 'all_pages', 'all_pages', 'search_in', 'page_name', 'description', 'subpages', 'status', 'active', 'hidden', 'disabled'));
        if ($_smarty_tpl->tpl_vars['in_popup']->value) {
            ?>
<div class="adv-search">
    <div class="group">
<?php 
        } else {
            ?>
    <div class="sidebar-row">
    <h6><?php 
            echo $_smarty_tpl->__("search");
            ?>
</h6>
<?php 
        }
        ?>

<form action="<?php 
        echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
        ?>
" name="pages_search_form" method="get" class="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['form_meta']->value, ENT_QUOTES, 'UTF-8');
        ?>
">
<input type="hidden" name="get_tree" value="" />
<?php 
        if ($_smarty_tpl->tpl_vars['put_request_vars']->value) {
            ?>
    <?php 
            $_smarty_tpl->tpl_vars["v"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["v"]->_loop = false;
            $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable();
            $_from = $_REQUEST;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["v"]->key => $_smarty_tpl->tpl_vars["v"]->value) {
                $_smarty_tpl->tpl_vars["v"]->_loop = true;
                $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["v"]->key;
                ?>
        <?php 
                if ($_smarty_tpl->tpl_vars['v']->value && $_smarty_tpl->tpl_vars['k']->value != "callback") {
                    ?>
            <input type="hidden" name="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['k']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" value="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8');
                    ?>
" />
        <?php 
                }
                ?>
    <?php 
            }
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("simple_search", null, null);
        ob_start();
        echo $_smarty_tpl->tpl_vars['extra']->value;
        ?>

<div class="sidebar-field">
    <label><?php 
        echo $_smarty_tpl->__("find_results_with");
        ?>
</label>
    <input type="text" name="q" size="20" value="<?php 
        echo htmlspecialchars($_smarty_tpl->tpl_vars['search']->value['q'], ENT_QUOTES, 'UTF-8');
        ?>
" />
</div>
<div class="sidebar-field">
    <label><?php 
        echo $_smarty_tpl->__("type");
        ?>
</label>
    <select class="small" name="page_type">
        <option value="">--</option>
        <?php 
        $_smarty_tpl->tpl_vars["p"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["p"]->_loop = false;
        $_smarty_tpl->tpl_vars["t"] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['page_types']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["p"]->key => $_smarty_tpl->tpl_vars["p"]->value) {
            $_smarty_tpl->tpl_vars["p"]->_loop = true;
            $_smarty_tpl->tpl_vars["t"]->value = $_smarty_tpl->tpl_vars["p"]->key;
            ?>
        <option value="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['t']->value, ENT_QUOTES, 'UTF-8');
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['search']->value['page_type'] == $_smarty_tpl->tpl_vars['t']->value) {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $_smarty_tpl->__($_smarty_tpl->tpl_vars['p']->value['name']);
            ?>
</option>
        <?php 
        }
        ?>
    </select>
</div>
<div class="sidebar-field">
    <label><?php 
        echo $_smarty_tpl->__("parent_page");
        ?>
</label>
    <?php 
        if (fn_show_picker("pages", @constant('PAGE_THRESHOLD'))) {
            ?>
        <?php 
            echo $_smarty_tpl->getSubTemplate("pickers/pages/picker.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_id' => "location_page", 'input_name' => "parent_id", 'item_ids' => $_smarty_tpl->tpl_vars['search']->value['parent_id'], 'hide_link' => true, 'hide_delete_button' => true, 'default_name' => __("all_pages"), 'extra' => '', 'no_container' => true, 'prepend' => true), 0);
            ?>

    <?php 
        } else {
            ?>
        <select name="parent_id">
            <option value="">- <?php 
            echo $_smarty_tpl->__("all_pages");
            ?>
 -</option>
            <?php 
            $_smarty_tpl->tpl_vars["p"] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars["p"]->_loop = false;
            $_from = fn_get_pages_plain_list('');
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars["p"]->key => $_smarty_tpl->tpl_vars["p"]->value) {
                $_smarty_tpl->tpl_vars["p"]->_loop = true;
                ?>
                <option value="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['p']->value['page_id'], ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['search']->value['parent_id'] == $_smarty_tpl->tpl_vars['p']->value['page_id']) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo preg_replace('!^!m', str_repeat("&#166;&nbsp;&nbsp;&nbsp;&nbsp;", $_smarty_tpl->tpl_vars['p']->value['level']), smarty_modifier_truncate(htmlspecialchars($_smarty_tpl->tpl_vars['p']->value['page'], ENT_QUOTES, 'UTF-8', true), 35, "...", true));
                ?>
</option>
            <?php 
            }
            ?>
        </select>
    <?php 
        }
        ?>
</div>
<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        $_smarty_tpl->_capture_stack[0][] = array("advanced_search", null, null);
        ob_start();
        ?>
<div class="group">
    <label><?php 
        echo $_smarty_tpl->__("search_in");
        ?>
</label>
    <table width="100%">
    <tr>
        <td class="select-field"><label for="pname" class="checkbox"><input type="checkbox" value="Y" <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['pname'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
 name="pname" id="pname"/><?php 
        echo $_smarty_tpl->__("page_name");
        ?>
</label></td>
        <td>&nbsp;&nbsp;&nbsp;</td>

        <td class="select-field"><label class="checkbox" for="pdescr"><input type="checkbox" value="Y" <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['pdescr'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
 name="pdescr" id="pdescr" /><?php 
        echo $_smarty_tpl->__("description");
        ?>
</label></td>
        <td>&nbsp;&nbsp;&nbsp;</td>

        <td class="select-field"><label class="checkbox" for="subpages"><input type="checkbox" value="Y" <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['subpages'] == "Y") {
            ?>
checked="checked"<?php 
        }
        ?>
 name="subpages" id="subpages" /><?php 
        echo $_smarty_tpl->__("subpages");
        ?>
</label></td>
    </tr>
    </table>
</div>

<div class="group form-horizontal">
    <div class="control-group">
        <label class="control-label"><?php 
        echo $_smarty_tpl->__("status");
        ?>
</label>
        <div class="controls">
            <select name="status">
                <option value="">--</option>
                <option value="A" <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['status'] == "A") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("active");
        ?>
</option>
                <option value="H" <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['status'] == "H") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("hidden");
        ?>
</option>
                <option value="D" <?php 
        if ($_smarty_tpl->tpl_vars['search']->value['status'] == "D") {
            ?>
selected="selected"<?php 
        }
        ?>
><?php 
        echo $_smarty_tpl->__("disabled");
        ?>
</option>
            </select>
        </div>
    </div>

    <?php 
        echo smarty_function_math(array('equation' => "rand()", 'assign' => "random_value"), $_smarty_tpl);
        ?>

    <?php 
        echo $_smarty_tpl->getSubTemplate("common/select_vendor.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => "company_id_" . (string) $_smarty_tpl->tpl_vars['random_value']->value), 0);
        ?>


    <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "pages:search_form"));
        $_block_repeat = true;
        echo smarty_block_hook(array('name' => "pages:search_form"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

    <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_hook(array('name' => "pages:search_form"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

</div>
<?php 
        list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
        if (!empty($_capture_buffer)) {
            if (isset($_capture_assign)) {
                $_smarty_tpl->assign($_capture_assign, ob_get_contents());
            }
            if (isset($_capture_append)) {
                $_smarty_tpl->append($_capture_append, ob_get_contents());
            }
            Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
        } else {
            $_smarty_tpl->capture_error();
        }
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("common/advanced_search.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('simple_search' => Smarty::$_smarty_vars['capture']['simple_search'], 'advanced_search' => Smarty::$_smarty_vars['capture']['advanced_search'], 'dispatch' => $_smarty_tpl->tpl_vars['dispatch']->value, 'view_type' => "pages", 'in_popup' => $_smarty_tpl->tpl_vars['in_popup']->value), 0);
        ?>


</form>
<?php 
        if ($_smarty_tpl->tpl_vars['in_popup']->value) {
            ?>
    </div></div>
<?php 
        } else {
            ?>
    </div><hr>
<?php 
        }
    }