本文整理汇总了PHP中fn_link_attach函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_link_attach函数的具体用法?PHP fn_link_attach怎么用?PHP fn_link_attach使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_link_attach函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: authPage
public function authPage($page)
{
$access_id = self::getAccessID('A');
$data = array('page' => $page, 'ttl' => self::TWIGMO_SERVER_TTL, 'customer_access_id' => self::getAccessID('C'), 'access_id' => $access_id);
$meta = array('access_id' => $access_id);
$response = $this->send('auth.token', $data, $meta);
if (!$this->responseIsOk($response)) {
die(str_replace(array('[linkOpen]', '[linkClose]'), array('<a href="' . fn_url('addons.update&addon=twigmo') . '">', '</a>'), $this->_getLangVar('twgadmin_no_token_recieved')));
}
$url = fn_link_attach($response['data']['url'], 'sl=' . strtolower(CART_LANGUAGE));
fn_redirect($url, true);
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:12,代码来源:TwigmoConnector.php
示例2: smarty_function_script
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
function smarty_function_script($params, &$smarty)
{
static $scripts = array();
if (!isset($scripts[$params['src']])) {
if (strpos($params['src'], '//') === false) {
$src = Registry::get('config.current_location') . '/' . fn_link_attach($params['src'], 'ver=' . PRODUCT_VERSION);
} else {
$src = $params['src'];
}
$scripts[$params['src']] = '<script type="text/javascript"' . (!empty($params['class']) ? ' class="' . $params['class'] . '" ' : '') . ' src="' . $src . '" ' . (isset($params['charset']) ? 'charset="' . $params['charset'] . '"' : '') . (isset($params['escape']) ? '><\\/script>' : '></script>');
if (defined('AJAX_REQUEST') || Registry::get('runtime.inside_scripts')) {
return $scripts[$params['src']];
} else {
if (isset($params['no-defer']) && $params['no-defer']) {
return $scripts[$params['src']];
} else {
$cache_name = $smarty->getTemplateVars('block_cache_name');
if (!empty($cache_name)) {
$cached_content = Registry::get($cache_name);
if (!isset($cached_content['javascript'])) {
$cached_content['javascript'] = '';
}
$cached_content['javascript'] .= $scripts[$params['src']];
Registry::set($cache_name, $cached_content, true);
}
$repeat = false;
$smarty->loadPlugin('smarty_block_inline_script');
smarty_block_inline_script(array(), $scripts[$params['src']], $smarty, $repeat);
return '<!-- Inline script moved to the bottom of the page -->';
}
}
}
}
开发者ID:askzap,项目名称:ultimate,代码行数:38,代码来源:function.script.php
示例3: content_55dc7cc64036d7_14162086
function content_55dc7cc64036d7_14162086($_smarty_tpl)
{
fn_preload_lang_vars(array('switch_layout'));
?>
<div id="content_blocks">
<?php
if (count($_smarty_tpl->tpl_vars['layouts']->value) > 1) {
?>
<div class="form-horizontal form-edit">
<div class="control-group">
<label class="control-label"><?php
echo $_smarty_tpl->__("switch_layout");
?>
</label>
<div class="controls">
<?php
echo $_smarty_tpl->getSubTemplate("common/select_object.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('style' => "graphic", 'link_tpl' => fn_link_attach($_smarty_tpl->tpl_vars['config']->value['current_url'], "s_layout="), 'items' => $_smarty_tpl->tpl_vars['layouts']->value, 'selected_id' => $_smarty_tpl->tpl_vars['runtime']->value['layout']['layout_id'], 'key_name' => "name", 'display_icons' => false, 'target_id' => "content_blocks"), 0);
?>
</div>
</div>
</div>
<?php
}
?>
<?php
echo $_smarty_tpl->getSubTemplate("views/block_manager/manage.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
?>
</div><?php
}
开发者ID:AlanIsrael0,项目名称:market,代码行数:31,代码来源:baed4232531541007dcc288b4096a4141cb164e7.tygh.manage_in_tab.tpl.php
示例4: fn_rewrite_links
function fn_rewrite_links($body_html, $newsletter_id, $campaign_id)
{
$regex = "/href=('|\")((?:http|ftp|https):\\/\\/[\\w-\\.]+[?]?[-\\w:\\+?\\/?\\.\\=%&;~\\[\\]]+)/i";
$url = fn_url('newsletters.track', 'C', 'http');
$body_html = preg_replace_callback($regex, function ($matches) use($url, $newsletter_id, $campaign_id) {
return 'href=' . $matches[1] . fn_link_attach($url, 'link=' . (fn_register_link($matches[2], $newsletter_id, $campaign_id) . "-" . $newsletter_id . "-" . $campaign_id));
}, $body_html);
return $body_html;
}
开发者ID:askzap,项目名称:ultimate,代码行数:9,代码来源:func.php
示例5: smarty_function_script
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
function smarty_function_script($params, &$smarty)
{
static $scripts = array();
if (!isset($scripts[$params['src']])) {
$src = (strpos($params['src'], '//') === false ? Registry::get('config.current_location') . '/' : '') . fn_link_attach($params['src'], 'ver=' . PRODUCT_VERSION);
$scripts[$params['src']] = '<script type="text/javascript"' . (!empty($params['class']) ? ' class="' . $params['class'] . '" ' : '') . ' src="' . $src . '" ' . (isset($params['charset']) ? 'charset="' . $params['charset'] . '"' : '') . '></script>';
return $scripts[$params['src']];
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:14,代码来源:function.script.php
示例6: content_55e61f9bdb93e2_96432545
function content_55e61f9bdb93e2_96432545($_smarty_tpl)
{
if (!is_callable('smarty_function_math')) {
include '/var/www/html/market/app/lib/vendor/smarty/smarty/libs/plugins/function.math.php';
}
fn_preload_lang_vars(array('close'));
echo smarty_function_math(array('equation' => "rand()", 'assign' => "rnd"), $_smarty_tpl);
?>
<div class="clear" id="ds_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['rnd']->value, ENT_QUOTES, 'UTF-8');
?>
">
<div class="section-border">
<?php
echo $_smarty_tpl->tpl_vars['section_content']->value;
?>
<?php
if ($_smarty_tpl->tpl_vars['section_state']->value) {
?>
<p align="right">
<a href="<?php
echo htmlspecialchars(fn_url(fn_link_attach($_smarty_tpl->tpl_vars['config']->value['current_url'], "close_section=" . (string) $_smarty_tpl->tpl_vars['key']->value)), ENT_QUOTES, 'UTF-8');
?>
" class="underlined"><?php
echo $_smarty_tpl->__("close");
?>
</a>
</p>
<?php
}
?>
</div>
</div><?php
}
开发者ID:AlanIsrael0,项目名称:market,代码行数:36,代码来源:bf5c2be198dadc1d78ee4d115a91dd773b0521e5.tygh.section.tpl.php
示例7: content_55ccecdca7e3d0_14419675
function content_55ccecdca7e3d0_14419675($_smarty_tpl)
{
if (!is_callable('smarty_function_math')) {
include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.math.php';
}
fn_preload_lang_vars(array('close'));
echo smarty_function_math(array('equation' => "rand()", 'assign' => "rnd"), $_smarty_tpl);
?>
<div class="clear" id="ds_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['rnd']->value, ENT_QUOTES, 'UTF-8');
?>
">
<div class="section-border">
<?php
echo $_smarty_tpl->tpl_vars['section_content']->value;
?>
<?php
if ($_smarty_tpl->tpl_vars['section_state']->value) {
?>
<p align="right">
<a href="<?php
echo htmlspecialchars(fn_url(fn_link_attach($_smarty_tpl->tpl_vars['config']->value['current_url'], "close_section=" . (string) $_smarty_tpl->tpl_vars['key']->value)), ENT_QUOTES, 'UTF-8');
?>
" class="underlined"><?php
echo $_smarty_tpl->__("close");
?>
</a>
</p>
<?php
}
?>
</div>
</div><?php
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:36,代码来源:2d5d4b601786d74545db478ae68d9da06c12ddcd.tygh.section.tpl.php
示例8: foreach
if (empty($items_schema['func'])) {
$c_elm = '';
} else {
$c_elm = $items_schema['func'];
foreach ($c_elm as $k => $v) {
if (strpos($v, '@') !== false) {
$ind = str_replace('@', '', $v);
if (!empty($auth[$ind]) || !empty($_REQUEST[$ind])) {
$c_elm[$k] = $ind == 'user_id' && empty($_REQUEST[$ind]) ? $auth[$ind] : $_REQUEST[$ind];
}
}
}
}
$url = Registry::get('config.current_url');
if (fn_allowed_for('ULTIMATE') && !Registry::get('runtime.simple_ultimate')) {
$url = fn_link_attach($url, 'switch_company_id=' . Registry::ifGet('runtime.company_id', 'all'));
$url = str_replace('&', '&', $url);
// FIXME: workaround for fn_link_attach return result
}
$last_item = array('func' => $c_elm, 'url' => $url, 'icon' => empty($items_schema['icon']) ? '' : $items_schema['icon'], 'text' => empty($items_schema['text']) ? '' : $items_schema['text']);
$current_hash = fn_crc32(!empty($c_elm) ? implode('', $c_elm) : $items_schema['text']);
// remove element if it already exists and add it to the end of history
unset($last_edited_items[$current_hash]);
$last_edited_items[$current_hash] = $last_item;
if (count($last_edited_items) > $last_items_cnt) {
foreach ($last_edited_items as $k => $v) {
unset($last_edited_items[$k]);
if (count($last_edited_items) == $last_items_cnt) {
break;
}
}
开发者ID:askzap,项目名称:ask-zap,代码行数:31,代码来源:init.php
示例9: _setViewTools
/**
* Sets view tools
*
* @param int $current_pos Current position
* @param int $next_id Next element id
* @param int $prev_id Previous element id
* @param int $total_items Total items
* @return boolean Always true
*/
protected function _setViewTools($current_pos, $next_id, $prev_id, $total_items)
{
$view_tools = array('prev_id' => $prev_id, 'next_id' => $next_id, 'total' => $total_items, 'current' => $current_pos, 'prev_url' => fn_link_attach(Registry::get('config.current_url'), $this->_schema['item_id'] . '=' . $prev_id), 'next_url' => fn_link_attach(Registry::get('config.current_url'), $this->_schema['item_id'] . '=' . $next_id));
if (!empty($this->_schema['show_item_id'])) {
$view_tools['show_item_id'] = $this->_schema['show_item_id'];
}
if (!empty($this->_schema['links_label'])) {
$view_tools['links_label'] = __($this->_schema['links_label']);
}
\Tygh::$app['view']->assign('view_tools', $view_tools);
return true;
}
开发者ID:askzap,项目名称:ultimate,代码行数:21,代码来源:ACommon.php
示例10: fn_dispatch
//.........这里部分代码省略.........
if (!empty($auth['this_login']) && Registry::ifGet($auth['this_login'], 'N') === 'Y') {
fn_set_notification('E', __('error'), __(ACCOUNT_TYPE . LOGIN_STATUS_USER_DISABLED));
$status = CONTROLLER_STATUS_DENIED;
}
// [Block manager]
// block manager is disabled for vendors.
if (!(fn_allowed_for('MULTIVENDOR') && Registry::get('runtime.company_id') || fn_allowed_for('ULTIMATE') && !Registry::get('runtime.company_id'))) {
if (fn_check_permissions('block_manager', 'manage', 'admin')) {
$dynamic_object = SchemesManager::getDynamicObject($_REQUEST['dispatch'], $area, $_REQUEST);
if (!empty($dynamic_object)) {
if ($area == 'A' && Registry::get('runtime.mode') != 'add' && !empty($_REQUEST[$dynamic_object['key']])) {
$object_id = $_REQUEST[$dynamic_object['key']];
$location = Location::instance()->get($dynamic_object['customer_dispatch'], $dynamic_object, CART_LANGUAGE);
if (!empty($location) && $location['is_default'] != 1) {
$params = array('dynamic_object' => array('object_type' => $dynamic_object['object_type'], 'object_id' => $object_id), $dynamic_object['key'] => $object_id, 'manage_url' => Registry::get('config.current_url'));
Registry::set('navigation.tabs.blocks', array('title' => __('layouts'), 'href' => 'block_manager.manage_in_tab?' . http_build_query($params), 'ajax' => true));
}
}
}
}
}
// [/Block manager]
// Redirect if controller returned successful/redirect status only
if (in_array($status, array(CONTROLLER_STATUS_OK, CONTROLLER_STATUS_REDIRECT)) && !empty($_REQUEST['redirect_url']) && !$external) {
$redirect_url = $_REQUEST['redirect_url'];
}
// If controller returns "Redirect" status, check if redirect url exists
if ($status == CONTROLLER_STATUS_REDIRECT && empty($redirect_url)) {
$status = CONTROLLER_STATUS_NO_PAGE;
}
// In backend show "changes saved" notification
if ($area == 'A' && $_SERVER['REQUEST_METHOD'] == 'POST' && in_array($status, array(CONTROLLER_STATUS_OK, CONTROLLER_STATUS_REDIRECT))) {
if (strpos($mode, 'update') !== false && $mode != 'update_status' && $mode != 'update_mode' && !fn_notification_exists('extra', 'demo_mode') && !fn_notification_exists('type', 'E')) {
fn_set_notification('N', __('notice'), __('text_changes_saved'), 'I', 'changes_saved');
}
}
// Attach params and redirect if needed
if (in_array($status, array(CONTROLLER_STATUS_OK, CONTROLLER_STATUS_REDIRECT)) && !empty($redirect_url)) {
if (!isset($_REQUEST['return_to_list'])) {
$params = array('page', 'selected_section', 'active_tab');
$url_params = array();
foreach ($params as $param) {
if (!empty($_REQUEST[$param])) {
$url_params[$param] = $_REQUEST[$param];
}
}
if (!empty($url_params)) {
$redirect_url = fn_link_attach($redirect_url, http_build_query($url_params));
}
}
if (!isset($external)) {
$external = false;
}
if (!isset($permanent)) {
$permanent = false;
}
fn_redirect($redirect_url, $external, $permanent);
}
if (!$view->getTemplateVars('content_tpl') && $status == CONTROLLER_STATUS_OK) {
// FIXME
$status = CONTROLLER_STATUS_NO_PAGE;
}
if ($status != CONTROLLER_STATUS_OK) {
if ($status == CONTROLLER_STATUS_NO_PAGE) {
if ($area == 'A' && empty($auth['user_id'])) {
// If admin is not logged in redirect to login page from not found page
fn_set_notification('W', __('page_not_found'), __('page_not_found_text'));
fn_redirect("auth.login_form");
}
header(' ', true, 404);
}
$view->assign('exception_status', $status);
if ($area == 'A') {
$view->assign('content_tpl', 'exception.tpl');
// for backend only
}
if ($status == CONTROLLER_STATUS_DENIED) {
$view->assign('page_title', __('access_denied'));
} elseif ($status == CONTROLLER_STATUS_NO_PAGE) {
$view->assign('page_title', __('page_not_found'));
}
}
fn_set_hook('dispatch_before_display');
Debugger::checkpoint('Before TPL');
// Pass current URL to ajax response only if we render whole page
if (defined('AJAX_REQUEST') && Registry::get('runtime.root_template') == 'index.tpl') {
Registry::get('ajax')->assign('current_url', fn_url(Registry::get('config.current_url'), $area, 'current'));
}
Registry::get('view')->display(Registry::get('runtime.root_template'));
Debugger::checkpoint('After TPL');
Debugger::display();
fn_set_hook('complete');
if (defined('AJAX_REQUEST')) {
// HHVM workaround. Destroy Ajax object manually if it has been created.
$ajax = Registry::get('ajax');
$ajax = null;
}
exit;
// stop execution
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:101,代码来源:fn.control.php
示例11: content_55db8bdb55d9a2_72459790
//.........这里部分代码省略.........
}
?>
</ul>
</div>
<?php
}
?>
<div class="quick-menu-actions right">
<a class="edit cm-ajax" href="<?php
echo htmlspecialchars(fn_url("tools.show_quick_menu.edit"), ENT_QUOTES, 'UTF-8');
?>
" data-ca-target-id="quick_menu"
data-ca-event="ce.quick_menu_content_switch_callback" title="<?php
echo $_smarty_tpl->__("edit");
?>
"><i class="icon-edit hand"></i></a>
</div>
<?php
}
?>
</div>
</div>
<?php
if ($_smarty_tpl->tpl_vars['show_quick_popup']->value) {
?>
<div id="quick_box" class="hidden quick-menu-popup">
<div id="quick_menu_language_selector">
<?php
if (!fn_allowed_for("ULTIMATE:FREE")) {
?>
<?php
echo $_smarty_tpl->getSubTemplate("common/select_object.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('style' => "graphic", 'link_tpl' => fn_link_attach("tools.get_quick_menu_variant", "descr_sl="), 'items' => $_smarty_tpl->tpl_vars['languages']->value, 'selected_id' => @constant('DESCR_SL'), 'key_name' => "name", 'suffix' => "quick_menu", 'display_icons' => true, 'select_container_id' => "quick_menu_language_selector"), 0);
?>
<?php
}
?>
</div>
<form class="cm-ajax form-horizontal form-edit" name="quick_menu_form" action="<?php
echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
?>
" method="post">
<input id="qm_item_id" type="hidden" name="item[id]" value=""/>
<input id="qm_item_parent" type="hidden" name="item[parent_id]" value="0"/>
<input id="qm_descr_sl" type="hidden" name="descr_sl" value=""/>
<input type="hidden" name="result_ids" value="quick_menu"/>
<div class="control-group">
<label class="cm-required control-label" for="qm_item_name"><?php
echo $_smarty_tpl->__("name");
?>
:</label>
<div class="controls">
<input id="qm_item_name" name="item[name]" type="text" value="" size="40"/>
</div>
</div>
<div class="control-group">
<label class="cm-required control-label" for="qm_item_link"><?php
echo $_smarty_tpl->__("link");
?>
:</label>
开发者ID:AlanIsrael0,项目名称:market,代码行数:67,代码来源:7bccbc0c527f5a86e999112ef97d5ac4f369a70a.tygh.quick_menu.tpl.php
示例12: content_55d5c4e6cd53a0_66941118
function content_55d5c4e6cd53a0_66941118($_smarty_tpl)
{
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('select_profile', 'select_profile', 'or', 'create_profile', 'create_profile', 'profile_name', 'new', 'main', 'main', 'select_profile', 'select_profile', 'or', 'create_profile', 'create_profile', 'profile_name', 'new', 'main', 'main'));
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['settings']->value['General']['user_multiple_profiles'] == "Y" && $_smarty_tpl->tpl_vars['auth']->value['user_id']) {
?>
<?php
if ($_smarty_tpl->tpl_vars['show_title']->value) {
?>
<?php
echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("select_profile")), 0);
?>
<?php
}
?>
<?php
if (!$_smarty_tpl->tpl_vars['hide_profile_select']->value) {
?>
<div class="ty-control-group select-profile">
<!--label><?php
echo $_smarty_tpl->__("select_profile");
?>
:</label-->
<?php
$_smarty_tpl->tpl_vars["up"] = new Smarty_Variable();
$_smarty_tpl->tpl_vars["up"]->_loop = false;
$_from = $_smarty_tpl->tpl_vars['user_profiles']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$_smarty_tpl->tpl_vars["up"]->total = $_smarty_tpl->_count($_from);
$_smarty_tpl->tpl_vars["up"]->iteration = 0;
foreach ($_from as $_smarty_tpl->tpl_vars["up"]->key => $_smarty_tpl->tpl_vars["up"]->value) {
$_smarty_tpl->tpl_vars["up"]->_loop = true;
$_smarty_tpl->tpl_vars["up"]->iteration++;
$_smarty_tpl->tpl_vars["up"]->last = $_smarty_tpl->tpl_vars["up"]->iteration === $_smarty_tpl->tpl_vars["up"]->total;
$_smarty_tpl->tpl_vars['smarty']->value['foreach']["pfe"]['last'] = $_smarty_tpl->tpl_vars["up"]->last;
?>
<?php
if ($_smarty_tpl->tpl_vars['up']->value['profile_id'] == $_smarty_tpl->tpl_vars['profile_id']->value) {
?>
<strong><?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['up']->value['profile_name'], ENT_QUOTES, 'UTF-8');
?>
</strong>
<?php
} else {
?>
<a <?php
if ($_smarty_tpl->tpl_vars['use_ajax']->value) {
?>
class="cm-ajax"<?php
}
?>
href="<?php
echo htmlspecialchars(fn_url(fn_link_attach(fn_query_remove($_smarty_tpl->tpl_vars['config']->value['current_url'], "profile", "selected_section"), "profile_id=" . (string) $_smarty_tpl->tpl_vars['up']->value['profile_id'])), ENT_QUOTES, 'UTF-8');
?>
" data-ca-target-id="checkout_steps,cart_items,checkout_totals"><?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['up']->value['profile_name'], ENT_QUOTES, 'UTF-8');
?>
</a>
<?php
}
?>
<?php
if ($_smarty_tpl->tpl_vars['up']->value['profile_type'] != "P" && !$_smarty_tpl->tpl_vars['hide_profile_delete']->value) {
?>
<?php
echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_meta' => "cm-confirm", 'but_target_id' => "checkout_steps,cart_items,checkout_totals", 'but_role' => "delete", 'but_text' => " ", 'but_href' => "profiles.delete_profile?profile_id=" . (string) $_smarty_tpl->tpl_vars['up']->value['profile_id']), 0);
?>
<?php
}
?>
<?php
if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['pfe']['last']) {
?>
<span> | </span><?php
}
?>
<?php
}
?>
<?php
if (!$_smarty_tpl->tpl_vars['skip_create']->value) {
?>
<span> <?php
echo $_smarty_tpl->__("or");
?>
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:44fdfa7a9cc7a8e54041caf5f3de3968bbe1e033.tygh.multiple_profiles.tpl.php
示例13: content_55ccf2ea62cd14_13039228
function content_55ccf2ea62cd14_13039228($_smarty_tpl)
{
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('advanced_filter', 'advanced', 'reset', 'reset', 'advanced_filter', 'advanced', 'reset', 'reset'));
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();
?>
<div id="product_filters_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['block']->value['block_id'], ENT_QUOTES, 'UTF-8');
?>
">
<div class="ty-product-filters__wrapper testoriginal">
<?php
if ($_smarty_tpl->tpl_vars['items']->value && !$_REQUEST['advanced_filter']) {
?>
<?php
if (strpos($_SERVER['QUERY_STRING'], "dispatch=") !== false) {
?>
<?php
$_smarty_tpl->tpl_vars["curl"] = new Smarty_variable($_smarty_tpl->tpl_vars['config']->value['current_url'], null, 0);
?>
<?php
$_smarty_tpl->tpl_vars["filter_qstring"] = new Smarty_variable(fn_query_remove($_smarty_tpl->tpl_vars['curl']->value, "result_ids", "full_render", "filter_id", "view_all", "req_range_id", "advanced_filter", "features_hash", "subcats", "page"), null, 0);
?>
<?php
} else {
?>
<?php
$_smarty_tpl->tpl_vars["filter_qstring"] = new Smarty_variable("products.search", null, 0);
?>
<?php
}
?>
<?php
$_smarty_tpl->tpl_vars["reset_qstring"] = new Smarty_variable("products.search", null, 0);
?>
<?php
if ($_REQUEST['category_id'] && $_smarty_tpl->tpl_vars['settings']->value['General']['show_products_from_subcategories'] == "Y") {
?>
<?php
$_smarty_tpl->tpl_vars["filter_qstring"] = new Smarty_variable(fn_link_attach($_smarty_tpl->tpl_vars['filter_qstring']->value, "subcats=Y"), null, 0);
?>
<?php
$_smarty_tpl->tpl_vars["reset_qstring"] = new Smarty_variable(fn_link_attach($_smarty_tpl->tpl_vars['reset_qstring']->value, "subcats=Y"), null, 0);
?>
<?php
}
?>
<?php
$_smarty_tpl->tpl_vars["allow_ajax"] = new Smarty_variable(true, null, 0);
?>
<?php
$_smarty_tpl->tpl_vars["ajax_div_ids"] = new Smarty_variable("product_filters_*,products_search_*,category_products_*,product_features_*,breadcrumbs_*,currencies_*,languages_*", null, 0);
?>
<?php
$_smarty_tpl->tpl_vars["has_selected"] = new Smarty_variable(false, null, 0);
?>
<ul class="cm-responsive-menu">
<li class="ty-menu__item ty-menu__menu-btn visible-phone">
<a class="ty-menu__item-link">
<i class="ty-icon-short-list"></i>
<span>Filters</span>
</a>
</li>
<?php
$_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable();
$_smarty_tpl->tpl_vars["filter"]->_loop = false;
$_from = $_smarty_tpl->tpl_vars['items']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) {
$_smarty_tpl->tpl_vars["filter"]->_loop = true;
?>
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:b47e5055f5262e399a565cfffd033b55160baa64.tygh.orizontal.tpl.php
示例14: fn_get_preview_url
/**
* Gets uri for administrator's preview from common uri
*
* @param string $uri Common url
* @param array $object_data Preview object data
* @param array $user_id User identifier
* @return string Preview uri
*/
function fn_get_preview_url($uri, $object_data, $user_id)
{
if (fn_allowed_for('ULTIMATE')) {
$company_id = Registry::get('runtime.company_id') ? Registry::get('runtime.company_id') : $object_data['company_id'];
$uri = fn_link_attach($uri, 'company_id=' . $company_id);
}
if ($object_data['status'] != 'A' || fn_allowed_for('MULTIVENDOR') || !empty($object_data['usergroup_ids'])) {
$_uri = fn_link_attach($uri, 'action=preview');
$_uri = urlencode($_uri);
$preview_url = fn_url("profiles.view_product_as_user?user_id={$user_id}&area=C&redirect_url={$_uri}", 'A');
} else {
$preview_url = fn_url($uri, 'C', 'http', DESCR_SL);
}
fn_set_hook('get_preview_url_post', $uri, $object_data, $user_id, $preview_url);
return $preview_url;
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:24,代码来源:fn.common.php
示例15: content_55e35bb6391872_20665064
function content_55e35bb6391872_20665064($_smarty_tpl)
{
if (!is_callable('smarty_function_set_id')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
}
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->tpl_vars["wishlist_id"] = new Smarty_variable('', null, 0);
?>
<?php
if ($_smarty_tpl->tpl_vars['wishlist']->value) {
?>
<?php
$_smarty_tpl->tpl_vars["wishlist_id"] = new Smarty_variable("&wishlist_id=" . (string) $_smarty_tpl->tpl_vars['item_id']->value, null, 0);
?>
<?php
}
?>
<div class="ls-move-to-cart-button">
<?php
$_smarty_tpl->tpl_vars['current_url'] = new Smarty_variable(urlencode($_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0);
?>
<?php
$_smarty_tpl->tpl_vars['quick_view_url'] = new Smarty_variable("products.quick_view?product_id=" . (string) $_smarty_tpl->tpl_vars['product']->value['product_id'] . "&prev_url=" . (string) $_smarty_tpl->tpl_vars['current_url']->value, null, 0);
?>
<?php
if ($_smarty_tpl->tpl_vars['block']->value['type'] && $_smarty_tpl->tpl_vars['block']->value['type'] != 'main') {
?>
<?php
$_smarty_tpl->tpl_vars['quick_view_url'] = new Smarty_variable(fn_link_attach($_smarty_tpl->tpl_vars['quick_view_url']->value, "n_plain=Y"), null, 0);
?>
<?php
}
?>
<?php
if ($_smarty_tpl->tpl_vars['quick_nav_ids']->value) {
?>
<?php
$_smarty_tpl->tpl_vars['quick_nav_ids'] = new Smarty_variable(implode(",", $_smarty_tpl->tpl_vars['quick_nav_ids']->value), null, 0);
?>
<?php
$_smarty_tpl->tpl_vars['quick_view_url'] = new Smarty_variable(fn_link_attach($_smarty_tpl->tpl_vars['quick_view_url']->value, "n_items=" . (string) $_smarty_tpl->tpl_vars['quick_nav_ids']->value), null, 0);
?>
<?php
}
?>
<span class="ls_move_to_cart">move to cart</span>
</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();
}
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/move_to_cart_button.tpl" id="<?php
echo smarty_function_set_id(array('name' => "views/products/components/move_to_cart_button.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->tpl_vars["wishlist_id"] = new Smarty_variable('', null, 0);
?>
<?php
if ($_smarty_tpl->tpl_vars['wishlist']->value) {
?>
<?php
$_smarty_tpl->tpl_vars["wishlist_id"] = new Smarty_variable("&wishlist_id=" . (string) $_smarty_tpl->tpl_vars['item_id']->value, null, 0);
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:fdfa24054ff1ba34293a1eccf11c0b4525a12bd9.tygh.move_to_cart_button.tpl.php
示例16: fn_generate_seo_url_from_schema
/**
* Generates URL according to schema definition
* @param array $redirect_data redirect data
* @param boolean $full generated full URL if true and URI part if false
* @return string URL
*/
function fn_generate_seo_url_from_schema($redirect_data, $full = true)
{
$seo_vars = fn_get_seo_vars();
if ($redirect_data['type'] == 's') {
$http_path = Registry::get('config.http_path');
if (fn_allowed_for('ULTIMATE')) {
$urls = fn_get_storefront_urls(Registry::get('runtime.company_id'));
if (!empty($urls)) {
$http_path = $urls['http_path'];
}
}
$url = $http_path . $redirect_data['dest'];
} else {
$url = $seo_vars[$redirect_data['type']]['dispatch'] . '?' . $seo_vars[$redirect_data['type']]['item'] . '=' . $redirect_data['object_id'];
}
// do not add company_id to static routes
if (fn_allowed_for('ULTIMATE') && $redirect_data['type'] != 's') {
$url = fn_link_attach($url, 'company_id=' . Registry::get('runtime.company_id'));
}
$lang_code = !empty($redirect_data['lang_code']) ? $redirect_data['lang_code'] : Registry::get('settings.Appearance.frontend_default_language');
if ($full) {
$url = fn_url($url, 'C', 'http', $lang_code);
} else {
$url = fn_get_seo_request_uri(fn_url($url, 'C', 'rel', $lang_code));
}
return $url;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:33,代码来源:func.php
示例17: die
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
$post_url = fn_payment_url('current', 'chronopay_form.php');
$return_url = fn_url("payment_notification.notify?payment=chronopay_form&order_id={$order_id}", AREA, 'current');
$country = db_get_field("SELECT code_A3 FROM ?:countries WHERE code = ?s", $order_info['b_country']);
$product_name = "";
// Products
if (!empty($order_info['products'])) {
foreach ($order_info['products'] as $v) {
$product_name = $product_name . str_replace(', ', ' ', $v['product']) . ",<br>\n ";
}
}
// Certificates
if (!empty($order_info['gift_certificates'])) {
foreach ($order_info['gift_certificates'] as $v) {
$product_name = $product_name . str_replace(', ', ' ', $v['gift_cert_code']) . ",<br>\n ";
}
}
// Shippings
if (floatval($order_info['shipping_cost'])) {
foreach ($order_info['shipping'] as $v) {
$product_name .= str_replace(', ', ' ', $v['shipping']) . ",<br>\n ";
}
}
$sign = md5($processor_data['processor_params']['product_id'] . '-' . $order_info['total'] . '-' . $processor_data['processor_params']['sharedsec']);
fn_update_order_payment_info($order_id, array('awaiting_callback' => true));
$post_data = array('product_id' => $processor_data['processor_params']['product_id'], 'product_name' => $product_name, 'product_price' => $order_info['total'], 'order_id' => $order_id, 'cs1' => $order_id, 'language' => CART_LANGUAGE, 'f_name' => $order_info['b_firstname'], 's_name' => $order_info['b_lastname'], 'street' => $order_info['b_address'], 'city' => $order_info['b_city'], 'state' => $order_info['b_state'], 'zip' => $order_info['b_zipcode'], 'country' => $country, 'phone' => $order_info['phone'], 'email' => $order_info['email'], 'cb_url' => $post_url, 'cb_type' => 'P', 'success_url' => fn_link_attach($return_url, "sign={$sign}"), 'decline_url' => $return_url, 'sign' => $sign);
fn_create_payment_form('https://payments.chronopay.com', $post_data, 'ChronoPay');
}
exit;
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:chronopay_form. |
请发表评论