本文整理汇总了PHP中fn_get_all_states函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_all_states函数的具体用法?PHP fn_get_all_states怎么用?PHP fn_get_all_states使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_get_all_states函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fn_get_gift_certificate_info
$gift_cert_data = fn_get_gift_certificate_info($gift_cert_id);
if (empty($gift_cert_data) || !empty($gift_cert_id) && !fn_check_company_id('gift_certificates', 'gift_cert_id', $gift_cert_id)) {
return array(CONTROLLER_STATUS_NO_PAGE);
}
// [Page sections]
Registry::set('navigation.tabs', array('detailed' => array('title' => __('detailed_info'), 'js' => true), 'log' => array('title' => __('history'), 'js' => true)));
// [/Page sections]
list($log, $search) = fn_get_gift_certificate_log($_REQUEST, Registry::get('settings.Appearance.admin_elements_per_page'));
Tygh::$app['view']->assign('log', $log);
Tygh::$app['view']->assign('search', $search);
if (false != ($last_item = reset($log))) {
$gift_cert_data['amount'] = $last_item['debit'];
$gift_cert_data['products'] = $last_item['debit_products'];
}
Tygh::$app['view']->assign('templates', fn_get_gift_certificate_templates());
Tygh::$app['view']->assign('states', fn_get_all_states());
Tygh::$app['view']->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE));
Tygh::$app['view']->assign('gift_cert_data', $gift_cert_data);
} elseif ($mode == 'manage') {
list($gift_certificates, $search) = fn_get_gift_certificates($_REQUEST, Registry::get('addons.gift_certificates.cert_per_page'));
Tygh::$app['view']->assign('gift_certificates', $gift_certificates);
Tygh::$app['view']->assign('search', $search);
}
function fn_update_gift_certificate($gift_cert_data, $gift_cert_id = 0, $params = array())
{
fn_correct_gift_certificate($gift_cert_data);
$gift_cert_data['products'] = !empty($gift_cert_data['products']) ? serialize($gift_cert_data['products']) : '';
if (empty($gift_cert_id)) {
do {
$code = fn_generate_gift_certificate_code();
} while (true == fn_check_gift_certificate_code($code));
示例2: content_55d3125033b7a9_87422872
function content_55d3125033b7a9_87422872($_smarty_tpl)
{
if (!is_callable('smarty_block_hook')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
}
if (!is_callable('smarty_function_set_id')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
}
fn_preload_lang_vars(array('calculate_shipping_cost', 'country', 'select_country', 'state', 'select_state', 'select_state', 'zip_postal_code', 'get_rates', 'select_shipping_method', 'vendor', 'none', 'free_shipping', 'no_shipping_required', 'free_shipping', 'text_no_shipping_methods', 'total', 'select', 'text_no_shipping_methods', 'recalculate_rates', 'select_shipping_method', 'get_rates', 'calculate_shipping_cost', 'country', 'select_country', 'state', 'select_state', 'select_state', 'zip_postal_code', 'get_rates', 'select_shipping_method', 'vendor', 'none', 'free_shipping', 'no_shipping_required', 'free_shipping', 'text_no_shipping_methods', 'total', 'select', 'text_no_shipping_methods', 'recalculate_rates', 'select_shipping_method', 'get_rates'));
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();
?>
<script type="text/javascript">
function fn_calculate_total_shipping()
{
var $ = Tygh.$;
params = [];
parents = $('#shipping_estimation');
radio = $('input[type=radio]:checked', parents);
$.each(radio, function(id, elm) {
params.push({name: elm.name, value: elm.value});
});
params.push({name: $('#elm_zipcode').prop('name'), value: $('#elm_country').val()});
params.push({name: $('#elm_state').prop('name'), value: $('#elm_state').val()});
params.push({name: $('#elm_zipcode').prop('name'), value: $('#elm_zipcode').val()});
url = fn_url('checkout.shipping_estimation');
for (i in params) {
url += '&' + params[i]['name'] + '=' + encodeURIComponent(params[i]['value']);
}
$.ceAjax('request', url, {
result_ids: 'shipping_estimation',
method: 'post'
});
}
</script>
<?php
if ($_smarty_tpl->tpl_vars['location']->value == "sidebox") {
?>
<?php
$_smarty_tpl->tpl_vars["prefix"] = new Smarty_variable("sidebox_", null, 0);
}
if ($_smarty_tpl->tpl_vars['location']->value == "popup") {
?>
<?php
$_smarty_tpl->tpl_vars["buttons_class"] = new Smarty_variable("hidden", null, 0);
} else {
?>
<?php
$_smarty_tpl->tpl_vars["buttons_class"] = new Smarty_variable("buttons-container", null, 0);
}
if ($_smarty_tpl->tpl_vars['additional_id']->value) {
?>
<?php
$_smarty_tpl->tpl_vars["class_suffix"] = new Smarty_variable("-" . (string) $_smarty_tpl->tpl_vars['additional_id']->value, null, 0);
?>
<?php
$_smarty_tpl->tpl_vars["id_suffix"] = new Smarty_variable("_" . (string) $_smarty_tpl->tpl_vars['additional_id']->value, null, 0);
}
?>
<?php
if ($_smarty_tpl->tpl_vars['location']->value != "sidebox" && $_smarty_tpl->tpl_vars['location']->value != "popup") {
?>
<div id="est_box<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['id_suffix']->value, ENT_QUOTES, 'UTF-8');
?>
">
<div class="ty-estimation-box">
<h3 class="ty-subheader"><?php
echo $_smarty_tpl->__("calculate_shipping_cost");
?>
</h3>
<?php
}
?>
<div id="shipping_estimation<?php
if ($_smarty_tpl->tpl_vars['location']->value == "sidebox") {
?>
_sidebox<?php
}
echo htmlspecialchars($_smarty_tpl->tpl_vars['id_suffix']->value, ENT_QUOTES, 'UTF-8');
?>
">
<?php
$_smarty_tpl->tpl_vars['states'] = new Smarty_variable(fn_get_all_states(1), null, 0);
?>
<?php
if (!Smarty::$_smarty_vars['capture']['states_built']) {
?>
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:e48c3040381314b19b5bbbb01e083036989366f4.tygh.shipping_estimation.tpl.php
示例3: array
if (empty($gift_cert_data)) {
return array(CONTROLLER_STATUS_NO_PAGE);
}
// [Page sections]
Registry::set('navigation.tabs', array('detailed' => array('title' => fn_get_lang_var('detailed_info'), 'js' => true), 'log' => array('title' => fn_get_lang_var('history'), 'js' => true)));
// [/Page sections]
list($log, $sort_order, $sort_by) = fn_get_gift_certificate_log($gift_cert_id, $_REQUEST);
$view->assign('log', $log);
$view->assign('sort_order', $sort_order);
$view->assign('sort_by', $sort_by);
if (false != ($last_item = reset($log))) {
$gift_cert_data['amount'] = $last_item['debit'];
$gift_cert_data['products'] = $last_item['debit_products'];
}
$view->assign('templates', fn_get_gift_certificate_templates());
$view->assign('states', fn_get_all_states());
$view->assign('countries', fn_get_countries(CART_LANGUAGE, true));
$view->assign('amount_variants', fn_get_gift_certificate_amount_variants());
$view->assign('gift_cert_data', $gift_cert_data);
} elseif ($mode == 'manage') {
list($gift_certificates, $search) = fn_get_gift_certificates($_REQUEST);
$view->assign('gift_certificates', $gift_certificates);
$view->assign('search', $search);
fn_gift_certificates_generate_sections('manage');
} elseif ($mode == 'delete') {
if (!empty($_REQUEST['gift_cert_id'])) {
$result = fn_delete_gift_certificate($_REQUEST['gift_cert_id'], @$_REQUEST['extra']);
return array(CONTROLLER_STATUS_REDIRECT, !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : "gift_certificates." . ($result ? "manage" : "update?gift_cert_id=" . $_REQUEST['gift_cert_id']));
}
} elseif ($mode == 'update_status') {
$old_status = db_get_field("SELECT status FROM ?:gift_certificates WHERE gift_cert_id = ?i", $_REQUEST['id']);
示例4: fn_update_payment_surcharge
Registry::get('view')->assign('payment_info', $payment_info);
if (!empty($payment_info['processor_params']['iframe_mode']) && $payment_info['processor_params']['iframe_mode'] == 'Y') {
Registry::get('view')->assign('iframe_mode', true);
}
}
Registry::get('view')->assign('payment_methods', $payment_methods);
$cart['payment_surcharge'] = 0;
if (!empty($cart['payment_id']) && !empty($payment_info)) {
fn_update_payment_surcharge($cart, $auth);
}
if (fn_allowed_for('MULTIVENDOR')) {
Registry::get('view')->assign('take_surcharge_from_vendor', fn_take_payment_surcharge_from_vendor($cart['products']));
}
Registry::get('view')->assign('usergroups', fn_get_usergroups('C', CART_LANGUAGE));
Registry::get('view')->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE));
Registry::get('view')->assign('states', fn_get_all_states());
$cart['ship_to_another'] = fn_check_shipping_billing($cart['user_data'], $profile_fields);
Registry::get('view')->assign('profile_fields', $profile_fields);
if (Registry::get('settings.General.user_multiple_profiles') == 'Y') {
$user_profiles = fn_get_user_profiles($auth['user_id']);
Registry::get('view')->assign('user_profiles', $user_profiles);
}
fn_checkout_summary($cart);
if ($edit_step == 'step_two' && !empty($completed_steps['step_one']) && empty($profile_fields['B']) && empty($profile_fields['S'])) {
$edit_step = 'step_four';
}
// If we're on shipping step and shipping is not required, switch to payment step
//FIXME
/* if ($edit_step == 'step_three' && $cart['shipping_required'] != true) {
$edit_step = 'step_four';
} */
示例5: content_55cdd47237dd25_46223753
function content_55cdd47237dd25_46223753($_smarty_tpl)
{
if (!is_callable('smarty_function_script')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php';
}
fn_preload_lang_vars(array('settings'));
echo smarty_function_script(array('src' => "js/tygh/fileuploader_scripts.js"), $_smarty_tpl);
?>
<?php
echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('states' => fn_get_all_states(1)), 0);
?>
<?php
if ($_REQUEST['highlight']) {
$_smarty_tpl->tpl_vars["highlight"] = new Smarty_variable(explode(",", $_REQUEST['highlight']), null, 0);
}
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
ob_start();
?>
<form action="<?php
echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
?>
" method="post" name="settings_form" class=" form-horizontal form-edit form-setting">
<input name="section_id" type="hidden" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['section_id']->value, ENT_QUOTES, 'UTF-8');
?>
" />
<input type="hidden" id="selected_section" name="selected_section" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['selected_section']->value, ENT_QUOTES, 'UTF-8');
?>
" />
<?php
$_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null);
ob_start();
?>
<?php
$_smarty_tpl->tpl_vars['subsection'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['subsection']->_loop = false;
$_smarty_tpl->tpl_vars["ukey"] = new Smarty_Variable();
$_from = $_smarty_tpl->tpl_vars['options']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
foreach ($_from as $_smarty_tpl->tpl_vars['subsection']->key => $_smarty_tpl->tpl_vars['subsection']->value) {
$_smarty_tpl->tpl_vars['subsection']->_loop = true;
$_smarty_tpl->tpl_vars["ukey"]->value = $_smarty_tpl->tpl_vars['subsection']->key;
?>
<div id="content_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['ukey']->value, ENT_QUOTES, 'UTF-8');
?>
" <?php
if ($_smarty_tpl->tpl_vars['subsections']->value[$_smarty_tpl->tpl_vars['section']->value]['type'] == "SEPARATE_TAB") {
?>
class="cm-hide-save-button"<?php
}
?>
>
<?php
$_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['item']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['subsection']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$_smarty_tpl->tpl_vars['item']->total = $_smarty_tpl->_count($_from);
$_smarty_tpl->tpl_vars['smarty']->value['foreach']["section"]['total'] = $_smarty_tpl->tpl_vars['item']->total;
$_smarty_tpl->tpl_vars['smarty']->value['foreach']["section"]['iteration'] = 0;
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->_loop = true;
$_smarty_tpl->tpl_vars['smarty']->value['foreach']["section"]['iteration']++;
?>
<?php
echo $_smarty_tpl->getSubTemplate("common/settings_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('item' => $_smarty_tpl->tpl_vars['item']->value, 'section' => $_smarty_tpl->tpl_vars['section_id']->value, 'html_id' => "field_" . (string) $_smarty_tpl->tpl_vars['section']->value . "_" . (string) $_smarty_tpl->tpl_vars['item']->value['name'] . "_" . (string) $_smarty_tpl->tpl_vars['item']->value['object_id'], 'html_name' => "update[" . (string) $_smarty_tpl->tpl_vars['item']->value['object_id'] . "]", 'index' => $_smarty_tpl->getVariable('smarty')->value['foreach']['section']['iteration'], 'total' => $_smarty_tpl->getVariable('smarty')->value['foreach']['section']['total']), 0);
?>
<?php
}
?>
</div>
<?php
}
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("buttons", null, null);
ob_start();
?>
<?php
echo $_smarty_tpl->getSubTemplate("buttons/save.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[settings.update]", 'but_role' => "submit-link", 'but_target_form' => "settings_form"), 0);
?>
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:ca63c3c6125c1d8c84690cc47d8dba496646080c.tygh.manage.tpl.php
示例6: content_55ccdf864081b0_25610907
function content_55ccdf864081b0_25610907($_smarty_tpl)
{
if (!is_callable('smarty_function_script')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php';
}
if (!is_callable('smarty_block_hook')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php';
}
fn_preload_lang_vars(array('marketplace', 'marketplace_find_more', 'installed_addons', 'browse_all_available_addons', 'no_data', 'no_data', 'upload_addon', 'upload_addon', 'addons'));
echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('states' => fn_get_all_states(1)), 0);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/tabs.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/filter_table.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/fileuploader_scripts.js"), $_smarty_tpl);
?>
<script type="text/javascript">
(function(_, $) {
$(document).ready(function(){
var search_field = $("#elm_addon");
var search_clear = $("#elm_addon_clear");
// Init plugin
search_field.ceFilterTable({
table: ".table-addons",
empty: ".no-items"
});
// Clear input
search_clear.on("click", function() {
search_field.val("").trigger("input");
search_clear.addClass("hidden");
});
// Show clear button if search filed isn't empty
search_field.on("keyup input", function() {
if(search_field.val().length > 0) {
search_clear.removeClass("hidden");
} else {
search_clear.addClass("hidden");
}
});
});
}(Tygh, Tygh.$));
</script>
<?php
$_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
ob_start();
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("sidebar", null, null);
ob_start();
?>
<?php
echo $_smarty_tpl->getSubTemplate("views/addons/components/addons_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "addons.manage"), 0);
?>
<hr>
<div class="sidebar-row marketplace">
<h6><?php
echo $_smarty_tpl->__("marketplace");
?>
</h6>
<p class="marketplace-link"><?php
echo $_smarty_tpl->__("marketplace_find_more", array("[href]" => $_smarty_tpl->tpl_vars['config']->value['resources']['marketplace_url']));
?>
</p>
</div>
<?php
list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
if (isset($_capture_assign)) {
$_smarty_tpl->assign($_capture_assign, ob_get_contents());
}
if (isset($_capture_append)) {
$_smarty_tpl->append($_capture_append, ob_get_contents());
}
Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
} else {
$_smarty_tpl->capture_error();
}
?>
<?php
$_smarty_tpl->tpl_vars["c_url"] = new Smarty_variable(rawurlencode($_smarty_tpl->tpl_vars['config']->value['current_url']), null, 0);
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:9c1de2010ec947e31a28fdd705d8f3a99aee0dac.tygh.manage.tpl.php
示例7: fn_twg_get_states
function fn_twg_get_states()
{
$states = fn_get_all_states();
// Unset country_code field
foreach ($states as $country_id => $country) {
foreach ($country as $state_id => $state) {
unset($states[$country_id][$state_id]['country_code']);
}
}
return $states;
}
示例8: db_get_array
$destination_data['states'] = db_get_array("SELECT a.state_id, b.state, a.code, d.country FROM ?:states as a LEFT JOIN ?:state_descriptions as b ON b.state_id = a.state_id AND b.lang_code = ?s LEFT JOIN ?:destination_elements as c ON c.element_type = 'S' AND c.element = a.state_id LEFT JOIN ?:country_descriptions as d ON d.code = a.country_code AND d.lang_code = ?s WHERE c.destination_id = ?i", DESCR_SL, DESCR_SL, $_REQUEST['destination_id']);
$destination_data['countries'] = db_get_array("SELECT a.code, b.country FROM ?:countries as a LEFT JOIN ?:country_descriptions as b ON b.code = a.code AND b.lang_code = ?s LEFT JOIN ?:destination_elements as c ON c.element_type = 'C' AND c.element = a.code WHERE c.destination_id = ?i", DESCR_SL, $_REQUEST['destination_id']);
$destination_data['zipcodes'] = db_get_hash_single_array("SELECT element_id, element FROM ?:destination_elements WHERE element_type = 'Z' AND destination_id = ?i", array('element_id', 'element'), $_REQUEST['destination_id']);
$destination_data['zipcodes'] = implode("\n", $destination_data['zipcodes']);
$destination_data['cities'] = db_get_hash_single_array("SELECT element_id, element FROM ?:destination_elements WHERE element_type = 'T' AND destination_id = ?i", array('element_id', 'element'), $_REQUEST['destination_id']);
$destination_data['cities'] = implode("\n", $destination_data['cities']);
$destination_data['addresses'] = db_get_hash_single_array("SELECT element_id, element FROM ?:destination_elements WHERE element_type = 'A' AND destination_id = ?i", array('element_id', 'element'), $_REQUEST['destination_id']);
$destination_data['addresses'] = implode("\n", $destination_data['addresses']);
$view->assign('destination_data', $destination_data);
$view->assign('destination', $destination);
$view->assign('states', fn_get_all_states(DESCR_SL, true, false));
$view->assign('countries', fn_get_countries());
// Add destination
} elseif ($mode == 'add') {
fn_add_breadcrumb(fn_get_lang_var('locations'), "destinations.manage");
$view->assign('states', fn_get_all_states(DESCR_SL, true, false));
$view->assign('countries', fn_get_countries());
// Destinations list
} elseif ($mode == 'manage') {
$destinations = fn_get_destinations(DESCR_SL);
$view->assign('destinations', $destinations);
} elseif ($mode == 'delete') {
if (!empty($_REQUEST['destination_id'])) {
fn_delete_destinations((array) $_REQUEST['destination_id']);
}
return array(CONTROLLER_STATUS_REDIRECT, "destinations.manage");
}
function fn_delete_destinations($destination_ids)
{
foreach ($destination_ids as $dest_id) {
if (!empty($dest_id) && $dest_id != 1) {
示例9: content_55ccecc7627375_26321283
function content_55ccecc7627375_26321283($_smarty_tpl)
{
if (!is_callable('smarty_function_script')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.script.php';
}
$_smarty_tpl->tpl_vars["_addon"] = new Smarty_variable($_REQUEST['addon'], null, 0);
if ($_smarty_tpl->tpl_vars['separate']->value) {
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/tabs.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/fileuploader_scripts.js"), $_smarty_tpl);
?>
<?php
echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('states' => fn_get_all_states(1)), 0);
?>
<?php
}
?>
<?php
if ($_smarty_tpl->tpl_vars['separate']->value) {
$_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
ob_start();
}
?>
<div id="content_group<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['_addon']->value, ENT_QUOTES, 'UTF-8');
?>
">
<div id="content_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['_addon']->value, ENT_QUOTES, 'UTF-8');
?>
">
<div class="tabs cm-j-tabs <?php
if ($_smarty_tpl->tpl_vars['separate']->value) {
?>
cm-track<?php
}
?>
<?php
if (count($_smarty_tpl->tpl_vars['subsections']->value) == 1) {
?>
hidden<?php
}
?>
">
<ul class="nav nav-tabs">
<?php
$_smarty_tpl->tpl_vars["subs"] = new Smarty_Variable();
$_smarty_tpl->tpl_vars["subs"]->_loop = false;
$_smarty_tpl->tpl_vars["section"] = new Smarty_Variable();
$_from = $_smarty_tpl->tpl_vars['subsections']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
foreach ($_from as $_smarty_tpl->tpl_vars["subs"]->key => $_smarty_tpl->tpl_vars["subs"]->value) {
$_smarty_tpl->tpl_vars["subs"]->_loop = true;
$_smarty_tpl->tpl_vars["section"]->value = $_smarty_tpl->tpl_vars["subs"]->key;
?>
<?php
$_smarty_tpl->tpl_vars["tab_id"] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['_addon']->value . "_" . (string) $_smarty_tpl->tpl_vars['section']->value, null, 0);
?>
<li class="cm-js <?php
if ($_REQUEST['selected_section'] == $_smarty_tpl->tpl_vars['tab_id']->value) {
?>
active<?php
}
?>
" id="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['tab_id']->value, ENT_QUOTES, 'UTF-8');
?>
"><a><?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['subs']->value['description'], ENT_QUOTES, 'UTF-8');
?>
</a></li>
<?php
}
?>
</ul>
</div>
<div class="cm-tabs-content" id="tabs_content_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['_addon']->value, ENT_QUOTES, 'UTF-8');
?>
">
<form action="<?php
echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');
?>
" method="post" name="update_addon_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['_addon']->value, ENT_QUOTES, 'UTF-8');
?>
_form" class=" form-edit form-horizontal" enctype="multipart/form-data">
<input type="hidden" name="selected_section" value="<?php
echo htmlspecialchars($_REQUEST['selected_section'], ENT_QUOTES, 'UTF-8');
?>
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:831090995d4f876be02ca93ba00a58336a7be834.tygh.update.tpl.php
示例10: content_55db8c5b5f26f2_62007688
function content_55db8c5b5f26f2_62007688($_smarty_tpl)
{
if (!is_callable('smarty_function_script')) {
include '/var/www/html/market/app/functions/smarty_plugins/function.script.php';
}
if (!is_callable('smarty_block_hook')) {
include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php';
}
fn_preload_lang_vars(array('marketplace', 'marketplace_find_more', 'installed_addons', 'browse_all_available_addons', 'upload_addon', 'upload_addon', 'addons'));
echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('states' => fn_get_all_states(1)), 0);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/tabs.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/filter_table.js"), $_smarty_tpl);
?>
<?php
echo smarty_function_script(array('src' => "js/tygh/fileuploader_scripts.js"), $_smarty_tpl);
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null);
ob_start();
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("sidebar", null, null);
ob_start();
?>
<?php
echo $_smarty_tpl->getSubTemplate("views/addons/components/addons_search_form.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('dispatch' => "addons.manage"), 0);
?>
<hr>
<div class="sidebar-row marketplace">
<h6><?php
echo $_smarty_tpl->__("marketplace");
?>
</h6>
<p class="marketplace-link"><?php
echo $_smarty_tpl->__("marketplace_find_more", array("[href]" => $_smarty_tpl->tpl_vars['config']->value['resources']['marketplace_url']));
?>
</p>
</div>
<?php
list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
if (isset($_capture_assign)) {
$_smarty_tpl->assign($_capture_assign, ob_get_contents());
}
if (isset($_capture_append)) {
$_smarty_tpl->append($_capture_append, ob_get_contents());
}
Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
} else {
$_smarty_tpl->capture_error();
}
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("upload_addon", null, null);
ob_start();
?>
<?php
echo $_smarty_tpl->getSubTemplate("views/addons/components/upload_addon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
?>
<?php
list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
if (isset($_capture_assign)) {
$_smarty_tpl->assign($_capture_assign, ob_get_contents());
}
if (isset($_capture_append)) {
$_smarty_tpl->append($_capture_append, ob_get_contents());
}
Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
} else {
$_smarty_tpl->capture_error();
}
?>
<div class="items-container" id="addons_list">
<?php
$_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "addons:manage"));
$_block_repeat = true;
echo smarty_block_hook(array('name' => "addons:manage"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
?>
<div class="tabs cm-j-tabs clear">
<ul class="nav nav-tabs">
//.........这里部分代码省略.........
开发者ID:AlanIsrael0,项目名称:market,代码行数:101,代码来源:e2ae7b22714b147d9a4904d005dbee68f915df25.tygh.manage.tpl.php
示例11: fn_twg_get_all_settings
/**
* Prepare all settings, wich should be passed to js
*/
function fn_twg_get_all_settings()
{
$settings = fn_twg_get_boot_settings();
$addon_settings = TwigmoSettings::get();
$settings['currency'] = Registry::get('currencies.' . CART_SECONDARY_CURRENCY);
$settings['primaryCurrency'] = Registry::get('currencies.' . CART_PRIMARY_CURRENCY);
$settings['url_for_facebook'] = isset($addon_settings['url_for_facebook']) ? fn_twg_get_external_info_url($addon_settings['url_for_facebook']) : '';
$settings['url_for_twitter'] = isset($addon_settings['url_for_twitter']) ? fn_twg_get_external_info_url($addon_settings['url_for_twitter']) : '';
$needed_langvars = Lang::getNeededLangvars();
$settings['lang'] = array();
foreach ($needed_langvars as $needed_langvar) {
$settings['lang'][$needed_langvar] = __($needed_langvar);
}
$settings['lang'] = array_merge($settings['lang'], Lang::getCustomerLangVars());
// Countries/states
list($countries) = fn_get_countries(array('only_avail' => true));
$settings = array_merge($settings, Api::getAsList('countries', $countries));
$states = fn_get_all_states();
// Unset country_code field
foreach ($states as $country_id => $country) {
foreach (array_keys($country) as $state_id) {
unset($states[$country_id][$state_id]['country_code']);
}
}
$settings['states'] = $states;
// Info pages
$pages_location = $addon_settings['home_page_content'] == 'tw_home_page_blocks' ? 'twigmo.post' : 'index.index';
$pages = TwigmoBlock::getBlocksForLocation($pages_location, array('pages'));
$settings['info_pages'] = array();
foreach ($pages as $page) {
$settings['info_pages'] = array_merge($settings['info_pages'], $page['pages']['page']);
}
// If page link begin with # then interpret this link as twigmo page
foreach ($settings['info_pages'] as $k => $page) {
if (preg_match('/^\\#.*$/', $page['link'])) {
$settings['info_pages'][$k]['twigmo_page'] = substr($page['link'], 1);
}
}
// Only required profile fields
$only_required = isset($addon_settings['only_req_profile_fields']) ? $addon_settings['only_req_profile_fields'] : 'N';
$settings['profileFields'] = fn_twg_prepare_profile_fields(fn_get_profile_fields(), $only_required);
$settings['profileFieldsCheckout'] = fn_twg_prepare_profile_fields(fn_get_profile_fields('O'), $only_required);
$settings['titles'] = array();
//array_values(fn_twg_get_static_data_section('T'));
$user_info_params = array('user_id' => $_SESSION['auth']['user_id'], 'mode' => Registry::get('runtime.mode'));
$settings['profile'] = fn_twg_get_user_info($user_info_params);
$settings['cart'] = fn_twg_api_get_session_cart($_SESSION['cart']);
$settings['sortings'] = fn_twg_get_sortings();
$settings['security_hash'] = fn_generate_security_hash();
$settings['productType'] = PRODUCT_EDITION;
$settings['languages'] = array_values(Lang::getLanguages());
$settings['cart_language'] = CART_LANGUAGE;
$settings['cart_prices_w_taxes'] = Registry::get('settings.Appearance.cart_prices_w_taxes');
$settings['show_prices_taxed_clean'] = Registry::get('settings.Appearance.show_prices_taxed_clean');
$settings['no_image_path'] = Registry::get('config.no_image_path');
// Suppliers
$settings['suppliers_vendor'] = Registry::get('settings.Suppliers.apply_for_vendor');
$settings['display_supplier'] = Registry::get('settings.Suppliers.display_supplier');
// General section
$fields = array('use_email_as_login', 'min_order_amount', 'min_order_amount_type', 'address_position', 'agree_terms_conditions', 'allow_negative_amount', 'inventory_tracking', 'allow_anonymous_shopping', 'disable_anonymous_checkout', 'tax_calculation');
foreach ($fields as $field) {
$settings[$field] = Registry::get('settings.General.' . $field);
}
if (version_compare(PRODUCT_VERSION, '4.0.2', '>=')) {
$anonymous_shopping_settings_map = array('allow_shopping' => 'Y', 'hide_price_and_add_to_cart' => 'P', 'hide_add_to_cart' => 'B');
$settings['allow_anonymous_shopping'] = $anonymous_shopping_settings_map[$settings['allow_anonymous_shopping']];
}
$settings['default_location'] = array('country' => Registry::get('settings.General.default_country'), 'state' => Registry::get('settings.General.default_state'));
$settings['show_modifiers'] = Registry::get('settings.General.display_options_modifiers');
$settings['SEOEnabled'] = Registry::get('addons.seo.status') == 'A';
$settings['GATrackEcommerce'] = Registry::get('addons.google_analytics.status') == 'A' && Registry::get('addons.google_analytics.track_ecommerce') == 'Y' && file_exists(Registry::get('config.dir.addons') . 'google_analytics/controllers/frontend/checkout.post.php');
if (fn_allowed_for('MULTIVENDOR')) {
$settings['company_data'] = !empty($_SESSION['auth']['company_id']) ? fn_get_company_data($_SESSION['auth']['company_id']) : array();
} else {
$settings['company_data'] = array();
}
fn_set_hook('twg_get_all_settings', $settings);
// Langvars postprocessing
$langvars = array();
$pattern = '/(twg_|msg_|lbl_|btn_|text_)/';
$replace = '';
foreach ($settings['lang'] as $langvar_id => $langvar_value) {
$tidy_key = preg_replace($pattern, $replace, $langvar_id);
$langvars[$tidy_key] = $langvar_value;
}
$settings['lang'] = $langvars;
return $settings;
}
示例12: content_55d5c53cb17bd4_19534470
//.........这里部分代码省略.........
$_smarty_tpl->tpl_vars["country"]->_loop = false;
$_smarty_tpl->tpl_vars["code"] = new Smarty_Variable();
$_from = $_smarty_tpl->tpl_vars['countries']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
foreach ($_from as $_smarty_tpl->tpl_vars["country"]->key => $_smarty_tpl->tpl_vars["country"]->value) {
$_smarty_tpl->tpl_vars["country"]->_loop = true;
$_smarty_tpl->tpl_vars["code"]->value = $_smarty_tpl->tpl_vars["country"]->key;
?>
<option value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['code']->value, ENT_QUOTES, 'UTF-8');
?>
" <?php
if ($_smarty_tpl->tpl_vars['_country']->value == $_smarty_tpl->tpl_vars['code']->value) {
?>
selected="selected"<?php
}
?>
><?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['country']->value, ENT_QUOTES, 'UTF-8');
?>
</option>
<?php
}
?>
</select>
<?php
} elseif ($_smarty_tpl->tpl_vars['element']->value['element_type'] == @constant('FORM_STATES')) {
?>
<?php
echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('states' => fn_get_all_states(1)), 0);
?>
<?php
$_smarty_tpl->tpl_vars['_state'] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['form_values']->value[$_smarty_tpl->tpl_vars['elm_id']->value]) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['settings']->value['General']['default_state'] : $tmp, null, 0);
?>
<select class="ty-form-builder__state cm-state cm-location-billing" id="elm_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['element']->value['element_id'], ENT_QUOTES, 'UTF-8');
?>
" name="form_values[<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['element']->value['element_id'], ENT_QUOTES, 'UTF-8');
?>
]">
<option label="" value="">- <?php
echo $_smarty_tpl->__("select_state");
?>
-</option>
</select>
<input type="text" class="cm-state cm-location-billing ty-input-text hidden" id="elm_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['element']->value['element_id'], ENT_QUOTES, 'UTF-8');
?>
_d" name="form_values[<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['element']->value['element_id'], ENT_QUOTES, 'UTF-8');
?>
]" size="32" maxlength="64" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['_state']->value, ENT_QUOTES, 'UTF-8');
?>
" disabled="disabled" />
<?php
} elseif ($_smarty_tpl->tpl_vars['element']->value['element_type'] == @constant('FORM_FILE')) {
?>
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:67,代码来源:27ec3769d92635d72e3c335e86aa8158f83aebc7.tygh.page_content.override.tpl.php
示例13: db_query
db_query("DELETE FROM ?:rus_cities WHERE city_id = ?i", $params['city_id']);
db_query("DELETE FROM ?:rus_city_descriptions WHERE city_id = ?i", $params['city_id']);
}
}
$redirect_url = "cities.manage?country_code={$params['country_code']}";
if (!empty($params['state_code'])) {
$redirect_url .= "&state_code={$params['state_code']}";
}
return array(CONTROLLER_STATUS_OK, $redirect_url);
}
if ($mode == 'manage') {
if (empty($_REQUEST['country_code'])) {
$params['country_code'] = Registry::get('settings.General.default_country');
}
list($cities, $search) = fn_get_cities($params, Registry::get('settings.Appearance.admin_elements_per_page'), DESCR_SL);
$states = fn_get_all_states();
$countries = fn_get_simple_countries(false, DESCR_SL);
if (!empty($cities)) {
foreach ($cities as $key => $city) {
$cities[$key]['state_name'] = fn_get_state_name($city['state_code'], $city['country_code'], DESCR_SL);
$cities[$key]['country_name'] = $countries[$city['country_code']];
}
}
Tygh::$app['view']->assign('countries', $countries);
Tygh::$app['view']->assign('states', $states);
Tygh::$app['view']->assign('cities', $cities);
Tygh::$app['view']->assign('search', $search);
}
function fn_update_city($city_data, $city_id = 0, $lang_code = DESCR_SL)
{
if (empty($city_id)) {
示例14: content_55db8c18746198_22874697
function content_55db8c18746198_22874697($_smarty_tpl)
{
echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('states' => fn_get_all_states(1)), 0);
}
开发者ID:AlanIsrael0,项目名称:market,代码行数:4,代码来源:aad887d277dc778c12c5954a160f805498bb5ba1.tygh.profiles_scripts.tpl.php