Example #1
0
function exec_gh_pages()
{
    ob_start();
    require_once 'www/gh-index.php';
    mkdir('gh-pages');
    $data = ob_get_clean();
    if ($f = fopen('gh-pages/index.html', 'w+')) {
        fwrite($f, $data);
        fclose($f);
    }
    $countries = get_countries();
    /** @var Country $country */
    foreach ($countries as $country) {
        $filename = slugify($country->getCode3l()) . '.html';
        if ($f = fopen('gh-pages/' . $filename, 'w+')) {
            $_GET['code'] = $country->getCode3l();
            ob_start();
            $page_title = $country->getNameOfficial();
            require 'www/includes/header.inc';
            require 'www/detail.php';
            require 'www/includes/footer.inc';
            $data = ob_get_clean();
            fwrite($f, $data);
            fclose($f);
        }
    }
}
Example #2
0
function get_country_field()
{
    echo "<div class='th'>Country</div><select name='country'><option value=''>All Countries</option>";
    foreach (get_countries() as $key => $value) {
        echo "<option value='{$key}'>{$value}</option>";
    }
    echo "</select>";
}
Example #3
0
 /**
  *
  * @SWG\Api(
  *   path="/bootstrap",
  *   description="API for generic utility actions",
  * @SWG\Operation(
  *    method="GET",
  *    type="array[Object]",
  *    summary="Returns an object with lookup data for the front-end"
  *   )
  * )
  */
 public function bootstrap_get()
 {
     $this->load->model('Plan');
     $response = new stdClass();
     $response->token = $this->twilio_token();
     $response->stripe_key = $this->config->item('stripe_public_key');
     $response->plans = $this->Plan->get_all();
     $response->timezones = get_timezones();
     $response->countries = get_countries();
     $this->response($response);
 }
Example #4
0
 /**
  * Загрузка списка разрешенных стран
  *
  */
 private function _loadAllowedCountriesList()
 {
     $this->_allowedCountriesList = array();
     $CI =& get_instance();
     $CI->load->helper('location');
     $countries = get_countries();
     foreach ($countries as $country) {
         if (!$country['banned']) {
             array_push($this->_allowedCountriesList, $country['iso']);
         }
     }
 }
/**
 * Render select box for Countries
 * 
 * Parameters:
 * 
 * - all HTML attributes
 * - value - value of selected country
 * @param array $params
 * @param Smarty $smarty
 * @return string
 */
function smarty_function_select_country($params, &$smarty)
{
    $value = null;
    if (isset($params['value'])) {
        $value = (int) array_var($params, 'value');
        unset($params['value']);
    }
    // if
    $countries = get_countries();
    $options = array();
    foreach ($countries as $code => $country) {
        $option_attributes = $value == $code ? array('selected' => true) : null;
        $options[] = option_tag($country, $code, $option_attributes);
    }
    // if
    return select_box($options, $params);
}
Example #6
0
 public function edit_profile()
 {
     if ($this->session->userdata('is_logged_in')) {
         $email = $this->session->userdata('email');
         $user_data = $this->User_model->get_user_data($email);
         $id = $user_data['id'];
         $profile_data = $this->User_model->get_user_profile($id);
         $this->load->helper('common');
         $view_data['statelist'] = get_states();
         $view_data['countries'] = get_countries();
         $view_data['title'] = "Edit My Profile";
         $view_data['page_header'] = "User Profile for: <strong>" . $user_data['first'] . " " . $user_data['last'] . "</strong>";
         $data = array_merge($view_data, $user_data, $profile_data);
         $audit = array('primary' => 'PROF', 'secondary' => 'UPDV', 'status' => true, 'controller' => 'Profile', 'value' => $id, 'extra_1' => null, 'extra_2' => null, 'extra_3' => null);
         $this->Audit_model->log_entry($audit);
         $this->load->view("header", $data);
         $this->load->view("navbar", $data);
         $this->load->view('edit_profile_view', $data);
         $this->load->view("footer", $data);
     } else {
         redirect('User/restricted');
     }
 }
 function setup_countries()
 {
     global $Shopp;
     include_once "init.php";
     $this->Settings->save('countries', addslashes(serialize(get_countries())), false);
 }
Example #8
0
<?php

$resident_id = get_the_ID();
$resident_slug = $post->post_name;
$resident = get_post($resident_id);
$countries = get_countries($resident_id);
$countries_array = get_field('country', $resident_id);
$name = get_the_title();
$bio = get_field('bio', $resident_id);
$website = http(get_field('website', $resident_id));
$studio_number = get_field('studio_number', $resident_id);
$resident_type = get_field('resident_type', $resident_id);
$residencies = array();
$resident_classes = 'resident single';
$residents_id = get_page_by_path('residents')->ID;
$residents_url = preg_replace('{/$}', '', get_permalink($residents_id));
if (is_past($resident_id)) {
    $resident_classes .= ' past';
}
if (have_rows('gallery') == false) {
    $resident_classes .= ' one_col';
}
?>
<section <?php 
section_attr($resident_id, $resident_slug, $resident_classes);
?>
>
	<?php 
get_template_part('partials/nav');
?>
	<?php 
Example #9
0
function get_country_by_name($country = '')
{
    $c = get_countries();
    foreach ($c as $code => $name) {
        if (strtolower($country) === strtolower($name)) {
            return $code;
            break;
        }
    }
    return "";
}
Example #10
0
                        echo "checked=\"checked\"";
                    }
                    ?>
 /> Yes</label>
					<label><input type="radio" id="dispemailno" name="dispemail" value="no" <?php 
                    if ($memary['2'] == "no") {
                        echo "checked=\"checked\"";
                    }
                    ?>
 /> No</label> Display E-mail?<br />
					<label><input type="text" id="url" name="url" value="<?php 
                    echo $memary['3'];
                    ?>
" /> Website</label><br />
					<label><select name="country" id="country"><?php 
                    get_countries($memary['4']);
                    ?>
</select> Country</label><br />
<?php 
                    if (isset($favefield) && $favefield == "yes") {
                        ?>
						<label><input type="text" id="fave" name="fave" value="<?php 
                        echo $memary['5'];
                        ?>
" /> <?php 
                        echo $favetext;
                        ?>
</label><br />
<?php 
                    }
                    ?>
Example #11
0
echo set_value('city', $address['city']);
?>
" />
                    <?php 
echo form_error('city', '<span class="error_text">', '</span>');
?>
                </div>
            </div>

            <div class="basic-grey">
                <div class="left">
                    <label>Country</label>
                </div>
                <div class="right">
                    <?php 
echo form_dropdown('country', get_countries(), set_value('country', $address['country']));
?>
                    <?php 
echo form_error('country', '<span class="error_text">', '</span>');
?>
                </div>
            </div>

            <div class="basic-grey">
                <div class="left">
                    &nbsp;
                </div>
                <div class="right">
                    <input type="submit" class="button" value="Save"/>
                </div>
            </div>
Example #12
0
 public function update($id)
 {
     if ($this->session->userdata('is_logged_in') && $this->has_permission_to_edit()) {
         $user_data = $this->User_model->get_user($id);
         $profile_data = $this->User_model->get_user_profile($id);
         $data = array_merge($user_data, $profile_data);
         $this->load->helper('common');
         $data['statelist'] = get_states();
         $data['countries'] = get_countries();
         $lookup['selected_roles'] = $this->User_model->list_user_roles($id);
         $lookup['active_roles'] = $this->Roles_permissions_model->list_active_roles();
         $active_roles = array();
         foreach ($lookup['active_roles'] as $role) {
             $role_id = $role->id;
             $role = $role->role;
             $active_roles[$role_id] = $role;
         }
         $selected_roles = array();
         foreach ($lookup['selected_roles'] as $role) {
             $selected_roles[] = $role->role_id;
         }
         $data['id'] = $id;
         $data['active'] = $active_roles;
         $data['selected'] = $selected_roles;
         $data['title'] = "Edit the user";
         $data['page_header'] = "Edit the user";
         $audit = array('primary' => 'USRA', 'secondary' => 'UPDV', 'status' => true, 'controller' => 'UserAdmin', 'value' => $id, 'extra_1' => null, 'extra_2' => null, 'extra_3' => null);
         $this->Audit_model->log_entry($audit);
         $this->load->view("header", $data);
         $this->load->view("navbar", $data);
         $this->load->view('edit_user_view', $data);
         $this->load->view("footer", $data);
     } else {
         redirect('User/restricted');
     }
 }
Example #13
0
function form_countries($name, $value, $attrs = '')
{
    echo form_dropdown($name, get_countries(), $value, 'id="' . $name . '" ' . $attrs);
}
function pmproan2c_pmpro_checkout_after_email()
{
    global $pmpro_required_user_fields;
    $pmpro_required_user_fields["first_name"] = "";
    $pmpro_required_user_fields["last_name"] = "";
    $pmpro_required_user_fields["country"] = "";
    $pmpro_required_user_fields["state"] = "";
    $pmpro_required_user_fields["city"] = "";
    $pmpro_required_user_fields["address"] = "";
    $pmpro_required_user_fields["zipcode"] = "";
    $pmpro_required_user_fields["phone"] = "";
    $first_name = get_field_value("first_name");
    $last_name = get_field_value("last_name");
    $country = get_field_value("country");
    $state = get_field_value("state");
    $city = get_field_value("city");
    $address = get_field_value("address");
    $zipcode = get_field_value("zipcode");
    $phone = get_field_value("phone");
    $country_code = get_field_value("country_code");
    if ($phone) {
        $phoneUtil = \libphonenumber\PhoneNumberUtil::getInstance();
        try {
            $numberProto = $phoneUtil->parse($phone, strtoupper($country_code));
            $phone = $phoneUtil->format($numberProto, \libphonenumber\PhoneNumberFormat::INTERNATIONAL);
        } catch (\libphonenumber\NumberParseException $e) {
            //var_dump($e);
        }
    }
    ?>

	<div>
		<label for="first_name">First Name</label>
		<input
			id="first_name"
			name="first_name"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('first_name');
    ?>
"
			size="30"
			value="<?php 
    echo $first_name;
    ?>
" />
	</div>

	<div>
		<label for="last_name">Last Name</label>
		<input
			id="last_name"
			name="last_name"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('last_name');
    ?>
"
			size="30"
			value="<?php 
    echo $last_name;
    ?>
" />
	</div>

	<div>
		<label for="country">Country</label>
		<select
			id="country"
			name="country"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('country');
    ?>
">
			<?php 
    echo get_countries($country);
    ?>
		</select>
	</div>

	<div>
		<label for="state">State</label>
		<input
			id="state"
			name="state"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('state');
    ?>
"
			size="30"
			value="<?php 
    echo $state;
    ?>
" />
	</div>

	<div>
		<label for="city">City</label>
		<input
			id="city"
			name="city"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('city');
    ?>
"
			size="30"
			value="<?php 
    echo $city;
    ?>
" />
	</div>

	<div>
		<label for="address">Street</label>
		<input
			id="address"
			name="address"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('address');
    ?>
"
			size="30"
			value="<?php 
    echo $address;
    ?>
" />
	</div>

	<div>
		<label for="zipcode">Zip Code</label>
		<input
			id="zipcode"
			name="zipcode"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('zipcode');
    ?>
"
			size="30"
			value="<?php 
    echo $zipcode;
    ?>
" />
	</div>

	<div>
		<label for="phone">Phone Number</label>
		<input
			id="phone"
			name="phone"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('phone');
    ?>
"
			size="30"
			value="<?php 
    echo $phone;
    ?>
" />
	</div> 

	<input
		id="country_code"
		name="country_code"
		type="hidden"
		value="<?php 
    echo $country_code;
    ?>
" />

	<div class="<?php 
    echo pmpro_getClassForField('agree');
    ?>
 pmpro_checkbox" style="clear: both;">
		<input
			type="checkbox"
			name="agree"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('agree');
    ?>
">
			I agree to <a href="javascript:void(0)" data-toggle="modal" data-target="#myModal">Terms and Conditions</a>
	</div>

	<?php 
}
Example #15
0
<?php

include BASE_PATH . 'app/utils/initialize.php';
$country_id = get_country_id($first);
echo $twig->render('index.html', array('data' => $data, 'utils' => $utils, 'countries' => get_countries($first), 'articles' => get_articles($country_id), 'authors' => get_unique_authors($country_id), 'translations' => get_translations($country_id)));
?>

Example #16
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)));
Example #17
0
 function selection()
 {
     global $order;
     $countries = get_countries();
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     for ($i = 1; $i < 32; $i++) {
         $dom[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     for ($i = $today['year'] - 10; $i <= $today['year']; $i++) {
         $starts_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     if (isset($_SESSION["agent_id"]) && !empty($_SESSION["agent_id"])) {
         $QUERY = "SELECT login as username, credit, lastname, firstname, address, city, state, country, zipcode, phone, email, fax, '1', currency FROM cc_agent WHERE id = '" . $_SESSION["agent_id"] . "'";
     } elseif (isset($_SESSION["card_id"]) && !empty($_SESSION["card_id"])) {
         $QUERY = "SELECT username, credit, lastname, firstname, address, city, state, country, zipcode, phone, email, fax, status, currency FROM cc_card WHERE id = '" . $_SESSION["card_id"] . "'";
     } else {
         echo "ERROR";
         die;
     }
     $DBHandle = DbConnect();
     $resmax = $DBHandle->query($QUERY);
     $numrow = $resmax->numRows();
     if ($numrow == 0) {
         exit;
     }
     $customer_info = $resmax->fetchRow();
     if ($customer_info[12] != "1") {
         exit;
     }
     $name = $customer_info['firstname'] . ' ' . $customer_info['lastname'];
     $addr1 = $customer_info['address'];
     $addr2 = $customer_info['city'];
     $addr3 = $customer_info['state'];
     $phone = $customer_info['phone'];
     $postcode = $customer_info['zipcode'];
     $countrycode = $customer_info['country'];
     $QUERY = "select countryname from cc_country where countrycode = '{$countrycode}'";
     $resmax = $DBHandle->query($QUERY);
     $numrow = $resmax->numRows();
     $cid = -1;
     if ($numrow == 0) {
         write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . " Country not found");
     } else {
         $country_info = $resmax->fetchRow();
         $country = $country_info['countryname'];
         for ($i = 0; $i < sizeof($countries); $i++) {
             if ($country == $countries[$i]['text']) {
                 $cid = $countries[$i]['id'];
             }
         }
     }
     $selection = array('id' => $this->code, 'module' => $this->title . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $this->get_cc_images(), 'fields' => array(array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('CardName', $name) . ' (Override the default values if different )'), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_ADDR1, 'field' => tep_draw_input_field('Addr1', $addr1)), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_ADDR2, 'field' => tep_draw_input_field('Addr2', $addr2)), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_ADDR3, 'field' => tep_draw_input_field('Addr3', $addr3)), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_POSTCODE, 'field' => tep_draw_input_field('PostCode', $postcode)), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_COUNTRY, 'field' => tep_draw_pull_down_menu('Country', $countries, $cid)), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_TELEPHONE, 'field' => tep_draw_input_field('Telephone', $phone)), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('CardNumber')), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_STARTS, 'field' => tep_draw_pull_down_menu('StartDateMonth', $expires_month) . '&nbsp;' . tep_draw_pull_down_menu('StartDateYear', $starts_year)), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('ExpiryDateMonth', $expires_month) . '&nbsp;' . tep_draw_pull_down_menu('ExpiryDateYear', $expires_year)), array('title' => MODULE_PAYMENT_IRIDIUM_TEXT_ISSUE_NUMBER, 'field' => tep_draw_input_field('IssueNumber', '', "SIZE=5, MAXLENGTH=5") . '(Switch/Solo/Maestro only)'), array('title' => 'CV2 ' . ' ' . '<a href="#" onclick="javascript:window.open(\'' . 'cvv.php' . '\',\'CardNumberSelection\',\'width=600,height=280,top=20,left=100,scrollbars=1\');">' . '<u><i>' . '(' . MODULE_PAYMENT_IRIDIUM_TEXT_CVV_LINK . ')' . '</i></u></a>', 'field' => tep_draw_input_field('CV2', '', "SIZE=4, MAXLENGTH=4"))));
     return $selection;
     /*
              array ('title' => MODULE_PAYMENT_IRIDIUM_TEXT_CREDIT_CARD_DOB,
                                     'field' => tep_draw_pull_down_menu('DOB_day', $dom) . '&nbsp;' .
                                     tep_draw_pull_down_menu('DOB_month', $expires_month) . '&nbsp;' .
                                     tep_draw_pull_down_menu('DOB_year', $dob_year)), */
 }
Example #18
0
function select_country_tag($name, $value = null, $options = array(), $html_options = array())
{
    $select_options = get_countries();
    return select_tag($name, options_for_select($select_options, $value), $html_options);
}
Example #19
0
        break;
    case 'getDetalleAtencion':
        getDetalleAtencion($_REQUEST['fechIni'], $_REQUEST['fechFin'], $_REQUEST['medCod']);
        break;
    case 'getAgendamiento':
        getAgendamiento($_REQUEST['fechIni'], $_REQUEST['fechFin'], $_REQUEST['medCod']);
        break;
    case 'sugerenciaSecretaria':
        $busqueda = strtoupper($_REQUEST['name_startsWith']);
        getDatosSecretaria($busqueda);
        break;
    case 'getDiasFestivos':
        getDiasFestivos();
        break;
    case 'getCountries':
        get_countries();
        break;
    default:
        # code...
        break;
}
function cancelarCita($cit)
{
    global $conexionPDO;
    if (session_status() == PHP_SESSION_NONE) {
        session_start();
    }
    $clinica = $_SESSION['datos_especialista']['esp_empresa'];
    $cit = addslashes($cit);
    $sql = "UPDATE citas\n                SET cit_estado = 'CANCELADA'\n                WHERE cit_estado = 'ACTIVA'\n                AND cit_id = :citid AND cli_id = :clinica ; \n               UPDATE disponibilidad dis\n               INNER JOIN citas  cit   ON cit.cit_id = dis.cit_id AND cit.cit_fecha = dis.dis_fecha AND cit.cit_hora = dis.dis_hora\n               INNER JOIN agenda age   ON age.age_id = dis.age_id AND age.age_fechaInicio = dis.dis_fecha\n               SET dis.cit_id = 0\n               WHERE dis.cit_id = :citid\n               AND cit.cit_estado = 'CANCELADA'";
    $resul = $conexionPDO->ejecutarConsulta($sql, conexion::CON_MOD, array(':clinica' => $clinica, ':citid' => $cit));
Example #20
0
function acf_load_color_field_choices($field)
{
    // reset choices
    $field['choices'] = array();
    $choices = get_countries();
    // loop through array and add to field 'choices'
    if (is_array($choices)) {
        foreach ($choices as $choice) {
            $field['choices'][$choice] = $choice;
        }
    }
    // return the field
    return $field;
}
Example #21
0
    get_data("name");
    ?>
" /> <br />
	<label>E-mail *</label><br /> <input type="text" id="email" name="email" value="<?php 
    get_data("email");
    ?>
" /> <br />
	<label>Display E-mail?</label><br />
	<input type="radio" id="dispemailyes" name="dispemail" value="yes" checked="checked" /> Yes
	<input type="radio" id="dispemailno" name="dispemail" value="no" /> No<br />
	<label>Website</label><br /> <input type="text" id="url" name="url"  value="<?php 
    get_data("url");
    ?>
" /> <br />
	<label>Country *</label><br /> <select name="country" id="country"><option value="null">Please select a country:</option><?php 
    get_countries($country);
    ?>
</select> <br />
<?php 
    if (isset($favefield) && $favefield == "yes") {
        ?>
	<label><?php 
        echo $favetext;
        ?>
</label><br /> <input type="text" id="fave" name="fave"  value="<?php 
        get_data("fave");
        ?>
" /> <br />
<?php 
    }
    if (isset($captcha) && $captcha == "yes") {
Example #22
0
    if ($error_msg != NULL) {
        echo "<p><strong style='color: red;'>ERROR:</strong><br />";
        echo nl2br($error_msg) . "</p>";
    }
    ?>

<form action="update.php" method="post"><p>
	<label>Name *</label><br /> <input type="text" id="name" name="name" /> <br />
	<label>Old E-mail *</label><br /> <input type="text" id="email" name="email" /> <br />
	<label>New E-mail</label><br /> <input type="text" id="newemail" name="newemail" /> <br />
	<label>Display E-mail?</label><br />
	<input type="radio" id="dispemailyes" name="dispemail" value="yes" checked="checked" /> Yes
	<input type="radio" id="dispemailno" name="dispemail" value="no" /> No<br />
	<label>New Website?</label><br /> <input type="text" id="newurl" name="newurl" value="http://" /> <br />
	<label>Country *</label><br /> <select name="country" id="country"><option value="null">Please select a country:</option><?php 
    get_countries("null");
    ?>
</select> <br />
<?php 
    if (isset($captcha) && $captcha == "yes") {
        ?>
	<img src="captcha.php" alt="" /><br />
	<label>Captcha</label><br /> <input type="text" name="captcha" id="captcha" /> <br />
<?php 
    }
    ?>
	<label>Comments</label><br /> 
	<textarea name="comments" id="comments" rows="3" cols="25"></textarea><br />
	<input type="submit" name="submit" id="submit" value="Update" /> 
</p></form>
Example #23
0
function wppb_output_display_form_field_country($html, $form_type, $field)
{
    $value = get_user_meta(get_current_user_id(), $field['meta-name'], true);
    $html .= '<label for="' . $field['meta-name'] . '">' . $field['field-title'] . '<span class="wppb-required" title="This field is required">*</span></label>';
    $html .= '<select name="' . $field['meta-name'] . '" id="' . $field['meta-name'] . '">';
    $html .= get_countries($value);
    $html .= '</select>';
    return $html;
}
<?php

/**
 * template name:Visualization
 */
get_header();
?>

<?php 
$prod_val = '';
$disable = 'disabled="disabled"';
if (isset($_GET['prod']) && !empty($_GET['prod'])) {
    $prod_val = $_GET['prod'];
    $disable = '';
}
$countries = get_countries();
$current_country = get_ip_to_country();
?>

<div id="content">
		<div class="post cmaps" id="post-<?php 
the_ID();
?>
">
		<h2>Top participating countries - Alternate Products</h2>
		<?php 
echo do_shortcode('[visualizer id="68"]');
?>
		</div>
		<hr>
		<div class="post cmaps" id="post-<?php 
 function countries_dropdown($table, $selected = '', $value)
 {
     $parameters = get_countries();
     $options = array();
     $options[''] = "";
     if (is_array($parameters)) {
         foreach ($parameters as $parameter) {
             $options[$parameter->id] = $parameter->name;
         }
         $CI =& get_instance();
         $CI->load->helper('form');
         $css = 'class="lapseClass" id=' . $table . '_id';
         return form_dropdown($table . '_id', $options, $selected, $css);
     }
 }