start of package class web UI (add/edit package classes, package class selection...
[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 %><%= include( 'elements/browse.html',
20                  'title'       => 'Rate plans',
21                  'menubar'     => [ 'Main menu' => $p, ],
22                  'html_init'   => $html_init,
23                  'name'        => 'rate plans',
24                  'query'       => { 'table'     => 'rate',
25                                     'hashref'   => {},
26                                     'extra_sql' => 'ORDER BY ratenum',
27                                   },
28                  'count_query' => $count_query,
29                  'header'      => [ '#', 'Rate plan', ],
30                  'fields'      => [ 'ratenum', 'ratename' ],
31                  'links'       => [ $link, $link ],
32              )
33 %>