<% include( 'elements/browse.html', 'title' => 'Rate plans', 'menubar' => [ 'Regions and Prefixes' => $p.'browse/rate_region.html', ], 'html_init' => $html_init, 'name' => 'rate plans', 'query' => { 'table' => 'rate', 'hashref' => {}, 'extra_sql' => 'ORDER BY ratenum', }, 'count_query' => $count_query, 'header' => [ '#', 'Rate plan', 'Rates' ], 'fields' => [ 'ratenum', 'ratename', $rates_sub ], 'links' => [ $link, $link, '' ], ) %> <%once> my $sth = dbh->prepare("SELECT DISTINCT(countrycode) FROM rate_prefix") or die dbh->errstr; $sth->execute or die $sth->errstr; my @all_countrycodes = map $_->[0], @{ $sth->fetchall_arrayref }; my $all_countrycodes = join("\n", map qq(