Ejemplo n.º 1
0
function item_country_box($country_txt, $country_select_txt)
{
    $aCountries = osc_get_countries();
    $item = osc_item() != null ? osc_item() : array();
    switch (count($aCountries)) {
        case 0:
            // no country, show input
            ?>
                        <div class="clearfix">
                            <label><?php 
            echo $country_txt;
            ?>
</label>
                            <div class="input">
                                <input class="country_name" id="country_name" type="text" name="country" value="<?php 
            echo get_country_name($item);
            ?>
" />
                            </div>
                        </div>
            <?php 
            break;
        case 1:
            // one country
            ?>
                        <input class="country_id" id="country_id" type="hidden" name="countryId" value="<?php 
            echo get_country_id($item);
            ?>
" />
            <?php 
            break;
        default:
            // more than one country
            ?>
                        <div class="clearfix">
                            <label><?php 
            echo $country_txt;
            ?>
</label>
                            <div class="input">
                                <select class="country_id" id="country_id" name="countryId">
                                    <option value=""><?php 
            echo $country_select_txt;
            ?>
</option>
                                    <?php 
            foreach ($aCountries as $country) {
                ?>
                                        <option value="<?php 
                echo $country['pk_c_code'];
                ?>
"><?php 
                echo $country['s_name'];
                ?>
</option>
                                    <?php 
            }
            ?>
                                </select>
                            </div>
                        </div>
            <?php 
            break;
    }
}
Ejemplo n.º 2
0
<?php

include BASE_PATH . 'app/utils/initialize.php';
$country_id = get_country_id($first);
echo $twig->render('article.html', array('data' => $data, 'utils' => $utils, 'link' => get_article_link($url), 'countries' => get_countries($first), 'translations' => get_translations($country_id)));
Ejemplo n.º 3
0
?>
" ;
            twitter_theme.max_number_photos       = <?php 
echo osc_max_images_per_item();
?>
 ;
            twitter_theme.photo_remove_text       = "<?php 
_e('Remove', 'twitter_bootstrap');
?>
" ;
            twitter_theme.max_images_fields_txt   = "<?php 
_e('Sorry, you have reached the maximum number of images per ad', 'twitter_bootstrap');
?>
" ;
            twitter_theme.country_select_id       = "<?php 
echo get_country_id(osc_item() != null ? osc_item() : array());
?>
" ;
            twitter_theme.region_select_id        = "<?php 
echo get_region_id(osc_item() != null ? osc_item() : array());
?>
" ;
            twitter_theme.city_select_id          = "<?php 
echo get_city_id(osc_item() != null ? osc_item() : array());
?>
" ;
            twitter_theme.ajax_url                = "<?php 
echo osc_base_url(true) . '?page=ajax';
?>
" ;
            twitter_theme.text_select_country     = "<?php 
  --------------------------------------------------------------*/
defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');
?>
<!-- Adressbearbeitung Anfang //-->
<?php 
if ($_GET['edit_action'] == 'address') {
    //BOC web28 - 2013-02-02 - add dropdown countries boxes
    function get_country_id($country_name)
    {
        $countries_query = xtc_db_query("SELECT countries_id\n                                       FROM " . TABLE_COUNTRIES . "\n                                      WHERE countries_name = '" . xtc_db_input($country_name) . "'");
        $countries = xtc_db_fetch_array($countries_query);
        return $countries['countries_id'];
    }
    $customer_countries_id = get_country_id($order->customer['country']);
    $delivery_countries_id = get_country_id($order->delivery['country']);
    $billing_countries_id = get_country_id($order->billing['country']);
    //EOC web28 - 2013-02-02 - add dropdown countries boxes
    echo xtc_draw_form('adress_edit', FILENAME_ORDERS_EDIT, 'action=address_edit', 'post');
    echo xtc_draw_hidden_field('oID', $_GET['oID']);
    echo xtc_draw_hidden_field('cID', $order->customer['ID']);
    ?>
<!-- Begin Infotext //-->
    <div class="main col-xs-12" style="border: 1px red solid; padding:5px; background: #FFD6D6; margin: 5px 0 5px 0">
      <?php 
    echo TEXT_ORDERS_ADDRESS_EDIT_INFO;
    ?>
    </div>
<!-- End Infotext //-->
<div class='col-xs-12 hidden-xs hidden-sm'> 
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">