Esempio n. 1
0
    echo $conf_images_path;
    ?>
waiting.gif" title="" alt="" /></div>
        </div></td>
    </tr>
    <tr>
      <td style="padding-top:10px;"><div class="small_text">
          <?php 
    echo country;
    ?>
        </div>
        <div style="position:relative;">
        <?php 
    $ob_table = new table('countries');
    $arr_fields = array('tra_name', 'alt_name', 'relevancy');
    $arr_countries = dump_table2($ob_table->get_translated_table_name(), 'country_id', $arr_fields, ' WHERE active_ind = \'1\'');
    //		pa($arr_countries);
    ?>
          <select name="country" class="input_normal"  id="country-selector" style="width: 250px;" onblur="JavaScript:check_value('country','');" />
          <?php 
    if (!$_POST['country']) {
        $_POST['country'] = 'ES';
    }
    foreach ($arr_countries as $country) {
        echo '<option value="' . $country['country_id'] . '" data-alternative-spellings="' . $country['alt_name'] . '"';
        if ($country['relevancy'] != '1') {
            echo ' data-relevancy-booster="' . $country['relevancy'] . '"';
        }
        if (strtoupper($country['country_id']) == $_POST['country']) {
            echo ' selected="selected"';
        }
Esempio n. 2
0
function print_languages_flags()
{
    global $conf_images_path, $conf_main_page;
    $languages = dump_table2('languages', 'lan_id', array('lan_local_name', 'flag_icon'), ' WHERE active_ind = \'1\'');
    $get_str = '';
    $first = true;
    foreach ($_GET as $key => $value) {
        if ($key != 'lang') {
            if ($first) {
                $first = false;
            } else {
                $get_str .= '&';
            }
            if ($key != 'lan') {
                $get_str .= $key . '=' . $value;
            }
        }
    }
    foreach ($languages as $tag => $lang) {
        $sep = $get_str ? '&' : '';
        $link = basename($_SERVER['PHP_SELF']) . '?' . $get_str . $sep . 'lang=' . $tag;
        echo '<a href="' . $link . '"><img align="absmiddle" src="' . $conf_images_path . 'lan/' . $lang['flag_icon'] . '" title="' . $lang['lan_local_name'] . '" alt="' . $lang['lan_local_name'] . '" width="18" height="12" border="0" /></a> ';
    }
}