getOptions(); if (isset($_POST['BWPS_away_save'])) { if (!wp_verify_nonce($_POST['wp_nonce'], 'BWPS_away_save')) { die('Security error!'); } if (checkdate($_POST['BWPS_away_startmonth'], $_POST['BWPS_away_startday'], $_POST['BWPS_away_startyear']) && checkdate($_POST['BWPS_away_endmonth'], $_POST['BWPS_away_endday'], $_POST['BWPS_away_endyear'])) { $startDate = $_POST['BWPS_away_startmonth'] . "/" . $_POST['BWPS_away_startday'] . "/" . $_POST['BWPS_away_startyear']; $endDate = $_POST['BWPS_away_endmonth'] . "/" . $_POST['BWPS_away_endday'] . "/" . $_POST['BWPS_away_endyear']; $startTime = $_POST['BWPS_away_starthour'] . ":" . $_POST['BWPS_away_startmin'] . " " . $_POST['BWPS_away_startsel']; $endTime = $_POST['BWPS_away_endhour'] . ":" . $_POST['BWPS_away_endmin'] . " " . $_POST['BWPS_away_endsel']; $opts = $BWPS->saveOptions("away_enable", $_POST['BWPS_away_enable']); $opts = $BWPS->saveOptions("away_mode", $_POST['BWPS_away_mode']); $opts = $BWPS->saveOptions("away_start", strtotime($startDate . " " . $startTime)); $opts = $BWPS->saveOptions("away_end", strtotime($endDate . " " . $endTime)); } else { if (!$errorHandler) { $errorHandler = new WP_Error(); } if (!checkdate($_POST['BWPS_away_startmonth'], $_POST['BWPS_away_startday'], $_POST['BWPS_away_startyear'])) { $errorHandler->add("1", __("You MUST enter a valid date for start time.", 'better-wp-security')); } if (!checkdate($_POST['BWPS_away_endmonth'], $_POST['BWPS_away_endday'], $_POST['BWPS_away_endyear'])) { $errorHandler->add("2", __("You MUST enter a valid date for end time.", 'better-wp-security')); } } if (isset($errorHandler)) { echo '

' . $errorHandler->get_error_message() . '

'; } else { $BWPS->saveVersions('AWAY', BWPS_VERSION_AWAY); echo '

' . __('Settings Saved', 'better-wp-security') . '

'; } $aedisplay = $_POST['BWPS_away_enable']; $modisplay = $_POST['BWPS_away_mode']; $smdisplay = $_POST['BWPS_away_startmonth']; $sddisplay = $_POST['BWPS_away_startday']; $sydisplay = $_POST['BWPS_away_startyear']; $shdisplay = $_POST['BWPS_away_starthour']; $sidisplay = $_POST['BWPS_away_startmin']; $ssdisplay = $_POST['BWPS_away_startsel']; $emdisplay = $_POST['BWPS_away_endmonth']; $eddisplay = $_POST['BWPS_away_endday']; $eydisplay = $_POST['BWPS_away_endyear']; $ehdisplay = $_POST['BWPS_away_endhour']; $eidisplay = $_POST['BWPS_away_endmin']; $esdisplay = $_POST['BWPS_away_endsel']; } else { $aedisplay = $opts['away_enable']; $modisplay = $opts['away_mode']; $sTime = $opts['away_start']; $eTime = $opts['away_end']; $shdisplay = date('g',$sTime); $sidisplay = date('i',$sTime); $ssdisplay = date('a',$sTime); $ehdisplay = date('g',$eTime); $eidisplay = date('i',$eTime); $esdisplay = date('a',$eTime); if ($opts['away_enable'] == 1) { $smdisplay = date('n',$sTime); $sddisplay = date('j',$sTime); $sydisplay = date('Y',$sTime); $emdisplay = date('n',$eTime); $eddisplay = date('j',$eTime); $eydisplay = date('Y',$eTime); } else { $sDate = strtotime(get_date_from_gmt(date('Y-m-d H:i:s',time() + 86400))); if ($eTime < (strtotime(get_date_from_gmt(date('Y-m-d H:i:s',time() - 86400))))) { $eDate = strtotime(get_date_from_gmt(date('Y-m-d H:i:s',time() + (86400 * 2)))); } else { $eDate = $eTime; } $smdisplay = date('n',$sDate); $sddisplay = date('j',$sDate); $sydisplay = date('Y',$sDate); $emdisplay = date('n',$eDate); $eddisplay = date('j',$eDate); $eydisplay = date('Y',$eDate); } } ?>

Better WP Security -

"One Time" will lock out the backend of your site from the start date and time to the end date and time. Selecting "Daily" will ignore the start and and dates and will disable your site backend from the start time to the end time.', 'better-wp-security'); ?>

, at :

"Daily" mode is selected the date will be ignored and access will be banned each day at the specified time.', 'better-wp-security'); ?>

, at :

"Daily" mode is selected the date will be ignored and access will be restored each day at the specified time.', 'better-wp-security'); ?>

" . __('every day') . ""; $stime = "" . date('g:i a', $opts['away_start']) . ""; $etime = "" . date('g:i a', $opts['away_end']) . ""; } else { $freq = ""; $stime = "" . date('l, F jS, Y \a\\t g:i a', $opts['away_start']) . ""; $etime = "" . date('l, F jS, Y \a\\t g:i a', $opts['away_end']) . ""; } ?>

.

getLocalTime()); ?>.