used view_data in the script of rates.tpl.php