X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Frate.cgi;fp=httemplate%2Fbrowse%2Frate.cgi;h=b20c45c0c606792cf3d8b8bbf53cca941d3ec5a9;hp=584891aea02125da4d83eb24fc521710c1eabefd;hb=c371f6e225cfffa667815a51571203b034e4f75c;hpb=8baad1bb7327eb2f704bdcc5d040a24a94de8879 diff --git a/httemplate/browse/rate.cgi b/httemplate/browse/rate.cgi index 584891aea..b20c45c0c 100644 --- a/httemplate/browse/rate.cgi +++ b/httemplate/browse/rate.cgi @@ -1,34 +1,64 @@ <% include( 'elements/browse.html', - 'title' => 'Rate plans', - 'menubar' => [ 'Main menu' => $p, ], - 'html_init' => $html_init, - 'name' => 'rate plans', - 'query' => { 'table' => 'rate', - 'hashref' => {}, - 'extra_sql' => 'ORDER BY ratenum', - }, - 'count_query' => $count_query, - 'header' => [ '#', 'Rate plan', ], - 'fields' => [ 'ratenum', 'ratename' ], - 'links' => [ $link, $link ], - ) + '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(