forked from extern/egroupware
some sanatizing ;-)
This commit is contained in:
parent
215f4e0b66
commit
938adaa786
34
calendar/inc/class.holidaycalc.inc.php
Executable file
34
calendar/inc/class.holidaycalc.inc.php
Executable file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if (empty($GLOBALS['egw_info']['user']['preferences']['common']['country']) ||
|
||||
strlen($GLOBALS['egw_info']['user']['preferences']['common']['country']) > 2)
|
||||
{
|
||||
$rule = 'US';
|
||||
}
|
||||
else
|
||||
{
|
||||
$rule = $GLOBALS['egw_info']['user']['preferences']['common']['country'];
|
||||
}
|
||||
|
||||
$calc_include = EGW_INCLUDE_ROOT.'/calendar/inc/class.holidaycalc_'.$rule.'.inc.php';
|
||||
if(@file_exists($calc_include))
|
||||
{
|
||||
include($calc_include);
|
||||
}
|
||||
else
|
||||
{
|
||||
include(EGW_INCLUDE_ROOT.'/calendar/inc/class.holidaycalc_US.inc.php');
|
||||
}
|
Loading…
Reference in New Issue
Block a user