コード例 #1
0
ファイル: Pdf.php プロジェクト: ambient-lounge/site
 protected function printProductRow($product, $options_variants = array())
 {
     $tbl = '<tr>';
     foreach ($this->selected_fields as $field_name => $active) {
         $tbl .= '<td width="' . $this->price_schema['fields'][$field_name]['min_width'] . '%">';
         if ($field_name == 'image') {
             if (!empty($product['main_pair']) && ($image_data = fn_image_to_display($product['main_pair'], 0, static::IMAGE_HEIGHT))) {
                 $tbl .= '<img src="' . $image_data['image_path'] . '" width= "' . $image_data['width'] . '" height="' . $image_data['height'] . '" alt="">';
             }
         } elseif ($field_name == 'product' && !empty($options_variants)) {
             $options = array();
             foreach ($options_variants as $option_id => $variant_id) {
                 $options[] = htmlspecialchars($product['product_options'][$option_id]['option_name'] . ': ' . $product['product_options'][$option_id]['variants'][$variant_id]['variant_name']);
             }
             $options = implode('<br>', $options);
             $tbl .= htmlspecialchars($product[$field_name]) . '<br>' . $options;
         } elseif ($field_name == 'price') {
             $tbl .= fn_format_price($product[$field_name], CART_PRIMARY_CURRENCY, null, false);
         } else {
             $tbl .= htmlspecialchars($product[$field_name]);
         }
         $tbl .= '</td>';
     }
     $tbl .= '</tr>';
     $this->tbl .= $tbl;
 }
コード例 #2
0
ファイル: func.php プロジェクト: askzap/ultimate
function fn_format_image_url($product_data = array())
{
    $image_url = '';
    if (!empty($product_data['main_pair'])) {
        $image_data = fn_image_to_display($product_data['main_pair'], Registry::get('settings.Thumbnails.product_lists_thumbnail_width'), Registry::get('settings.Thumbnails.product_lists_thumbnail_height'));
        $image_url = !empty($image_data) ? $image_data['image_path'] : '';
    }
    return $image_url;
}
コード例 #3
0
function fn_exim_mailru_get_image_url($product_id, $object_type, $pair_type, $get_icon, $get_detailed, $lang_code)
{
    $image_pair = fn_get_image_pairs($product_id, $object_type, $pair_type, $get_icon, $get_detailed, $lang_code);
    $image_data = fn_image_to_display($image_pair, Registry::get('settings.Thumbnails.product_details_thumbnail_width'), Registry::get('settings.Thumbnails.product_details_thumbnail_height'));
    if (strpos($image_data['image_path'], '.php')) {
        $image_data['image_path'] = fn_generate_thumbnail($image_data['detailed_image_path'], $image_data['width'], $image_data['height']);
    }
    if (!empty($image_data['image_path'])) {
        $url = $image_data['image_path'];
    } else {
        $url = '';
    }
    return htmlspecialchars($url, ENT_QUOTES, 'UTF-8');
}
コード例 #4
0
ファイル: Xlsx.php プロジェクト: ambient-lounge/site
 protected function printProductRow($product, $options_variants = array())
 {
     $_data = array();
     foreach ($this->selected_fields as $field_id => $field_value) {
         if ($field_id == 'image') {
             if (!empty($product['main_pair']) && ($image_data = fn_image_to_display($product['main_pair']))) {
                 $value = $image_data['detailed_image_path'];
             } else {
                 $value = '';
             }
         } else {
             $value = isset($product[$field_id]) ? $product[$field_id] : '';
         }
         $_data[] = $value;
     }
     $this->data[] = $_data;
 }
コード例 #5
0
ファイル: searchanise.php プロジェクト: heg-arc-ne/cscart
function fn_se_prepare_product_data($product_data, $usergroups, $company_id, $lang_code)
{
    $types_map = array('D' => 'int', 'M' => 'text', 'S' => 'text', 'N' => 'float', 'E' => 'text', 'C' => 'text', 'T' => 'text', 'O' => 'float');
    $entry = array('id' => array('value' => $product_data['product_id'], 'title' => __('se_product_id')), 'title' => array('value' => $product_data['product'], 'title' => __('se_title')), 'summary' => array('value' => !empty($product_data['short_description']) ? $product_data['short_description'] : $product_data['full_description'], 'title' => __('se_summary')), 'link' => array('value' => fn_url('products.view?product_id=' . $product_data['product_id'], 'C', 'http', $lang_code), 'title' => __('se_link')), 'price' => array('value' => fn_format_price($product_data['price']), 'title' => __('se_price')), 'quantity' => array('value' => $product_data['amount'], 'title' => __('se_quantity')), 'product_code' => array('value' => $product_data['product_code'], 'title' => __('se_product_code')), 'image_link' => array('title' => __('se_image_link')));
    if (!empty($product_data['main_pair'])) {
        $thumbnail = fn_image_to_display($product_data['main_pair'], SE_IMAGE_SIZE, SE_IMAGE_SIZE);
    }
    if (!empty($thumbnail['image_path'])) {
        $image_link = $thumbnail['image_path'];
    } elseif (!empty($product_data['main_pair']['detailed']['http_image_path'])) {
        $image_link = $product_data['main_pair']['detailed']['http_image_path'];
    } else {
        $image_link = '';
    }
    $entry['image_link']['value'] = htmlspecialchars($image_link);
    if (!empty($product_data['search_words'])) {
        $entry['search_words'] = array('name' => 'search_words', 'title' => __('search_words'), 'text_search' => 'Y', 'weight' => 100, 'value' => $product_data['search_words']);
    }
    if (!empty($product_data['product_features'])) {
        foreach ($product_data['product_features'] as $f) {
            $name = "f_{$f['feature_id']}";
            $entry[$name] = array('name' => $name, 'title' => $f['feature'], 'text_search' => 'Y', 'weight' => 60);
            if ($f['feature_type'] == ProductFeatures::TEXT_SELECTBOX || $f['feature_type'] == ProductFeatures::EXTENDED) {
                $entry[$name]['value'] = $f['variant'];
            } else {
                $entry[$name]['value'] = $f['value'];
            }
        }
    }
    if (!empty($product_data['short_description']) && !empty($product_data['se_full_description'])) {
        $entry['full_description'] = array('name' => 'full_description', 'title' => __('full_description'), 'text_search' => 'Y', 'weight' => 40);
        $entry['full_description']['value'] = $product_data['se_full_description'];
    }
    if (!empty($product_data['product_features']) && fn_se_get_setting('use_navigation', $company_id, DEFAULT_LANGUAGE) == 'Y') {
        foreach ($product_data['product_features'] as $f) {
            if ($f['feature_type'] == ProductFeatures::GROUP) {
                continue;
            }
            $name = "feature_{$f['feature_id']}";
            $entry[$name] = array('name' => $name, 'type' => $types_map[$f['feature_type']], 'title' => str_replace('[id]', $f['feature'], __("se_for_feature_id")));
            if ($f['feature_type'] == ProductFeatures::MULTIPLE_CHECKBOX) {
                if (!empty($f['variants']) && is_array($f['variants'])) {
                    foreach ($f['variants'] as $fv) {
                        $entry[$name]['value'][] = $fv['variant_id'];
                    }
                }
            } else {
                if ($f['feature_type'] == ProductFeatures::TEXT_SELECTBOX || $f['feature_type'] == ProductFeatures::EXTENDED) {
                    $entry[$name]['value'] = $f['variant_id'];
                } elseif ($f['feature_type'] == ProductFeatures::NUMBER_SELECTBOX) {
                    $entry[$name]['value'] = $f['variant'];
                } elseif ($f['feature_type'] == ProductFeatures::NUMBER_FIELD || $f['feature_type'] == ProductFeatures::DATE) {
                    $entry[$name]['value'] = $f['value_int'];
                } elseif ($f['feature_type'] == ProductFeatures::SINGLE_CHECKBOX) {
                    $entry[$name]['value'] = $f['value'] == 'Y' ? 'Y' : 'N';
                } else {
                    // ProductFeatures::TEXT_FIELD
                    $entry[$name]['value'] = $f['value'];
                }
            }
        }
    }
    //
    //
    //
    $entry['category_id'] = array('name' => 'category_id', 'title' => __('se_category_Id'), 'value' => array());
    foreach ($product_data['category_ids'] as $category_id) {
        $entry['category_id']['value'][] = $category_id;
    }
    //
    //
    //
    $entry['category_usergroup_ids'] = array('name' => 'category_usergroup_ids', 'title' => __('se_category_usergroup_ids'), 'value' => array());
    foreach ($product_data['category_usergroup_ids'] as $usergroup_id) {
        $entry['category_usergroup_ids']['value'][] = $usergroup_id;
    }
    //
    //
    //
    $entry['usergroup_ids'] = array('name' => 'usergroup_ids', 'title' => __('se_usergroup_ids'), 'value' => array());
    $product_data['usergroup_ids'] = empty($product_data['usergroup_ids']) ? array(0) : explode(',', $product_data['usergroup_ids']);
    foreach ($product_data['usergroup_ids'] as $usergroup_id) {
        $entry['usergroup_ids']['value'][] = $usergroup_id;
    }
    //
    //
    //
    foreach ($usergroups as $usergroup) {
        $usergroup_id = $usergroup['usergroup_id'];
        $price = !empty($product_data['se_prices'][$usergroup_id]['price']) ? $product_data['se_prices'][$usergroup_id]['price'] : $product_data['se_prices'][0]['price'];
        $name = 'price_' . intval($usergroup_id);
        $entry[$name] = array('name' => $name, 'title' => str_replace('[id]', $usergroup_id, __("se_price_for_usergroup_id")), 'type' => 'float', 'value' => $price);
    }
    //
    //
    //
    $additional_attrs = array('company_id' => 'text', 'weight' => 'float', 'popularity' => 'float', 'amount' => 'int', 'timestamp' => 'int', 'position' => 'int', 'free_shipping' => 'text', 'empty_categories' => 'text', 'status' => 'text');
    if (!empty($product_data['sales_amount'])) {
        $additional_attrs['sales_amount'] = 'int';
    }
    foreach ($additional_attrs as $name => $type) {
        if ($name == 'company_id') {
            $title = __('se_company_id');
        } elseif ($name == 'empty_categories') {
            $title = __('se_empty_categories');
        } else {
            $title = __($name);
        }
        $entry[$name] = array('name' => $name, 'title' => $title, 'type' => $type, 'value' => isset($product_data[$name]) ? $product_data[$name] : '');
    }
    return $entry;
}
コード例 #6
0
ファイル: Yml.php プロジェクト: askzap/ask-zap
 protected function getImageUrl($image_pair)
 {
     $url = '';
     if ($this->options['image_type'] == 'detailed') {
         $url = $image_pair['detailed']['image_path'];
     } else {
         $image_data = fn_image_to_display($image_pair, $this->options['thumbnail_width'], $this->options['thumbnail_height']);
         if (!empty($image_data) && strpos($image_data['image_path'], '.php')) {
             $image_data['image_path'] = fn_generate_thumbnail($image_data['detailed_image_path'], $image_data['width'], $image_data['height']);
         }
         if (!empty($image_data['image_path'])) {
             $url = $image_data['image_path'];
         }
     }
     $url = htmlspecialchars($url, ENT_QUOTES, 'UTF-8');
     $url = fn_yandex_market_c_encode($url);
     $url = fn_query_remove($url, 't');
     return str_replace('–', urlencode('–'), $url);
 }
コード例 #7
0
ファイル: exim.php プロジェクト: arpad9/bygmarket
function fn_exim_get_image_url($product_id, $object_type, $pair_type, $get_icon, $get_detailed, $lang_code)
{
    $image_pair = fn_get_image_pairs($product_id, $object_type, $pair_type, true, true, $lang_code);
    $image_data = fn_image_to_display($image_pair, Registry::get('settings.Thumbnails.product_details_thumbnail_width'), Registry::get('settings.Thumbnails.product_details_thumbnail_height'));
    if (!empty($image_data['image_path'])) {
        $url = new Url($image_data['image_path']);
        $url->setProtocol(fn_get_storefront_protocol());
        return $url->build($url->getIsEncoded());
    }
    return '';
}
コード例 #8
0
ファイル: exim.php プロジェクト: OneataBogdan/lead_coriolan
function fn_exim_get_image_url($product_id, $object_type, $pair_type, $get_icon, $get_detailed, $lang_code)
{
    $image_pair = fn_get_image_pairs($product_id, $object_type, $pair_type, true, true, $lang_code);
    $image_data = fn_image_to_display($image_pair, Registry::get('settings.Thumbnails.product_details_thumbnail_width'), Registry::get('settings.Thumbnails.product_details_thumbnail_height'));
    return !empty($image_data) ? $image_pair['detailed']['http_image_path'] : '';
}
コード例 #9
0
ファイル: pdf.php プロジェクト: askzap/ultimate
/**
 *
 * Adds product data in HTML format to price list table
 * @param array $product Product data
 * @param array $selected_fields Product fields that should be in price list
 * @param string $style Product row style (similar to the HTML style attribute, e.g.: style="background-color: #EEEEEE")
 * @param array $price_schema Price list columns scheme
 * @param array $options_variants Product options variants
 *
 * @return string Product data row in HTML format
 */
function fn_price_list_print_product_data($product, $selected_fields, $style, $price_schema, $options_variants = array())
{
    $tbl = '<tr>';
    foreach ($selected_fields as $field_name => $active) {
        $tbl .= '<td ' . $style . ' width="' . $price_schema['fields'][$field_name]['min_width'] . '%">';
        if ($field_name == 'image') {
            if ($image_data = fn_image_to_display($product['main_pair'], 0, IMAGE_HEIGHT)) {
                $tbl .= '<img src="' . $image_data['image_path'] . '" width= "' . $image_data['width'] . '" height="' . $image_data['height'] . '" align="bottom" />';
            }
        } elseif ($field_name == 'product' && !empty($options_variants)) {
            $options = array();
            foreach ($options_variants as $option_id => $variant_id) {
                $options[] = $product['product_options'][$option_id]['option_name'] . ': ' . $product['product_options'][$option_id]['variants'][$variant_id]['variant_name'];
            }
            $options = implode('<br />', $options);
            $tbl .= $product[$field_name] . '<br />' . $options;
        } elseif ($field_name == 'price') {
            $tbl .= fn_format_price($product[$field_name], CART_PRIMARY_CURRENCY, null, false);
        } else {
            $tbl .= $product[$field_name];
        }
        $tbl .= '</td>';
    }
    $tbl .= '</tr>';
    return $tbl;
}
コード例 #10
0
ファイル: Base.php プロジェクト: ambient-lounge/site
 protected function getImageUrl($image_pair)
 {
     $url = '';
     if (empty($image_pair)) {
         return '';
     }
     if ($this->options['image_type'] == 'detailed') {
         if (!empty($image_pair['detailed'])) {
             $url = $image_pair['detailed']['image_path'];
         }
     } else {
         $image_data = fn_image_to_display($image_pair, $this->options['thumbnail_width'], $this->options['thumbnail_height']);
         if (!empty($image_data) && strpos($image_data['image_path'], '.php')) {
             $image_data['image_path'] = fn_generate_thumbnail($image_data['detailed_image_path'], $image_data['width'], $image_data['height']);
         }
         if (!empty($image_data['image_path'])) {
             $url = $image_data['image_path'];
         }
     }
     $url = $this->escapeUrl($url);
     $url = fn_query_remove($url, 't');
     return str_replace('–', urlencode('–'), $url);
 }
    function content_55dc759e627a25_35621519($_smarty_tpl)
    {
        if (!is_callable('smarty_function_math')) {
            include '/var/www/html/market/app/lib/vendor/smarty/smarty/libs/plugins/function.math.php';
        }
        if (!is_callable('smarty_function_set_id')) {
            include '/var/www/html/market/app/functions/smarty_plugins/function.set_id.php';
        }
        fn_preload_lang_vars(array('no_image', 'no_image'));
        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();
            if ($_smarty_tpl->tpl_vars['capture_image']->value) {
                $_smarty_tpl->_capture_stack[0][] = array("image", null, null);
                ob_start();
            }
            if (!$_smarty_tpl->tpl_vars['obj_id']->value) {
                echo smarty_function_math(array('equation' => "rand()", 'assign' => "obj_id"), $_smarty_tpl);
            }
            $_smarty_tpl->tpl_vars['image_data'] = new Smarty_variable(fn_image_to_display($_smarty_tpl->tpl_vars['images']->value, $_smarty_tpl->tpl_vars['image_width']->value, $_smarty_tpl->tpl_vars['image_height']->value), null, 0);
            $_smarty_tpl->tpl_vars['generate_image'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_data']->value['generate_image'] && !$_smarty_tpl->tpl_vars['external']->value, null, 0);
            if ($_smarty_tpl->tpl_vars['show_detailed_link']->value) {
                ?>
<a id="det_img_link_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'] && $_smarty_tpl->tpl_vars['image_id']->value) {
                    ?>
data-ca-image-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 class="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['link_class']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path']) {
                    ?>
cm-previewer ty-previewer<?php 
                }
                ?>
" data-ca-image-width="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images']->value['detailed']['image_x'], ENT_QUOTES, 'UTF-8');
                ?>
" data-ca-image-height="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images']->value['detailed']['image_y'], ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path']) {
                    ?>
href="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'], ENT_QUOTES, 'UTF-8');
                    ?>
" title="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['images']->value['detailed']['alt'], ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
><?php 
            }
            if ($_smarty_tpl->tpl_vars['image_data']->value['image_path']) {
                ?>
<img class="ty-pict <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['valign']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['class']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['lazy_load']->value) {
                    ?>
lazyOwl<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    ?>
ty-spinner<?php 
                }
                ?>
"  <?php 
                if ($_smarty_tpl->tpl_vars['obj_id']->value && !$_smarty_tpl->tpl_vars['no_ids']->value) {
                    ?>
id="det_img_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    ?>
data-ca-image-path="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['lazy_load']->value) {
                    ?>
data-<?php 
                }
                ?>
src="<?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                    ?>
/icons/spacer.gif<?php 
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                }
                ?>
" alt="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
                ?>
" title="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_onclick']->value) {
                    ?>
onclick="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_onclick']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 /><?php 
            } else {
                ?>
<span class="ty-no-image" style="min-width: <?php 
                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_width']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_height']->value : $tmp, ENT_QUOTES, 'UTF-8');
                ?>
px; min-height: <?php 
                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_height']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_width']->value : $tmp, ENT_QUOTES, 'UTF-8');
                ?>
px;"><i class="ty-no-image__icon ty-icon-image" title="<?php 
                echo $_smarty_tpl->__("no_image");
                ?>
"></i></span><?php 
            }
            if ($_smarty_tpl->tpl_vars['show_detailed_link']->value) {
                if ($_smarty_tpl->tpl_vars['images']->value['detailed_id']) {
                    ?>
<span class="ty-previewer__icon hidden-phone"></span><?php 
                }
                ?>
</a><?php 
            }
            if ($_smarty_tpl->tpl_vars['capture_image']->value) {
                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();
                }
                $_smarty_tpl->_capture_stack[0][] = array("icon_image_path", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                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();
                }
                $_smarty_tpl->_capture_stack[0][] = array("detailed_image_path", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'], ENT_QUOTES, 'UTF-8');
                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();
                }
            }
            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="common/image.tpl" id="<?php 
                    echo smarty_function_set_id(array('name' => "common/image.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 {
            if ($_smarty_tpl->tpl_vars['capture_image']->value) {
                $_smarty_tpl->_capture_stack[0][] = array("image", null, null);
                ob_start();
            }
            if (!$_smarty_tpl->tpl_vars['obj_id']->value) {
                echo smarty_function_math(array('equation' => "rand()", 'assign' => "obj_id"), $_smarty_tpl);
            }
            $_smarty_tpl->tpl_vars['image_data'] = new Smarty_variable(fn_image_to_display($_smarty_tpl->tpl_vars['images']->value, $_smarty_tpl->tpl_vars['image_width']->value, $_smarty_tpl->tpl_vars['image_height']->value), null, 0);
            $_smarty_tpl->tpl_vars['generate_image'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_data']->value['generate_image'] && !$_smarty_tpl->tpl_vars['external']->value, null, 0);
            if ($_smarty_tpl->tpl_vars['show_detailed_link']->value) {
                ?>
<a id="det_img_link_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'] && $_smarty_tpl->tpl_vars['image_id']->value) {
                    ?>
data-ca-image-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 class="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['link_class']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path']) {
                    ?>
cm-previewer ty-previewer<?php 
                }
                ?>
" data-ca-image-width="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images']->value['detailed']['image_x'], ENT_QUOTES, 'UTF-8');
                ?>
" data-ca-image-height="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['images']->value['detailed']['image_y'], ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path']) {
                    ?>
href="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'], ENT_QUOTES, 'UTF-8');
                    ?>
" title="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['images']->value['detailed']['alt'], ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
><?php 
            }
            if ($_smarty_tpl->tpl_vars['image_data']->value['image_path']) {
                ?>
<img class="ty-pict <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['valign']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['class']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['lazy_load']->value) {
                    ?>
lazyOwl<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    ?>
ty-spinner<?php 
                }
                ?>
"  <?php 
                if ($_smarty_tpl->tpl_vars['obj_id']->value && !$_smarty_tpl->tpl_vars['no_ids']->value) {
                    ?>
id="det_img_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    ?>
data-ca-image-path="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['lazy_load']->value) {
                    ?>
data-<?php 
                }
                ?>
src="<?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                    ?>
/icons/spacer.gif<?php 
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                }
                ?>
" alt="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
                ?>
" title="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_onclick']->value) {
                    ?>
onclick="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_onclick']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 /><?php 
            } else {
                ?>
<span class="ty-no-image" style="min-width: <?php 
                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_width']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_height']->value : $tmp, ENT_QUOTES, 'UTF-8');
                ?>
px; min-height: <?php 
                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_height']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_width']->value : $tmp, ENT_QUOTES, 'UTF-8');
                ?>
px;"><i class="ty-no-image__icon ty-icon-image" title="<?php 
                echo $_smarty_tpl->__("no_image");
                ?>
"></i></span><?php 
            }
            if ($_smarty_tpl->tpl_vars['show_detailed_link']->value) {
                if ($_smarty_tpl->tpl_vars['images']->value['detailed_id']) {
                    ?>
<span class="ty-previewer__icon hidden-phone"></span><?php 
                }
                ?>
</a><?php 
            }
            if ($_smarty_tpl->tpl_vars['capture_image']->value) {
                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();
                }
                $_smarty_tpl->_capture_stack[0][] = array("icon_image_path", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                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();
                }
                $_smarty_tpl->_capture_stack[0][] = array("detailed_image_path", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'], ENT_QUOTES, 'UTF-8');
                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();
                }
            }
        }
    }
コード例 #12
0
ファイル: xls.php プロジェクト: askzap/ultimate
function fn_price_list_print_product_data($product, &$worksheet, $row, &$width, $selected_fields, $styles, $options_variants = array())
{
    $col = 'A';
    foreach ($selected_fields as $field => $active) {
        $worksheet->getStyle($col . $row)->applyFromArray($row % 2 == 0 ? $styles['field_simple_odd'] : $styles['field_simple']);
        if ($field == 'image') {
            $image_data = fn_image_to_display($product['main_pair'], Registry::get('settings.Thumbnails.product_lists_thumbnail_width'), Registry::get('settings.Thumbnails.product_lists_thumbnail_height'));
            if (!empty($image_data)) {
                $mime_type = fn_get_file_type($image_data['absolute_path']);
                $src = $image_data['absolute_path'];
                $image_width = $image_data['width'];
                $image_height = $image_data['height'];
                if ($mime_type == 'image/gif' && function_exists('imagecreatefromgif')) {
                    $img_res = imagecreatefromgif($src);
                } elseif ($mime_type == 'image/jpeg' && function_exists('imagecreatefromjpeg')) {
                    $img_res = imagecreatefromjpeg($src);
                } elseif ($mime_type == 'image/png' && function_exists('imagecreatefrompng')) {
                    $img_res = imagecreatefrompng($src);
                } else {
                    $img_res = false;
                }
                if ($img_res) {
                    if (!isset($width[$col]) || $width[$col] < $image_width) {
                        $width[$col] = $image_width * IMAGE_WIDTH_PERCENT;
                    }
                    $img_descr = $image_data['alt'];
                    $drawing = new PHPExcel_Worksheet_MemoryDrawing();
                    $drawing->setName($img_descr);
                    $drawing->setDescription($img_descr);
                    $drawing->setImageResource($img_res);
                    $drawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG);
                    $drawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT);
                    $drawing->setHeight($image_height);
                    $drawing->setWorksheet($worksheet);
                    $worksheet->getRowDimension($row)->setRowHeight($image_height * IMAGE_HEIGHT_PERCENT);
                    $drawing->setCoordinates($col . $row);
                }
            }
        } else {
            if ($field == 'price') {
                $product[$field] = fn_format_price($product[$field], CART_PRIMARY_CURRENCY, null, false);
            }
            if (!isset($width[$col]) || $width[$col] < strlen($product[$field])) {
                $width[$col] = strlen($product[$field]);
            }
            if (!empty($options_variants) && $field == 'product') {
                $options = array();
                foreach ($options_variants as $option_id => $variant_id) {
                    $option = $product['product_options'][$option_id]['option_name'] . ': ' . $product['product_options'][$option_id]['variants'][$variant_id]['variant_name'];
                    $options[] = $option;
                    if ($width[$col] < strlen($option)) {
                        $width[$col] = strlen($options);
                    }
                }
                $options = implode("\n", $options);
                $worksheet->setCellValue($col . $row, $product['product'] . "\n" . $options);
            } elseif ($field == 'price') {
                $worksheet->getCell($col . $row)->setValueExplicit($product[$field], PHPExcel_Cell_DataType::TYPE_STRING);
            } else {
                $worksheet->setCellValue($col . $row, $product[$field]);
            }
        }
        $col++;
    }
    return true;
}
    function content_55db8f57b2f906_28974862($_smarty_tpl)
    {
        fn_preload_lang_vars(array('no_image'));
        $_smarty_tpl->tpl_vars["image_data"] = new Smarty_variable(fn_image_to_display($_smarty_tpl->tpl_vars['image']->value, $_smarty_tpl->tpl_vars['image_width']->value, $_smarty_tpl->tpl_vars['image_height']->value), null, 0);
        if ($_smarty_tpl->tpl_vars['image']->value || $_smarty_tpl->tpl_vars['href']->value) {
            ?>
<a href="<?php 
            echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['href']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image']->value['image_path'] : $tmp, ENT_QUOTES, 'UTF-8');
            ?>
" <?php 
            if (!$_smarty_tpl->tpl_vars['href']->value) {
                ?>
target="_blank"<?php 
            }
            ?>
><?php 
        }
        if ($_smarty_tpl->tpl_vars['image_data']->value['image_path']) {
            ?>
<img <?php 
            if ($_smarty_tpl->tpl_vars['image_id']->value) {
                ?>
id="image_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"<?php 
            }
            ?>
 src="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
            ?>
" width="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['width'], ENT_QUOTES, 'UTF-8');
            ?>
" height="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['height'], ENT_QUOTES, 'UTF-8');
            ?>
" alt="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['image_data']->value['generate_image']) {
                ?>
class="spinner" data-ca-image-path="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                ?>
"<?php 
            }
            ?>
 title="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
            ?>
" /><?php 
        } else {
            ?>
<div class="no-image" style="width: <?php 
            echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_width']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_height']->value : $tmp, ENT_QUOTES, 'UTF-8');
            ?>
px; height: <?php 
            echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_height']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_width']->value : $tmp, ENT_QUOTES, 'UTF-8');
            ?>
px;"><i class="glyph-image" title="<?php 
            echo $_smarty_tpl->__("no_image");
            ?>
"></i></div><?php 
        }
        if ($_smarty_tpl->tpl_vars['image']->value || $_smarty_tpl->tpl_vars['href']->value) {
            ?>
</a><?php 
        }
    }
コード例 #14
0
ファイル: product_features.php プロジェクト: arpad9/bygmarket
    Tygh::$app['view']->display('common/ajax_select_object.tpl');
    exit;
} elseif ($mode == 'get_variants_list') {
    if (isset($_REQUEST['feature_id'])) {
        $feature_id = (int) $_REQUEST['feature_id'];
    } else {
        exit;
    }
    $page_number = isset($_REQUEST['page']) ? (int) $_REQUEST['page'] : 1;
    $page_size = isset($_REQUEST['page_size']) ? (int) $_REQUEST['page_size'] : 3;
    $search_query = isset($_REQUEST['q']) ? $_REQUEST['q'] : null;
    $lang_code = isset($_REQUEST['lang_code']) ? $_REQUEST['lang_code'] : CART_LANGUAGE;
    $search = array('page' => $page_number, 'feature_id' => $feature_id, 'search_query' => $search_query, 'get_images' => true);
    if (isset($_REQUEST['product_id'])) {
        $search['product_id'] = (int) $_REQUEST['product_id'];
    }
    list($variants, $search) = fn_get_product_feature_variants($search, $page_size, $lang_code);
    $objects = array_values(array_map(function ($feature_variant) {
        $image_url = null;
        if (isset($feature_variant['image_pair'])) {
            $image_data = fn_image_to_display($feature_variant['image_pair'], isset($_REQUEST['image_width']) ? (int) $_REQUEST['image_width'] : 50, isset($_REQUEST['image_height']) ? (int) $_REQUEST['image_height'] : 50);
            if (!empty($image_data['image_path'])) {
                $image_url = $image_data['image_path'];
            }
        }
        return array('id' => $feature_variant['variant_id'], 'text' => $feature_variant['variant'], 'image_url' => $image_url);
    }, $variants));
    Tygh::$app['ajax']->assign('objects', $objects);
    Tygh::$app['ajax']->assign('total_objects', $search['total_items']);
    exit;
}
    function content_55ccec9d421271_63364542($_smarty_tpl)
    {
        if (!is_callable('smarty_function_math')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.math.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('no_image', 'no_image', 'no_image', 'no_image'));
        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();
            if ($_smarty_tpl->tpl_vars['capture_image']->value) {
                $_smarty_tpl->_capture_stack[0][] = array("image", null, null);
                ob_start();
            }
            if (!$_smarty_tpl->tpl_vars['obj_id']->value) {
                echo smarty_function_math(array('equation' => "rand()", 'assign' => "obj_id"), $_smarty_tpl);
            }
            $_smarty_tpl->tpl_vars['image_data'] = new Smarty_variable(fn_image_to_display($_smarty_tpl->tpl_vars['images']->value, $_smarty_tpl->tpl_vars['image_width']->value, $_smarty_tpl->tpl_vars['image_height']->value), null, 0);
            if ($_smarty_tpl->tpl_vars['image_max_width']->value && $_smarty_tpl->tpl_vars['image_max_width']->value < $_smarty_tpl->tpl_vars['image_data']->value['width']) {
                $_smarty_tpl->tpl_vars['image_data'] = new Smarty_variable(fn_image_to_display($_smarty_tpl->tpl_vars['images']->value, $_smarty_tpl->tpl_vars['image_max_width']->value, $_smarty_tpl->tpl_vars['image_height']->value), null, 0);
            }
            $_smarty_tpl->tpl_vars['generate_image'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_data']->value['generate_image'] && !$_smarty_tpl->tpl_vars['external']->value, null, 0);
            if ($_smarty_tpl->tpl_vars['show_detailed_link']->value) {
                ?>
<a id="det_img_link_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"<?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'] && $_smarty_tpl->tpl_vars['image_id']->value && !$_smarty_tpl->tpl_vars['test_hide_modal_image']->value) {
                    ?>
data-ca-image-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 class="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['link_class']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path']) {
                    ?>
cm-previewer ty-previewer<?php 
                }
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'] && !$_smarty_tpl->tpl_vars['test_hide_modal_image']->value) {
                    ?>
href="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'], ENT_QUOTES, 'UTF-8');
                    ?>
" title="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['images']->value['detailed']['alt'], ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['test_hide_modal_image']->value) {
                    ?>
style="cursor:auto"<?php 
                }
                ?>
><?php 
            }
            if ($_smarty_tpl->tpl_vars['image_data']->value['image_path']) {
                ?>
<img class="ty-pict <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['valign']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['class']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    ?>
ty-spinner<?php 
                }
                ?>
"  <?php 
                if ($_smarty_tpl->tpl_vars['obj_id']->value && !$_smarty_tpl->tpl_vars['no_ids']->value) {
                    ?>
id="det_img_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    ?>
data-ca-image-path="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 src="<?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                    ?>
/icons/spacer.gif<?php 
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                }
                ?>
" alt="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
                ?>
" title="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_onclick']->value) {
                    ?>
onclick="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_onclick']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['main_image']->value && $_smarty_tpl->tpl_vars['test_hide_modal_image']->value) {
                    ?>
onload="onload_image_actions(this);"<?php 
                }
                ?>
 /><?php 
            } else {
                if (!$_smarty_tpl->tpl_vars['image_width']->value) {
                    $_smarty_tpl->tpl_vars['image_width'] = new Smarty_variable(260, null, 0);
                } else {
                    $_smarty_tpl->tpl_vars['image_width'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_width']->value - 10, null, 0);
                }
                if (!$_smarty_tpl->tpl_vars['image_height']->value) {
                    if ($_smarty_tpl->tpl_vars['image_width']->value) {
                        if ($_smarty_tpl->tpl_vars['thumbnails_galery']->value) {
                            $_smarty_tpl->tpl_vars['image_height'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_data']->value['height'], null, 0);
                        } else {
                            $_smarty_tpl->tpl_vars['image_height'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_width']->value, null, 0);
                        }
                    } else {
                        $_smarty_tpl->tpl_vars['image_height'] = new Smarty_variable(340, null, 0);
                    }
                }
                ?>
<img style="display:none;" src="/design/themes/responsive/media/images/images/no-img.png" <?php 
                if ($_smarty_tpl->tpl_vars['main_image']->value && 'test_hide_modal_image') {
                    ?>
onload="onload_image_actions(this);"<?php 
                }
                ?>
 /><?php 
                if ($_smarty_tpl->tpl_vars['ls_recent_footer']->value) {
                    ?>
<span class="ty-no-image" style="min-width: 170px; min-height: 213px;"><i class="ty-no-image__icon ty-icon-image" title="<?php 
                    echo $_smarty_tpl->__("no_image");
                    ?>
"></i></span><?php 
                } else {
                    ?>
<span class="ty-no-image" style="min-width: <?php 
                    if ($_smarty_tpl->tpl_vars['ls_is_category_page']->value) {
                        ?>
100%<?php 
                    } else {
                        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_width']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_width']->value : $tmp, ENT_QUOTES, 'UTF-8');
                        ?>
px<?php 
                    }
                    ?>
; min-height: <?php 
                    if ($_smarty_tpl->tpl_vars['ls_is_category_page']->value) {
                        ?>
90%<?php 
                    } else {
                        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_height']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_width']->value : $tmp, ENT_QUOTES, 'UTF-8');
                        ?>
px;<?php 
                    }
                    ?>
"><i class="ty-no-image__icon ty-icon-image" title="<?php 
                    echo $_smarty_tpl->__("no_image");
                    ?>
"></i></span><?php 
                }
            }
            if ($_smarty_tpl->tpl_vars['show_detailed_link']->value) {
                if ($_smarty_tpl->tpl_vars['images']->value['detailed_id']) {
                    ?>
<span class="ty-previewer__icon hidden-phone"></span><?php 
                }
                ?>
</a><?php 
            }
            if ($_smarty_tpl->tpl_vars['capture_image']->value) {
                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();
                }
                $_smarty_tpl->_capture_stack[0][] = array("icon_image_path", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                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();
                }
                $_smarty_tpl->_capture_stack[0][] = array("detailed_image_path", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'], ENT_QUOTES, 'UTF-8');
                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();
                }
            }
            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="common/image.tpl" id="<?php 
                    echo smarty_function_set_id(array('name' => "common/image.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 {
            if ($_smarty_tpl->tpl_vars['capture_image']->value) {
                $_smarty_tpl->_capture_stack[0][] = array("image", null, null);
                ob_start();
            }
            if (!$_smarty_tpl->tpl_vars['obj_id']->value) {
                echo smarty_function_math(array('equation' => "rand()", 'assign' => "obj_id"), $_smarty_tpl);
            }
            $_smarty_tpl->tpl_vars['image_data'] = new Smarty_variable(fn_image_to_display($_smarty_tpl->tpl_vars['images']->value, $_smarty_tpl->tpl_vars['image_width']->value, $_smarty_tpl->tpl_vars['image_height']->value), null, 0);
            if ($_smarty_tpl->tpl_vars['image_max_width']->value && $_smarty_tpl->tpl_vars['image_max_width']->value < $_smarty_tpl->tpl_vars['image_data']->value['width']) {
                $_smarty_tpl->tpl_vars['image_data'] = new Smarty_variable(fn_image_to_display($_smarty_tpl->tpl_vars['images']->value, $_smarty_tpl->tpl_vars['image_max_width']->value, $_smarty_tpl->tpl_vars['image_height']->value), null, 0);
            }
            $_smarty_tpl->tpl_vars['generate_image'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_data']->value['generate_image'] && !$_smarty_tpl->tpl_vars['external']->value, null, 0);
            if ($_smarty_tpl->tpl_vars['show_detailed_link']->value) {
                ?>
<a id="det_img_link_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
"<?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'] && $_smarty_tpl->tpl_vars['image_id']->value && !$_smarty_tpl->tpl_vars['test_hide_modal_image']->value) {
                    ?>
data-ca-image-id="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 class="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['link_class']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path']) {
                    ?>
cm-previewer ty-previewer<?php 
                }
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'] && !$_smarty_tpl->tpl_vars['test_hide_modal_image']->value) {
                    ?>
href="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'], ENT_QUOTES, 'UTF-8');
                    ?>
" title="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['images']->value['detailed']['alt'], ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['test_hide_modal_image']->value) {
                    ?>
style="cursor:auto"<?php 
                }
                ?>
><?php 
            }
            if ($_smarty_tpl->tpl_vars['image_data']->value['image_path']) {
                ?>
<img class="ty-pict <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['valign']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['class']->value, ENT_QUOTES, 'UTF-8');
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    ?>
ty-spinner<?php 
                }
                ?>
"  <?php 
                if ($_smarty_tpl->tpl_vars['obj_id']->value && !$_smarty_tpl->tpl_vars['no_ids']->value) {
                    ?>
id="det_img_<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['obj_id']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    ?>
data-ca-image-path="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 src="<?php 
                if ($_smarty_tpl->tpl_vars['generate_image']->value) {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['images_dir']->value, ENT_QUOTES, 'UTF-8');
                    ?>
/icons/spacer.gif<?php 
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                }
                ?>
" alt="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
                ?>
" title="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['alt'], ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['image_onclick']->value) {
                    ?>
onclick="<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['image_onclick']->value, ENT_QUOTES, 'UTF-8');
                    ?>
"<?php 
                }
                ?>
 <?php 
                if ($_smarty_tpl->tpl_vars['main_image']->value && $_smarty_tpl->tpl_vars['test_hide_modal_image']->value) {
                    ?>
onload="onload_image_actions(this);"<?php 
                }
                ?>
 /><?php 
            } else {
                if (!$_smarty_tpl->tpl_vars['image_width']->value) {
                    $_smarty_tpl->tpl_vars['image_width'] = new Smarty_variable(260, null, 0);
                } else {
                    $_smarty_tpl->tpl_vars['image_width'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_width']->value - 10, null, 0);
                }
                if (!$_smarty_tpl->tpl_vars['image_height']->value) {
                    if ($_smarty_tpl->tpl_vars['image_width']->value) {
                        if ($_smarty_tpl->tpl_vars['thumbnails_galery']->value) {
                            $_smarty_tpl->tpl_vars['image_height'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_data']->value['height'], null, 0);
                        } else {
                            $_smarty_tpl->tpl_vars['image_height'] = new Smarty_variable($_smarty_tpl->tpl_vars['image_width']->value, null, 0);
                        }
                    } else {
                        $_smarty_tpl->tpl_vars['image_height'] = new Smarty_variable(340, null, 0);
                    }
                }
                ?>
<img style="display:none;" src="/design/themes/responsive/media/images/images/no-img.png" <?php 
                if ($_smarty_tpl->tpl_vars['main_image']->value && 'test_hide_modal_image') {
                    ?>
onload="onload_image_actions(this);"<?php 
                }
                ?>
 /><?php 
                if ($_smarty_tpl->tpl_vars['ls_recent_footer']->value) {
                    ?>
<span class="ty-no-image" style="min-width: 170px; min-height: 213px;"><i class="ty-no-image__icon ty-icon-image" title="<?php 
                    echo $_smarty_tpl->__("no_image");
                    ?>
"></i></span><?php 
                } else {
                    ?>
<span class="ty-no-image" style="min-width: <?php 
                    if ($_smarty_tpl->tpl_vars['ls_is_category_page']->value) {
                        ?>
100%<?php 
                    } else {
                        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_width']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_width']->value : $tmp, ENT_QUOTES, 'UTF-8');
                        ?>
px<?php 
                    }
                    ?>
; min-height: <?php 
                    if ($_smarty_tpl->tpl_vars['ls_is_category_page']->value) {
                        ?>
90%<?php 
                    } else {
                        echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['image_height']->value) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['image_width']->value : $tmp, ENT_QUOTES, 'UTF-8');
                        ?>
px;<?php 
                    }
                    ?>
"><i class="ty-no-image__icon ty-icon-image" title="<?php 
                    echo $_smarty_tpl->__("no_image");
                    ?>
"></i></span><?php 
                }
            }
            if ($_smarty_tpl->tpl_vars['show_detailed_link']->value) {
                if ($_smarty_tpl->tpl_vars['images']->value['detailed_id']) {
                    ?>
<span class="ty-previewer__icon hidden-phone"></span><?php 
                }
                ?>
</a><?php 
            }
            if ($_smarty_tpl->tpl_vars['capture_image']->value) {
                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();
                }
                $_smarty_tpl->_capture_stack[0][] = array("icon_image_path", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['image_path'], ENT_QUOTES, 'UTF-8');
                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();
                }
                $_smarty_tpl->_capture_stack[0][] = array("detailed_image_path", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['image_data']->value['detailed_image_path'], ENT_QUOTES, 'UTF-8');
                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();
                }
            }
        }
    }