Changeset 217784
- Timestamp:
- 03/15/2010 04:51:14 PM (16 years ago)
- File:
-
- 1 edited
-
cyclopress/branches/cp2/classes/cyclopress.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cyclopress/branches/cp2/classes/cyclopress.php
r217513 r217784 2487 2487 if (!$stats) return false; 2488 2488 2489 $avg_distance = ($stats_now['total_rides'] == 0) ? 0 : round($stats['total_miles']/$stats['total_rides'],2); 2490 $avg_time = ($stats_now['total_rides'] == 0) ? 0 : $this->units->minutes_human($stats['total_time']/$stats['total_rides']); 2491 2489 2492 $str = '<dl class="cy">'; 2490 2493 $str .= '<dt>Total Rides</dt> <dd>'.$stats['total_rides'].'</dd>'; 2491 2494 $str .= '<dt>Total Distance</dt> <dd>'.round($stats['total_miles'],2).' miles</dd>'; 2492 $str .= '<dt>Average Ride Distance</dt> <dd>'. round($stats['total_miles']/$stats['total_rides'],2).' miles</dd>';2495 $str .= '<dt>Average Ride Distance</dt> <dd>'.$avg_distance.' miles</dd>'; 2493 2496 $str .= '<dt>Total Riding Time</dt> <dd>'.$this->units->minutes_human($stats['total_time']).'</dd>'; 2494 $str .= '<dt>Average Ride Time</dt> <dd>'.$ this->units->minutes_human($stats['total_time']/$stats['total_rides']).'</dd>';2497 $str .= '<dt>Average Ride Time</dt> <dd>'.$avg_time.'</dd>'; 2495 2498 $str .= '<dt>Average Overall Speed</dt> <dd>'.round($stats['avg_avg_speed'],2).' mph</dd>'; 2496 2499 $str .= '<dt>Maximum Speed</dt> <dd>'.round($stats['max_max_speed'],2).' mph</dd>'; … … 2513 2516 if (!$stats) return false; 2514 2517 2515 $avg_distance = round($stats['total_miles']/$stats['total_rides'],2); 2516 $avg_time = $this->units->minutes_human($stats['total_time']/$stats['total_rides']); 2518 $avg_distance = ($stats['total_rides'] == 0) ? 0 : round($stats['total_miles']/$stats['total_rides'],2); 2519 $avg_distance_now = ($stats_now['total_rides'] == 0) ? 0 : round($stats_now['total_miles']/$stats_now['total_rides'],2); 2520 $avg_time = ($stats['total_rides'] == 0) ? 0 : $this->units->minutes_human($stats['total_time']/$stats['total_rides']); 2521 $avg_time_now = ($stats_now['total_rides'] == 0) ? 0 : $this->units->minutes_human($stats_now['total_time']/$stats_now['total_rides']); 2517 2522 2518 2523 $str = '<dl class="cy">'; 2519 2524 $str .= '<dt>Total Rides</dt> <dd>'.$stats['total_rides'].' <small>('.$stats_now['total_rides'].' this year)</small></dd>'; 2520 2525 $str .= '<dt>Total Distance</dt> <dd>'.round($stats['total_miles'],2).' miles <small>('.round($stats_now['total_miles'],2).' this year)</small></dd>'; 2521 $str .= '<dt>Average Ride Distance</dt> <dd>'.$avg_distance.' miles <small>('.$avg_distance .' this year)</small></dd>';2522 $str .= '<dt>Total Riding Time</dt> <dd>'.$this->units->minutes_human($stats['total_time']).' <small>('.$this->units->minutes_human($stats ['total_time']).' this year)</small></dd>';2523 $str .= '<dt>Average Ride Time</dt> <dd>'.$avg_time.' <small>('.$avg_time .' this year)</small></dd>';2526 $str .= '<dt>Average Ride Distance</dt> <dd>'.$avg_distance.' miles <small>('.$avg_distance_now.' this year)</small></dd>'; 2527 $str .= '<dt>Total Riding Time</dt> <dd>'.$this->units->minutes_human($stats['total_time']).' <small>('.$this->units->minutes_human($stats_now['total_time']).' this year)</small></dd>'; 2528 $str .= '<dt>Average Ride Time</dt> <dd>'.$avg_time.' <small>('.$avg_time_now.' this year)</small></dd>'; 2524 2529 $str .= '<dt>Average Overall Speed</dt> <dd>'.round($stats['avg_avg_speed'],2).' mph <small>('.round($stats_now['avg_avg_speed'],2).' this year)</small></dd>'; 2525 2530 $str .= '<dt>Maximum Speed</dt> <dd>'.round($stats['max_max_speed'],2).' mph <small>('.round($stats_now['max_max_speed'],2).' this year)</small></dd>';
Note: See TracChangeset
for help on using the changeset viewer.