= $lngDateFrom) ? true : false; break;
case $atm_arrDisplayTypes[1]: $returnValue = (($lngDateFrom <= $atm_objPublisherCurrentDate) && ($lngDateTo >= $atm_objPublisherCurrentDate)) ? true : false; break;
case $atm_arrDisplayTypes[2]: $returnValue = ($atm_objPublisherCurrentDate < $lngDateTo) ? true : false; break;
}
return $returnValue;
}
function atm_fncBlnPublisherRepeatableDates ($intHoursFrom, $intMinutesFrom, $intMonthFrom, $intDayFrom, $intHoursTo, $intMinutesTo, $intMonthTo, $intDayTo, $strDisplayType) {
$returnValue = false;
global $atm_arrDisplayTypes, $atm_objPublisherCurrentDate;
@$lngDateFrom = mktime($intHoursFrom, $intMinutesFrom, 0, $intMonthFrom, $intDayFrom);
@$lngDateTo = mktime($intHoursTo, $intMinutesTo, 59, $intMonthTo, $intDayTo);
switch ($strDisplayType) {
case $atm_arrDisplayTypes[0]: $returnValue = ($atm_objPublisherCurrentDate >= $lngDateFrom) ? true : false; break;
case $atm_arrDisplayTypes[1]: $returnValue = (($lngDateFrom <= $atm_objPublisherCurrentDate) && ($lngDateTo >= $atm_objPublisherCurrentDate)) ? true : false; break;
case $atm_arrDisplayTypes[2]: $returnValue = ($atm_objPublisherCurrentDate < $lngDateTo) ? true : false; break;
}
return $returnValue;
}
function atm_fncBlnPublisherBetweenHoursAndMinutes ($intHoursFrom, $intMinutesFrom, $intHoursTo, $intMinutesTo, $strDisplayType) {
$returnValue = false;
global $atm_arrDisplayTypes, $atm_objPublisherCurrentDate;
@$lngDateFrom = mktime($intHoursFrom, $intMinutesFrom);
@$lngDateTo = mktime($intHoursTo, $intMinutesTo);
switch ($strDisplayType) {
case $atm_arrDisplayTypes[0]: $returnValue = ($atm_objPublisherCurrentDate >= $lngDateFrom) ? true : false; break;
case $atm_arrDisplayTypes[1]: $returnValue = (($lngDateFrom <= $atm_objPublisherCurrentDate) && ($lngDateTo >= $atm_objPublisherCurrentDate)) ? true : false; break;
case $atm_arrDisplayTypes[2]: $returnValue = ($atm_objPublisherCurrentDate < $lngDateTo) ? true : false; break;
}
return $returnValue;
}
function atm_fncBlnPublisherBetweenMonths ($intMonthFrom, $intMonthTo, $strDisplayType) {
$returnValue = false;
global $atm_arrDisplayTypes, $atm_objPublisherCurrentMonth;
switch ($strDisplayType) {
case $atm_arrDisplayTypes[0]: $returnValue = ($atm_objPublisherCurrentMonth >= $intMonthFrom) ? true : false; break;
case $atm_arrDisplayTypes[1]: $returnValue = (($atm_objPublisherCurrentMonth >= $intMonthFrom) && ($atm_objPublisherCurrentMonth <= $intMonthTo)) ? true : false; break;
case $atm_arrDisplayTypes[2]: $returnValue = ($atm_objPublisherCurrentMonth < $intMonthTo) ? true : false; break;
}
return $returnValue;
}
function atm_fncBlnPublisherOnToday ($strDays, $strToday) {
$returnValue = false;
$strDays = strtolower($strDays);
$position = strpos($strDays, $strToday);
$returnValue = ($position === false) ? false : true;
return $returnValue;
}
function atm_fncBlnPublisherSecret ($strKey, $strValue) {
$returnValue = false;
if (isset($_GET[$strKey])) { $returnValue = ($_GET[$strKey] === $strValue) ? true : false; }
return $returnValue;
}
function atm_fncBlnPublisherFirstMonthDay () {
$returnValue = false;
global $atm_blnPublisherFirstMonthDay;
$returnValue = $atm_blnPublisherFirstMonthDay;
return $returnValue;
}
function atm_fncBlnPublisherLastMonthDay () {
$returnValue = false;
global $atm_blnPublisherLastMonthDay;
$returnValue = $atm_blnPublisherLastMonthDay;
return $returnValue;
}
function atm_fncBlnPublisherOddDay () {
$returnValue = false;
global $atm_blnPublisherOddDay;
$returnValue = $atm_blnPublisherOddDay;
return $returnValue;
}
function atm_fncBlnPublisherEvenDay () {
$returnValue = false;
global $atm_blnPublisherEvenDay;
$returnValue = $atm_blnPublisherEvenDay;
return $returnValue;
}
function atm_fncBlnPublisherMonthDay ($arrDays) {
$returnValue = false;
global $atm_objPublisherCurrentMonthDay;
foreach ($arrDays as $arrValue) {
if($atm_objPublisherCurrentMonthDay === $arrValue) { $returnValue = true; break; }
}
unset($arrValue);
return $returnValue;
}
function atm_fncBlnPublisherBetweenMonthDays ($intDayFrom, $intDayTo) {
$returnValue = false;
global $atm_objPublisherCurrentMonthDay;
$returnValue = (($atm_objPublisherCurrentMonthDay >= $intDayFrom) && ($atm_objPublisherCurrentMonthDay <= $intDayTo)) ? true : false;
return $returnValue;
return $returnValue;
}
function atm_fncBlnPublisherOddWeek () {
$returnValue = false;
global $atm_blnPublisherOddWeek;
$returnValue = $atm_blnPublisherOddWeek;
return $returnValue;
}
function atm_fncBlnPublisherEvenWeek () {
$returnValue = false;
global $atm_blnPublisherEvenWeek;
$returnValue = $atm_blnPublisherEvenWeek;
return $returnValue;
}
function atm_fncBlnPublisherWeek ($arrWeeks) {
$returnValue = false;
global $atm_objPublisherCurrentWeek;
foreach ($arrWeeks as $arrValue) {
if($atm_objPublisherCurrentWeek === $arrValue) { $returnValue = true; break; }
}
unset($arrValue);
return $returnValue;
}
function atm_fncBlnPublisherBetweenWeeks ($intWeekFrom, $intWeekTo, $strDisplayType) {
$returnValue = false;
global $atm_arrDisplayTypes, $atm_objPublisherCurrentWeek;
switch ($strDisplayType) {
case $atm_arrDisplayTypes[0]: $returnValue = ($atm_objPublisherCurrentWeek >= $intWeekFrom) ? true : false; break;
case $atm_arrDisplayTypes[1]: $returnValue = (($atm_objPublisherCurrentWeek >= $intWeekFrom) && ($atm_objPublisherCurrentWeek <= $intWeekTo)) ? true : false; break;
case $atm_arrDisplayTypes[2]: $returnValue = ($atm_objPublisherCurrentWeek < $intWeekTo) ? true : false; break;
}
return $returnValue;
}
$atm_arrDisplayTypes = array("starting", "between", "before");
$atm_objPublisherCurrentDate = 0;
$atm_objPublisherCurrentDay = '';
$atm_objPublisherCurrentMonthDay = '';
$atm_objPublisherCurrentMonth = '';
$atm_objPublisherCurrentMonthDays = '';
$atm_objPublisherCurrentWeek = '';
$atm_blnPublisherFirstMonthDay = '';
$atm_blnPublisherLastMonthDay = '';
$atm_blnPublisherOddDay = '';
$atm_blnPublisherEvenDay = '';
$atm_blnPublisherOddWeek = '';
$atm_blnPublisherEvenWeek = '';
$atm_objPublisherCurrentDateNoYear = '';
@date_default_timezone_set("Europe/Amsterdam");
@$atm_objPublisherCurrentDate = strtotime('now');
@$atm_objPublisherCurrentDay = Date('D');
@$atm_objPublisherCurrentMonthDay = Date('j');
@$atm_objPublisherCurrentMonth = Date('n');
@$atm_objPublisherCurrentMonthDays = Date('t');
@$atm_objPublisherCurrentWeek = intval(Date('W'));
@$atm_blnPublisherFirstMonthDay = $atm_objPublisherCurrentMonthDay == 1;
@$atm_blnPublisherLastMonthDay = $atm_objPublisherCurrentMonthDay == $atm_objPublisherCurrentMonthDays;
@$atm_blnPublisherOddDay = ($atm_objPublisherCurrentMonthDay % 2 != 0) ? true : false;
@$atm_blnPublisherEvenDay = ($atm_objPublisherCurrentMonthDay % 2 == 0) ? true : false;
@$atm_blnPublisherOddWeek = ($atm_objPublisherCurrentWeek % 2 != 0) ? true : false;
@$atm_blnPublisherEvenWeek = ($atm_objPublisherCurrentWeek % 2 == 0) ? true : false;
@$atm_objPublisherCurrentDay = strtolower($atm_objPublisherCurrentDay);
}
?>