}
########################################################
########### FEEDBAK_FROM_OPPOSING_COACH #############
$query_6 = "select * from tbl_opp_comments where (date(fldaddedDate) >= (DATE_SUB(now(), INTERVAL 8 day)) AND date(fldaddedDate)< (now())) GROUP BY fldathleteid,fldcoachid";
$rating_db_6->query($query_6);
$arr_info = array();
$totalPages = $rating_db_6->num_rows();
if ($totalPages > 0) {
    $rating_db_6->next_record();
    for ($k = 0; $k < $totalPages; $k++) {
        $UserID = $rating_db_6->f('fldId');
        $rating_func->setAtheleteRating("WEEKLY", $UserID, "FEEDBAK_FROM_OPPOSING_COACH", true);
        $rating_db_6->next_record();
    }
}
########################################################
########### MOST_PROFILE_VIEW #############
$query_7 = "select * from tbl_athelete_register where fldStatus='Active' ORDER BY fldWeeklycounter DESC";
$rating_db_7->query($query_7);
$arr_info = array();
$totalPages = $rating_db_7->num_rows();
$rating_func->reset_weekly_counter();
if ($totalPages > 0) {
    $rating_db_7->next_record();
    $UserID = $rating_db_7->f('fldId');
    $rating_func->setAtheleteRating("WEEKLY", $UserID, "MOST_PROFILE_VIEW", true);
}
##############################################
######### WEEKLY RATING END ##################
##############################################
die;