• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fn_get_simple_countries函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fn_get_simple_countries函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_simple_countries函数的具体用法?PHP fn_get_simple_countries怎么用?PHP fn_get_simple_countries使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fn_get_simple_countries函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: array

    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));
        $gift_cert_data = fn_array_merge($gift_cert_data, array('gift_cert_code' => $code, 'timestamp' => TIME));
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:gift_certificates.php


示例2: fn_get_payment_method_data

     $payment_info = fn_get_payment_method_data($cart['payment_id']);
     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';
开发者ID:OneataBogdan,项目名称:coriolan_backup,代码行数:31,代码来源:checkout.php


示例3: content_55d3125033b7a9_87422872


//.........这里部分代码省略.........
            if ($_smarty_tpl->tpl_vars['location']->value == "sidebox") {
                ?>
_sidebox<?php 
            }
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id_suffix']->value, ENT_QUOTES, 'UTF-8');
            ?>
,shipping_estimation_buttons" />
                <div class="ty-control-group">
                    <label class="ty-control-group__label" for="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
            ?>
elm_country<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id_suffix']->value, ENT_QUOTES, 'UTF-8');
            ?>
"><?php 
            echo $_smarty_tpl->__("country");
            ?>
</label>
                    <select id="<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['prefix']->value, ENT_QUOTES, 'UTF-8');
            ?>
elm_country<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['id_suffix']->value, ENT_QUOTES, 'UTF-8');
            ?>
" class="cm-country cm-location-estimation<?php 
            echo htmlspecialchars($_smarty_tpl->tpl_vars['class_suffix']->value, ENT_QUOTES, 'UTF-8');
            ?>
 ty-input-text-medium" name="customer_location[country]">
                        <option value="">- <?php 
            echo $_smarty_tpl->__("select_country");
            ?>
 -</option>
                        <?php 
            $_smarty_tpl->tpl_vars["countries"] = new Smarty_variable(fn_get_simple_countries(1), null, 0);
            ?>
                        <?php 
            $_smarty_tpl->tpl_vars["country"] = new Smarty_Variable();
            $_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['cart']->value['user_data']['s_country'] == $_smarty_tpl->tpl_vars['code']->value || !$_smarty_tpl->tpl_vars['cart']->value['user_data']['s_country'] && $_smarty_tpl->tpl_vars['code']->value == $_smarty_tpl->tpl_vars['settings']->value['General']['default_country']) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['country']->value, ENT_QUOTES, 'UTF-8');
                ?>
</option>
                        <?php 
            }
            ?>
                    </select>
                </div>
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:66,代码来源:e48c3040381314b19b5bbbb01e083036989366f4.tygh.shipping_estimation.tpl.php


示例4: array

            }
        }
        exit;
    }
    return array(CONTROLLER_STATUS_OK, 'suppliers' . $suffix);
}
if ($mode == 'manage') {
    list($suppliers, $search) = fn_get_suppliers($_REQUEST, Registry::get('settings.Appearance.admin_elements_per_page'));
    $view = Tygh::$app['view'];
    $view->assign('search', $search);
    $view->assign('suppliers', $suppliers);
    $view->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE));
    $view->assign('states', fn_get_all_states());
} elseif ($mode == 'update' || $mode == 'add') {
    Registry::set('navigation.tabs', array('general' => array('title' => __('general'), 'js' => true), 'products' => array('title' => __('products'), 'js' => true), 'shippings' => array('title' => __('shippings'), 'js' => true)));
    $supplier = !empty($_REQUEST['supplier_id']) ? fn_get_supplier_data($_REQUEST['supplier_id']) : array();
    $condition = " AND ?:shippings.status = 'A'";
    if (Registry::get('runtime.company_id') && !fn_allowed_for('ULTIMATE')) {
        $condition = fn_get_company_condition('?:shippings.company_id');
        $company_data = Registry::get('runtime.company_data');
        if (!empty($company_data['shippings'])) {
            $condition .= db_quote(" OR ?:shippings.shipping_id IN (?n)", explode(',', $company_data['shippings']));
        }
    }
    $shippings = db_get_hash_array("SELECT ?:shippings.shipping_id, ?:shipping_descriptions.shipping FROM ?:shippings LEFT JOIN ?:shipping_descriptions ON ?:shippings.shipping_id = ?:shipping_descriptions.shipping_id AND ?:shipping_descriptions.lang_code = ?s LEFT JOIN ?:companies ON ?:companies.company_id = ?:shippings.company_id WHERE 1 {$condition} ORDER BY ?:shippings.position", 'shipping_id', CART_LANGUAGE);
    $view = Tygh::$app['view'];
    $view->assign('shippings', $shippings);
    $view->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE));
    $view->assign('states', fn_get_all_states());
    $view->assign('supplier', $supplier);
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:suppliers.php


示例5: db_query

        if (!empty($_REQUEST['state_id'])) {
            db_query("DELETE FROM ?:states WHERE state_id = ?i", $_REQUEST['state_id']);
            db_query("DELETE FROM ?:state_descriptions WHERE state_id = ?i", $_REQUEST['state_id']);
        }
    }
    return array(CONTROLLER_STATUS_OK, 'states.manage?country_code=' . $_REQUEST['country_code']);
}
if ($mode == 'manage') {
    $params = $_REQUEST;
    if (empty($params['country_code'])) {
        $params['country_code'] = Registry::get('settings.General.default_country');
    }
    list($states, $search) = fn_get_states($params, Registry::get('settings.Appearance.admin_elements_per_page'), DESCR_SL);
    Tygh::$app['view']->assign('states', $states);
    Tygh::$app['view']->assign('search', $search);
    Tygh::$app['view']->assign('countries', fn_get_simple_countries(false, DESCR_SL));
}
function fn_update_state($state_data, $state_id = 0, $lang_code = DESCR_SL)
{
    if (empty($state_id)) {
        if (!empty($state_data['code']) && !empty($state_data['state'])) {
            $state_data['state_id'] = $state_id = db_query("REPLACE INTO ?:states ?e", $state_data);
            foreach (fn_get_translation_languages() as $state_data['lang_code'] => $_v) {
                db_query('REPLACE INTO ?:state_descriptions ?e', $state_data);
            }
        }
    } else {
        db_query("UPDATE ?:state_descriptions SET ?u WHERE state_id = ?i AND lang_code = ?s", $state_data, $state_id, $lang_code);
    }
    return $state_id;
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:states.php


示例6: array

    }
    return array(CONTROLLER_STATUS_OK, "localizations{$suffix}");
}
if ($mode == 'update') {
    $localizaton = fn_get_localization_data($_REQUEST['localization_id'], DESCR_SL, true);
    if (empty($localizaton)) {
        return array(CONTROLLER_STATUS_NO_PAGE);
    }
    Registry::get('view')->assign('localization', $localizaton);
    Registry::get('view')->assign('localization_countries', array_diff(fn_get_simple_countries(), $localizaton['countries']));
    Registry::get('view')->assign('localization_currencies', array_diff(fn_get_simple_currencies(), $localizaton['currencies']));
    Registry::get('view')->assign('localization_languages', array_diff(fn_get_simple_languages(true), $localizaton['languages']));
    Registry::get('view')->assign('default_localization', fn_get_default_localization(DESCR_SL));
    Registry::set('navigation.tabs', array('general' => array('title' => __('general'), 'js' => true), 'details' => array('title' => __('items_title'), 'js' => true)));
} elseif ($mode == 'add') {
    Registry::get('view')->assign('localization_countries', fn_get_simple_countries());
    Registry::get('view')->assign('localization_currencies', fn_get_simple_currencies());
    Registry::get('view')->assign('localization_languages', fn_get_simple_languages(true));
    Registry::get('view')->assign('default_localization', fn_get_default_localization(DESCR_SL));
    Registry::set('navigation.tabs', array('general' => array('title' => __('general'), 'js' => true), 'details' => array('title' => __('items_title'), 'js' => true)));
} elseif ($mode == 'manage') {
    Registry::get('view')->assign('localizations', fn_get_localizations(DESCR_SL));
} elseif ($mode == 'delete') {
    if (!empty($_REQUEST['localization_id'])) {
        fn_delete_localization((array) $_REQUEST['localization_id']);
    }
    return array(CONTROLLER_STATUS_OK, "localizations.manage");
}
function fn_delete_localization($localization_ids)
{
    $loc_objects = fn_get_localization_objects();
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:localizations.php


示例7: array

    }
    return array(CONTROLLER_STATUS_OK, 'localizations' . $suffix);
}
if ($mode == 'update') {
    $localizaton = fn_get_localization_data($_REQUEST['localization_id'], DESCR_SL, true);
    if (empty($localizaton)) {
        return array(CONTROLLER_STATUS_NO_PAGE);
    }
    Tygh::$app['view']->assign('localization', $localizaton);
    Tygh::$app['view']->assign('localization_countries', array_diff(fn_get_simple_countries(), $localizaton['countries']));
    Tygh::$app['view']->assign('localization_currencies', array_diff(fn_get_simple_currencies(), $localizaton['currencies']));
    Tygh::$app['view']->assign('localization_languages', array_diff(fn_get_simple_languages(true), $localizaton['languages']));
    Tygh::$app['view']->assign('default_localization', fn_get_default_localization(DESCR_SL));
    Registry::set('navigation.tabs', array('general' => array('title' => __('general'), 'js' => true), 'details' => array('title' => __('items_title'), 'js' => true)));
} elseif ($mode == 'add') {
    Tygh::$app['view']->assign('localization_countries', fn_get_simple_countries());
    Tygh::$app['view']->assign('localization_currencies', fn_get_simple_currencies());
    Tygh::$app['view']->assign('localization_languages', fn_get_simple_languages(true));
    Tygh::$app['view']->assign('default_localization', fn_get_default_localization(DESCR_SL));
    Registry::set('navigation.tabs', array('general' => array('title' => __('general'), 'js' => true), 'details' => array('title' => __('items_title'), 'js' => true)));
} elseif ($mode == 'manage') {
    Tygh::$app['view']->assign('localizations', fn_get_localizations(DESCR_SL));
}
function fn_delete_localization($localization_ids)
{
    $loc_objects = fn_get_localization_objects();
    fn_set_progress('parts', sizeof($localization_ids) * sizeof($loc_objects));
    foreach ($localization_ids as $loc_id) {
        foreach ($loc_objects as $table) {
            fn_set_progress('echo', __('converting_data_in_table', array('[table]' => $table)));
            db_query("UPDATE ?:{$table} SET localization = ?p", fn_remove_from_set('localization', $loc_id));
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:localizations.php


示例8: elseif

} elseif ($mode == 'translations') {
    $sections = array('translations' => array('title' => __('translations'), 'href' => fn_url('languages.translations')), 'manage_languages' => array('title' => __('manage_languages'), 'href' => fn_url('languages.manage')));
    Registry::set('navigation.dynamic.sections', $sections);
    Registry::set('navigation.dynamic.active_section', 'translations');
    list($lang_data, $search) = LanguageValues::getVariables($_REQUEST, Registry::get('settings.Appearance.admin_elements_per_page'));
    Registry::get('view')->assign('lang_data', $lang_data);
    Registry::get('view')->assign('search', $search);
} elseif ($mode == 'update') {
    $lang_data = Languages::get(array('lang_id' => $_REQUEST['lang_id']), 'lang_id');
    if (empty($lang_data[$_REQUEST['lang_id']])) {
        return array(CONTROLLER_STATUS_NO_PAGE);
    } else {
        $lang_data = $lang_data[$_REQUEST['lang_id']];
    }
    Registry::get('view')->assign('lang_data', $lang_data);
    Registry::get('view')->assign('countries', fn_get_simple_countries(false, DESCR_SL));
} elseif ($mode == 'update_translation') {
    $lang_data = Languages::get(array('lang_id' => $_REQUEST['lang_id']), 'lang_id');
    if (empty($lang_data[$_REQUEST['lang_id']])) {
        return array(CONTROLLER_STATUS_NO_PAGE);
    } else {
        $lang_data = $lang_data[$_REQUEST['lang_id']];
    }
    Registry::get('view')->assign('lang_data', $lang_data);
}
/**
 * @deprecated
 *
 * Updates language
 *
 * @param array $language_data Language data
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:languages.php


示例9: content_55db8bf92e8236_50589251


//.........这里部分代码省略.........
                    <?php 
                }
                if (!$_smarty_tpl->tpl_vars['v']->_loop) {
                    ?>
                        <?php 
                    echo $_smarty_tpl->__("no_items");
                    ?>

                    <?php 
                }
                ?>
                </div>
            <?php 
            } elseif ($_smarty_tpl->tpl_vars['item']->value['type'] == "X") {
                ?>
                <select class="cm-country cm-location-billing" id="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['html_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" name="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['html_name']->value, ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['disable_input']->value) {
                    ?>
disabled="disabled"<?php 
                }
                ?>
>
                    <option value="">- <?php 
                echo $_smarty_tpl->__("select_country");
                ?>
 -</option>
                    <?php 
                $_smarty_tpl->tpl_vars["countries"] = new Smarty_variable(fn_get_simple_countries(''), null, 0);
                ?>
                    <?php 
                $_smarty_tpl->tpl_vars["country"] = new Smarty_Variable();
                $_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['code']->value == $_smarty_tpl->tpl_vars['item']->value['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['item']->value['type'] == "W") {
开发者ID:AlanIsrael0,项目名称:market,代码行数:67,代码来源:bf59b014f2b7e28c12ee9aae1a259f785dd075e3.tygh.settings_fields.tpl.php


示例10: content_55d5c53cb17bd4_19534470


//.........这里部分代码省略.........
                <?php 
                                }
                                ?>
                <input id="elm_<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['element']->value['element_id'], ENT_QUOTES, 'UTF-8');
                                ?>
" class="ty-input-text" size="50" type="text" name="form_values[<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['element']->value['element_id'], ENT_QUOTES, 'UTF-8');
                                ?>
]" value="<?php 
                                echo htmlspecialchars($_smarty_tpl->tpl_vars['form_values']->value[$_smarty_tpl->tpl_vars['element_id']->value], ENT_QUOTES, 'UTF-8');
                                ?>
" />
                
            <?php 
                            } elseif ($_smarty_tpl->tpl_vars['element']->value['element_type'] == @constant('FORM_COUNTRIES')) {
                                ?>

                <?php 
                                $_smarty_tpl->tpl_vars['_country'] = 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_country'] : $tmp, null, 0);
                                ?>
                <select 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');
                                ?>
]" class="ty-form-builder__country cm-country cm-location-billing">
                    <option value="">- <?php 
                                echo $_smarty_tpl->__("select_country");
                                ?>
 -</option>
                    <?php 
                                $_smarty_tpl->tpl_vars["countries"] = new Smarty_variable(fn_get_simple_countries(1), null, 0);
                                ?>
                    <?php 
                                $_smarty_tpl->tpl_vars["country"] = new Smarty_Variable();
                                $_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 
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:67,代码来源:27ec3769d92635d72e3c335e86aa8158f83aebc7.tygh.page_content.override.tpl.php


示例11: db_query

            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)) {
        if (!empty($city_data['city']) && !empty($city_data['city_code'])) {
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:cities.php


示例12: fn_add_breadcrumb

}
if ($mode == 'update') {
    fn_add_breadcrumb(fn_get_lang_var('localizations'), "localizations.manage");
    $localizaton = fn_get_localization_data($_REQUEST['localization_id'], DESCR_SL, true);
    if (empty($localizaton)) {
        return array(CONTROLLER_STATUS_NO_PAGE);
    }
    $view->assign('localization', $localizaton);
    $view->assign('localization_countries', array_diff(fn_get_simple_countries(), $localizaton['countries']));
    $view->assign('localization_currencies', array_diff(fn_get_simple_currencies(), $localizaton['currencies']));
    $view->assign('localization_languages', array_diff(fn_get_simple_languages(), $localizaton['languages']));
    $view->assign('default_localization', fn_get_default_localization(DESCR_SL));
    Registry::set('navigation.tabs', array('general' => array('title' => fn_get_lang_var('general'), 'js' => true), 'details' => array('title' => fn_get_lang_var('items_title'), 'js' => true)));
} elseif ($mode == 'add') {
    fn_add_breadcrumb(fn_get_lang_var('localizations'), "localizations.manage");
    $view->assign('localization_countries', fn_get_simple_countries());
    $view->assign('localization_currencies', fn_get_simple_currencies());
    $view->assign('localization_languages', fn_get_simple_languages());
    $view->assign('default_localization', fn_get_default_localization(DESCR_SL));
    Registry::set('navigation.tabs', array('general' => array('title' => fn_get_lang_var('general'), 'js' => true), 'details' => array('title' => fn_get_lang_var('items_title'), 'js' => true)));
} elseif ($mode == 'manage') {
    $view->assign('localizations', fn_get_localizations(DESCR_SL));
} elseif ($mode == 'delete') {
    if (!empty($_REQUEST['localization_id'])) {
        fn_delete_localization((array) $_REQUEST['localization_id']);
    }
    return array(CONTROLLER_STATUS_REDIRECT, "localizations.manage");
}
function fn_delete_localization($localization_ids)
{
    fn_start_scroller();
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:localizations.php



注:本文中的fn_get_simple_countries函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fn_get_state_name函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_get_session_data函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap