diff --git a/public_html/pages/front.php b/public_html/pages/front.php index e7836d0..e50636b 100644 --- a/public_html/pages/front.php +++ b/public_html/pages/front.php @@ -31,9 +31,6 @@ $from_time = $fromMonth->format('Y-m-d'); $until_time = $thisMonth->format('Y-m-d'); $widget['records'] = array(); -//$widget['table_headers'] = array(); -//$widget['table_records_conferences'] = array(); -//$widget['table_records_participants'] = array(); // loop 1 year in the past $i = 0; @@ -45,17 +42,14 @@ while ($fromMonth < $thisMonth) { $from_time = $fromMonth->format('Y-m-d'); $until_time = $untilMonth->format('Y-m-d'); -// $searchConferenceNumber = $conference->conferenceNumber($fromMonth->format('Y-m-d'), $untilMonth->format('Y-m-d')); -// $searchParticipantNumber = $participant->participantNumber($fromMonth->format('Y-m-d'), $untilMonth->format('Y-m-d')); $searchConferenceNumber = $conference->conferenceNumber($from_time, $until_time); $searchParticipantNumber = $participant->participantNumber($from_time, $until_time); // pretty format for displaying the month in the widget $month = $fromMonth->format('F Y'); + // populate the records $widget['records'][$i] = array( -// 'fromMonth' => $fromMonth, -// 'untilMonth' => $untilMonth, 'from_time' => $from_time, 'until_time' => $until_time, 'table_headers' => $month, @@ -63,27 +57,10 @@ while ($fromMonth < $thisMonth) { 'participants' => $searchParticipantNumber[0]['participants'], ); -// $widget['records'][$i]['fromMonth'] = $fromMonth; -// $widget['records'][$i]['untilMonth'] = $untilMonth; - - // populate the table -// array_push($widget['records'][$i]['table_headers'], $month); -// if (isset($searchConferenceNumber[0]['conferences'])) { -// array_push($widget['records'][$i]['table_records_conferences'], $searchConferenceNumber[0]['conferences']); -// } else { -// array_push($widget['records'][$i]['table_records_conferences'], '0'); -// } -// if (isset($searchParticipantNumber[0]['participants'])) { -// array_push($widget['records'][$i]['table_records_participants'], $searchParticipantNumber[0]['participants']); -// } else { -// array_push($widget['records'][$i]['table_records_participants'], '0'); -// } - - $i++; - // move everything one month in future $untilMonth->add(new DateInterval('P1M')); $fromMonth->add(new DateInterval('P1M')); + $i++; } $time_range_specified = true; diff --git a/public_html/templates/widget-monthly.php b/public_html/templates/widget-monthly.php index 4f46db2..0caae35 100644 --- a/public_html/templates/widget-monthly.php +++ b/public_html/templates/widget-monthly.php @@ -34,11 +34,7 @@ conferences -format('Y-m-d'); -// $until_time = $record['untilMonth']->format('Y-m-d'); -?> + 0 @@ -47,11 +43,11 @@ print_r($record); participants -format('Y-m-d'); -// $until_time = $record['untilMonth']->format('Y-m-d'); -?> - ' . htmlspecialchars($record['participants']) . '' : '0'; ?> + + + + 0 +