Walker Rankings


user_login;
$walker_n = $current_user->user_firstname;
$hours = array();
if (current_user_can(‘level_10’)) {
$rank_hours = $wpdb->get_results(“SELECT user_login, SUM(duration) as min FROM user_walk GROUP BY user_login”);
foreach($rank_hours as $h){
$hours[$h->user_login] = round($h->min / 60, 2);
}
arsort($hours, SORT_NUMERIC);
?>

Ranking of Walkers by Hours Walked

$v) {
if ($k == $walker_u){
$tdstyle = “thisisme”;
} else {
$tdstyle = “thisisnotme”;
}
?>

$v) {
$measure = get_cimyFieldValue($current_user->ID, ‘MEASUREMENT’);
$nmeasure = cimy_uef_sanitize_content($measure);
if ($nmeasure == “Kilometers”){
$lentext = “km”;
$distance = round($v * 1.609344, 2);
$multi = 1.609344;
} else {
$lentext = “miles”;
$distance = round($v, 2);
$multi = 1;
}
if ($k == $walker_u){
$tdstyle = “thisisme”;
} else {
$tdstyle = “thisisnotme”;
}
?>

Rank Walker Hours
“>
Rank Walker Distance
“>