2001-06-19 02:44:04 +02:00
|
|
|
<?php
|
2005-11-09 00:15:14 +01:00
|
|
|
/**************************************************************************\
|
|
|
|
* eGroupWare - holidaycalc *
|
|
|
|
* http://www.egroupware.org *
|
|
|
|
* Based on Yoshihiro Kamimura <your@itheart.com> *
|
|
|
|
* http://www.itheart.com *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* This program is free software; you can redistribute it and/or modify it *
|
|
|
|
* under the terms of the GNU General Public License as published by the *
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
|
|
* option) any later version. *
|
|
|
|
\**************************************************************************/
|
2001-06-19 02:44:04 +02:00
|
|
|
|
2005-11-09 00:15:14 +01:00
|
|
|
/* $Id$ */
|
2001-06-19 02:44:04 +02:00
|
|
|
|
2006-09-03 07:12:42 +02:00
|
|
|
if (empty($GLOBALS['egw_info']['user']['preferences']['common']['country']) ||
|
|
|
|
strlen($GLOBALS['egw_info']['user']['preferences']['common']['country']) > 2)
|
2001-06-19 02:44:04 +02:00
|
|
|
{
|
2001-06-20 17:34:39 +02:00
|
|
|
$rule = 'US';
|
2001-06-19 02:44:04 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-11-09 00:15:14 +01:00
|
|
|
$rule = $GLOBALS['egw_info']['user']['preferences']['common']['country'];
|
2001-06-19 02:44:04 +02:00
|
|
|
}
|
|
|
|
|
2005-11-09 00:15:14 +01:00
|
|
|
$calc_include = EGW_INCLUDE_ROOT.'/calendar/inc/class.holidaycalc_'.$rule.'.inc.php';
|
2001-06-25 00:19:06 +02:00
|
|
|
if(@file_exists($calc_include))
|
|
|
|
{
|
|
|
|
include($calc_include);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-11-09 00:15:14 +01:00
|
|
|
include(EGW_INCLUDE_ROOT.'/calendar/inc/class.holidaycalc_US.inc.php');
|
2001-06-25 00:19:06 +02:00
|
|
|
}
|