0) { $country = strtolower($_REQUEST["country"]); $countryCode = strtolower($_REQUEST["country"]); } if(isset($_REQUEST["region"]) && strcmp($_REQUEST["region"], "all") != 0) { $region = $_REQUEST["region"]; } $result = $client->call('getPublicHolidaysForYear', array('year' => $year, 'country' => $countryCode, 'region' => $region)); $output = ""; $countries = array(); $regions = array(); if(checkWsError($client)) { // Check for errors from enrico if(strlen($result["error"]) > 0) { die("Error from Enrico: " . $result["error"]); } else { for($i=0; $i"; $output .= "" . ($i+1) . "."; $output .= convertDateToString($result["publicHolidays"][$i]["date"]) . "
" . getDayOfWeek($result["publicHolidays"][$i]["date"]["dayOfWeek"]) . "" . $result["publicHolidays"][$i]["localName"] . ""; $output .= "" . $result["publicHolidays"][$i]["englishName"] . ""; if(isset($result["publicHolidays"][$i]["note"])) $output .= "Note: " . $result["publicHolidays"][$i]["note"] . ""; $output .= ""; } } $result = $client->call('getSupportedCountries', array()); if(checkWsError($client) && (!isset($result["error"]) || strlen($result["error"]) == 0)) { for($i = 0; $i < count($result["supportedCountries"]); $i++) { $countries[$result["supportedCountries"][$i]["countryCode"]] = $result["supportedCountries"][$i]["fullName"]; if($result["supportedCountries"][$i]["countryCode"] == $country) { $country = $result["supportedCountries"][$i]["fullName"]; $fromDate = convertDateToString($result["supportedCountries"][$i]["fromDate"]); $toDate = convertDateToString($result["supportedCountries"][$i]["toDate"]); $maxYear = $result["supportedCountries"][$i]["toDate"]["year"]; } if(isset($result["supportedCountries"][$i]["regions"]) && count($result["supportedCountries"][$i]["regions"]) > 0) { $regions[$result["supportedCountries"][$i]["countryCode"]] = array(); if(strcmp($result["supportedCountries"][$i]["countryCode"], "fra") == 0) { array_push($regions[$result["supportedCountries"][$i]["countryCode"]], "all"); } for($j = 0; $j < count($result["supportedCountries"][$i]["regions"]); $j++) { array_push($regions[$result["supportedCountries"][$i]["countryCode"]], $result["supportedCountries"][$i]["regions"][$j]); } } } } } else { die("ERROR: calling webservice failed"); } ?> Public holidays in <?php $txt = $country . " (" . $year . ")" ; if(strlen($region) > 0) $txt = $country . " - " . $region . " (" . $year . ")"; echo $txt; ?>
banner
Displaying public holidays in 0) echo " (" . $region . ")"?> for year
Public holidays for 0) echo " (" . $region . ")" ?> are available starting from to
Country:
Region: " />
Year:
$maxYear) { $minYear = $maxYear - 5; } $c = $country; if(strlen($region) > 0) { $c .= " (" . $region . ")"; } for($i = 1; $i < 6; $i++) { $href = "public_holidays.php?country=" . $countryCode . "&region=" . urlencode($region) . "&year=" . ($minYear + $i); echo "" . ($minYear + $i) . ""; } ?> or type
Powered by Enrico Service. If you have any questions, suggestions or corrections please send it to enrico@kayaposoft.com. Thank you for helping us keep Enrico Service up-to-date.