diff --git a/public_html/pages/front.php b/public_html/pages/front.php index 505d3c2..50ba42a 100644 --- a/public_html/pages/front.php +++ b/public_html/pages/front.php @@ -34,11 +34,19 @@ try { foreach ($search as $item) { extract($item); + + // we don't have duration field, so we calculate it + if (!empty($start) && !empty($end)) { + $duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start))); + } else { + $duration = ''; + } $conference_record = array( // assign title to the field in the array record 'component' => $jitsi_component, 'start' => $start, 'end' => $end, + 'duration' => $duration, 'conference ID' => $conference_id, 'conference name' => $conference_name, 'participants' => $participants, @@ -133,11 +141,19 @@ try { $i = 0; foreach ($search as $item) { extract($item); + + // we don't have duration field, so we calculate it + if (!empty($start) && !empty($end)) { + $duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start))); + } else { + $duration = ''; + } $conference_record = array( // assign title to the field in the array record 'component' => $jitsi_component, 'start' => $start, 'end' => $end, + 'duration' => $duration, 'conference ID' => $conference_id, 'conference name' => $conference_name, 'participants' => $participants,