@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | ["'._("Month").'", "'._("# of Fatalities").'"], '; |
| 24 | 24 | |
| 25 | 25 | $date_data = ''; |
| 26 | -foreach($date_array as $date_item) |
|
| 26 | +foreach ($date_array as $date_item) |
|
| 27 | 27 | { |
| 28 | - $date_data .= '[ "'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'",'.$date_item['count'].'],'; |
|
| 28 | + $date_data .= '[ "'.date('F, Y', strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'",'.$date_item['count'].'],'; |
|
| 29 | 29 | } |
| 30 | 30 | $date_data = substr($date_data, 0, -1); |
| 31 | 31 | print $date_data; |
@@ -50,13 +50,13 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | if (!empty($date_array)) |
| 52 | 52 | { |
| 53 | - foreach($date_array as $key => $row) { |
|
| 53 | + foreach ($date_array as $key => $row) { |
|
| 54 | 54 | $years[$key] = $row['year']; |
| 55 | 55 | $months[$key] = $row['month']; |
| 56 | 56 | $counts[$key] = $row['count']; |
| 57 | 57 | } |
| 58 | 58 | // array_multisort($years,SORT_DESC,$months,SORT_DESC,$date_array); |
| 59 | - array_multisort($counts,SORT_DESC,$date_array); |
|
| 59 | + array_multisort($counts, SORT_DESC, $date_array); |
|
| 60 | 60 | print '<div class="table-responsive">'; |
| 61 | 61 | print '<table class="common-date table-striped">'; |
| 62 | 62 | print '<thead>'; |
@@ -66,14 +66,14 @@ discard block |
||
| 66 | 66 | print '</thead>'; |
| 67 | 67 | print '<tbody>'; |
| 68 | 68 | $i = 1; |
| 69 | - foreach($date_array as $date_item) |
|
| 69 | + foreach ($date_array as $date_item) |
|
| 70 | 70 | { |
| 71 | 71 | print '<tr>'; |
| 72 | 72 | print '<td><strong>'.$i.'</strong></td>'; |
| 73 | 73 | print '<td>'; |
| 74 | 74 | if ($date_item['month'] < 10) $month = '0'.$date_item['month']; |
| 75 | 75 | else $month = $date_item['month']; |
| 76 | - print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>'; |
|
| 76 | + print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y', strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>'; |
|
| 77 | 77 | print '</td>'; |
| 78 | 78 | print '<td>'; |
| 79 | 79 | print $date_item['count']; |
@@ -71,8 +71,11 @@ |
||
| 71 | 71 | print '<tr>'; |
| 72 | 72 | print '<td><strong>'.$i.'</strong></td>'; |
| 73 | 73 | print '<td>'; |
| 74 | - if ($date_item['month'] < 10) $month = '0'.$date_item['month']; |
|
| 75 | - else $month = $date_item['month']; |
|
| 74 | + if ($date_item['month'] < 10) { |
|
| 75 | + $month = '0'.$date_item['month']; |
|
| 76 | + } else { |
|
| 77 | + $month = $date_item['month']; |
|
| 78 | + } |
|
| 76 | 79 | print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>'; |
| 77 | 80 | print '</td>'; |
| 78 | 81 | print '<td>'; |