Will things ever be the same again?
[freeside.git] / httemplate / browse / rate.cgi
1 %
2 %
3 %my $html_init = 
4 %  'Rate plans, regions and prefixes for VoIP and call billing.<BR><BR>'.
5 %  qq!<A HREF="${p}edit/rate.cgi"><I>Add a rate plan</I></A>!.
6 %  qq! | <A HREF="${p}edit/rate_region.cgi"><I>Add a region</I></A>!.
7 %  '<BR><BR>
8 %   <SCRIPT>
9 %   function rate_areyousure(href) {
10 %    if (confirm("Are you sure you want to delete this rate plan?") == true)
11 %      window.location.href = href;
12 %   }
13 %   </SCRIPT>';
14 %
15 %my $count_query = 'SELECT COUNT(*) FROM rate';
16 %
17 %my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
18 %
19 %
20 <% include( 'elements/browse.html',
21                  'title'       => 'Rate plans',
22                  'menubar'     => [ 'Main menu' => $p, ],
23                  'html_init'   => $html_init,
24                  'name'        => 'rate plans',
25                  'query'       => { 'table'     => 'rate',
26                                     'hashref'   => {},
27                                     'extra_sql' => 'ORDER BY ratenum',
28                                   },
29                  'count_query' => $count_query,
30                  'header'      => [ '#', 'Rate plan', ],
31                  'fields'      => [ 'ratenum', 'ratename' ],
32                  'links'       => [ $link, $link ],
33              )
34 %>