* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
if (isFormSent()) {
// Check holiday request...
- $START = mktime(0, 0, 0, postRequestElement('start_month'), postRequestElement('start_day'), postRequestElement('start_year'));
- $content['holiday_end'] = mktime(0, 0, 0, postRequestElement('end_month') , postRequestElement('end_day') , postRequestElement('end_year') );
+ $content['holiday_start'] = mktime(0, 0, 0, postRequestElement('start_mo'), postRequestElement('start_da'), postRequestElement('start_ye'));
+ $content['holiday_end'] = mktime(0, 0, 0, postRequestElement('end_mo') , postRequestElement('end_da') , postRequestElement('end_ye') );
// Test both values
- $TEST = $content['holiday_end'] - $START;
- if (($TEST < 0) || ($TEST > (getOneDay() * getConfig('holiday_max'))) || ($START < time()) || ($content['holiday_end'] < time())) {
+ $TEST = $content['holiday_end'] - $content['holiday_start'];
+ if (($TEST < 0) || ($TEST > (getOneDay() * getConfig('holiday_max'))) || ($content['holiday_start'] < time()) || ($content['holiday_end'] < time())) {
// Time test failed
unsetPostRequestElement('ok');
} else {
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_holidays` (`userid`, `holiday_start`, `holiday_end`, `comments`) VALUES ('%s','%s','%s','%s')",
array(
getMemberId(),
- $START,
+ $content['holiday_start'],
$content['holiday_end'],
postRequestElement('comments')
), __FILE__, __LINE__);