File: D:/HostingSpaces/SBogers10/spire.komma-mediadesign.nl/wwwroot/mvc/views/v_wtb_pop_up.php
<?php
session_start();
ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
error_reporting(E_ALL);
include $_SERVER['DOCUMENT_ROOT'] . '/check_x2.php';
if(isset($_GET['id']))
{
$itemId = $_GET['id'];
$catId = $_GET['catId'];
?>
<div id="wtbPopUp">
<label for="countries">Filter reseller by country</label><br />
<select id="countries"><option value="">Select a country</option>
<?php
$countries = array("Worldwide_Shipping","Argentina","Armenia","Australia","Austria","Belgium","Brazil","Bulgaria","Canada","China","Croatia","Czech_Republic","Denmark","Estonia","Finland","France","Germany","Greece","Hungary","Indonesia","Israel","Italy","Japan","Macedonia","Malaysia","Malta","Moldova","Netherlands","New_Zealand","Norway","Poland","Portugal","Romania","Russia","Serbia","Slovakia","Slovenija","South_Africa","Spain","Sweden","Switzerland","Thailand","Ukraine","United_Kingdom","Uruguay","USA");
foreach($countries as $country)
{
echo ' <option value="' . $country . '"';
if(isset($_SESSION['current_country']) && $country == $_SESSION['current_country']) echo ' selected';
echo '>' . str_replace('_',' ',$country) . '</option>';
}
?>
</select><br />
<br />
<?php if (! X2){?>
In case you can’t find a retailer for your desired Spire product,<br />
drop us an email and we’ll help you out. <br /><a href="mailto:info@spire-corp.com" style="color:#E50000">info@spire-corp.com</a>
<?php }else{?>
In case you can’t find a retailer for your desired X2 product,<br />
drop us an email and we’ll help you out. <br /><a href="mailto:info@x2products.com" style="color:#E50000">info@x2products.com</a>
<?php } ?>
<br />
<br />
<ul id="resellers" class="resellers">
<li><h2>Please select a country.</h2></li>
</ul>
</div>
<script type="text/javascript">
<?php if(isset($_SESSION['current_country']) && ! empty($_SESSION['current_country'])){ ?>
$('#resellers').load('/mvc/views/v_wtb_pop_up_resellers.php?id=<?php echo $itemId; ?>&catId=<?php echo $catId; ?>&countries=<?php echo $_SESSION['current_country']; ?>',
function(){
$('.ctaButton').hover(function(){
$('.hover',this).stop().animate({ opacity: 1 },200);
},function(){
$('.hover',this).stop().animate({ opacity: 0 },200);
});
});
<?php }?>
$('#countries').change(function()
{
if ($(this).val() != '')
{
$('#resellers').load('/mvc/views/v_wtb_pop_up_resellers.php?id=<?php echo $itemId; ?>&catId=<?php echo $catId; ?>&countries=' + $(this).val(),function()
{
$('.ctaButton').hover(function(){
$('.hover',this).stop().animate({ opacity: 1 },200);
},function(){
$('.hover',this).stop().animate({ opacity: 0 },200);
});
});
}
else
{
$('#resellers').html('<li><h2>Please select a country.</h1></li>');
}
});;
</script>
<?php } ?>