// if there are no times selected, default the start time to midnight and the endtime to 12:00pm as it is in the admin
- if(empty($_REQUEST['ehour']) || empty($_REQUEST['emin'])){
+ if(empty($_REQUEST['ehour']) || empty($_REQUEST['emin']) && strlen($_REQUEST['emin']) == 0){
$startTimeOnly = true;
$emilitaryTime = "12:00:00";
} else {
+
$endTime = trim(filter_var($_REQUEST['ehour'],FILTER_SANITIZE_STRING)) . ':' . trim(filter_var($_REQUEST['emin'],FILTER_SANITIZE_STRING)) . " " . trim(filter_var($_REQUEST['eampm'],FILTER_SANITIZE_STRING));
-
$emilitaryTime = date("H:i:s", strtotime($endTime));
}
- if(empty($_REQUEST['shour']) || empty($_REQUEST['smin'])){
+ if(empty($_REQUEST['shour']) || empty($_REQUEST['smin']) && strlen($_REQUEST['emin']) == 0){
$smilitaryTime = "12:00:00";
} else {
- $startTime = trim(filter_var($_REQUEST['shour'],FILTER_SANITIZE_STRING)) . ':' . trim(filter_var($_REQUEST['smin'],FILTER_SANITIZE_STRING)) . " " . trim(filter_var($_REQUEST['sampm'],FILTER_SANITIZE_STRING));
+
+ $startTime = trim(filter_var($_REQUEST['shour'],FILTER_SANITIZE_STRING)) . ':' . trim(filter_var($_REQUEST['smin'],FILTER_SANITIZE_STRING)) . " " . trim(filter_var($_REQUEST['sampm'],FILTER_SANITIZE_STRING));
+
$smilitaryTime = date("H:i:s", strtotime($startTime));
}
if(empty($_REQUEST['shour']) || empty($_REQUEST['smin']) && empty($_REQUEST['ehour']) || empty($_REQUEST['emin'])){
$allDay = true;
+ $startTimeOnly = false;
}
$fileDescr = trim(filter_var($_REQUEST['fileDescription'],FILTER_SANITIZE_STRING));
$weekOfMonth = $_REQUEST['weekom'];
- $weekofMonth = pow(2, $weekOfMonth);
+ $weekOfMonth = pow(2, $weekOfMonth);
$category = $_REQUEST['categories'];
}
if(empty($_REQUEST['allday'])){
$allDay = false;
-// $startTimeOnly = false;
} else {
$allDay = $_REQUEST['allday'];
-// $startTimeOnly = true;
}
//get days of the week values for recurrences
'admin_email' => $adminEmail,
'contact_name' => $contactFirst . " " . $contactLast,
'contact_email' => $contactEmail,
- 'contact_email' => $contactPhone,
'admin_org' => $admin_org
);
$this->wpdb->insert(
'%s',
'%s',
'%s',
- '%s',
'%s'
)
);
<option value="12">12</option>
</select> : <select class="timeDropDown glm-required" name="smin">
<option value="">Minute</option>
- <option value="0">00</option>
+ <option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="12">12</option>
</select> : <select class="timeDropDown" name="emin">
<option value="">Minute</option>
- <option value="0">00</option>
+ <option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>