2 my($title, $menubar) = ( shift, shift );
3 my $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
4 my $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
5 my $conf = new FS::Conf;
7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
13 <META HTTP-Equiv="Cache-Control" Content="no-cache">
14 <META HTTP-Equiv="Pragma" Content="no-cache">
15 <META HTTP-Equiv="Expires" Content="0">
16 <script type="text/javascript" src="<%=$fsurl%>elements/cssexpr.js"></script>
17 <script type="text/javascript" src="<%=$fsurl%>elements/xmenu.js"></script>
18 <link href="<%=$fsurl%>elements/xmenu.css" type="text/css" rel="stylesheet">
21 tie my %report_menu, 'Tie::IxHash',
22 'Report one' => [ 'there', 'theretip' ],
23 'Report too' => [ 'here', 'heretip' ],
26 tie my %config_employees, 'Tie::IxHash',
27 'View/Edit employees' => [ $fsurl.'browse/access_user.html', 'Setup internal users' ],
28 'View/Edit employee groups' => [ $fsurl.'browse/access_group.html', 'Employee groups allow you to control access to the backend' ],
31 tie my %config_export_svc_pkg, 'Tie::IxHash',
32 'View/Edit exports' => [ $fsurl.'browse/part_export.cgi', 'Provisioning services to external machines, databases and APIs' ],
33 'View/Edit service definitions' => [ $fsurl.'browse/part_svc.cgi', 'Services are items you offer to your customers' ],
34 'View/Edit package definitions' => [ $fsurl.'browse/part_pkg.cgi', 'One or more services are grouped together into a package and given pricing information. Customers purchase packages, not services' ],
35 'View/Edit package classes' => [ $fsurl.'browse/pkg_class.html', 'Package classes define groups of packages, for reporting and convenience purposes.' ],
38 tie my %config_agent, 'Tie::IxHash',
39 'View/Edit agent types' => [ $fsurl.'browse/agent_type.cgi', 'Agent types define groups of package definitions that you can then assign to particular agents' ],
40 'View/Edit agents' => [ $fsurl.'browse/agent.cgi', 'Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their type)' ],
43 tie my %config_billing, 'Tie::IxHash',
44 'View/Edit payment gateways' => [ $fsurl.'browse/payment_gateway.html', 'Credit card and electronic check processors' ],
45 'View/Edit invoice events' => [ $fsurl.'browse/part_bill_event.cgi', 'Actions for overdue invoices' ],
46 'View/Edit prepaid cards' => [ $fsurl.'browse/prepay_credit.html', 'View outstanding cards, generate new cards' ],
47 'View/Edit call rates and regions' => [ $fsurl.'browse/rate.cgi', 'Manage rate plans, regions and prefixes for VoIP and call billing' ],
48 'View/Edit locales and tax rates' => [ $fsurl.'browse/cust_main_county.cgi', 'Change tax rates, or break down a country into states, or a state into counties and assign different tax rates to each' ],
51 tie my %config_dialup, 'Tie::IxHash',
52 'View/Edit access numbers' => [ $fsurl.'browse/svc_acct_pop.cgi', 'Points of Presence' ],
55 tie my %config_broadband, 'Tie::IxHash',
56 'View/Edit routers' => [ $fsurl.'browse/router.cgi', 'Broadband access routers' ],
57 'View/Edit address blocks' => [ $fsurl.'browse/addr_block.cgi', 'Manage address blocks and block assignments to broadband routers' ],
60 tie my %config_misc, 'Tie::IxHash',
61 'View/Edit advertising sources' => [ $fsurl.'browse/part_referral.cgi', 'Where a customer heard about your service. Tracked for informational purposes' ],
62 'View/Edit virtual fields' => [ $fsurl.'browse/part_virtual_field.cgi', 'Locally defined fields', ],
63 'View/Edit message catalog' => [ $fsurl.'browse/msgcat.cgi', 'Change error messages and other customizable labels' ],
64 'View/Edit inventory classes and inventory' => [ $fsurl.'browse/inventory_class.html', 'Setup inventory classes and stock inventory' ],
67 tie my %config_menu, 'Tie::IxHash',
68 'Settings' => [ $fsurl.'config/config-view.cgi', 'XXXconfigittip' ],
69 'separator' => '', #its a separator!
70 'Employees' => [ \%config_employees, 'XXXtooltip' ],
71 'Provisioning, services and packages'
72 => [ \%config_export_svc_pkg, 'XXXtootip' ],
73 'Resellers' => [ \%config_agent, 'XXXtootip' ],
74 'Billing' => [ \%config_billing, 'XXXtootip' ],
75 'Dialup' => [ \%config_dialup, 'XXXtootip' ],
76 'Fixed (username-less) broadband'
77 => [ \%config_broadband, 'XXXtootip' ],
78 'Miscellaneous' => [ \%config_misc, 'XXXtootip' ],
81 tie my %menu, 'Tie::IxHash',
82 'Home' => [ $fsurl, 'hometip', ],
83 'Top item one' => [ 'nowhere_yet', 'nowheretip', ],
84 'Top item too' => [ 'nowhere_yet_either', 'eithertip', ],
85 'Reports' => [ \%report_menu, 'reportmenutip' ],
86 'Configuration' => [ \%config_menu, 'configmenutip' ],
89 use vars qw($gmenunum);
93 my($submenu, $title) = @_;
94 my $menunum = $gmenunum++;
96 #return two args: html, menuname
98 "var myMenu$menunum = new WebFXMenu;\n".
99 #"myMenu$menunum.useAutoPosition = true;\n".
100 "myMenu$menunum.emptyText = '$title';\n".
105 if ( !ref( $submenu->{$_} ) ) {
107 "myMenu$menunum.add(new WebFXMenuSeparator());";
111 my($url_or_submenu, $tooltip ) = @{ $submenu->{$_} };
112 if ( ref($url_or_submenu) ) {
114 my($subhtml, $submenuname ) = submenu($url_or_submenu, $_); #mmm, recursion
117 "myMenu$menunum.add(new WebFXMenuItem(\"$_\", null, \"$tooltip\", $submenuname ));";
121 "myMenu$menunum.add(new WebFXMenuItem(\"$_\", \"$url_or_submenu\", \"$tooltip\" ));";
129 "myMenu$menunum.width = 224\n",
136 <SCRIPT TYPE="text/javascript">
138 webfxMenuImagePath = "<%=$fsurl%>images/";
139 webfxMenuUseHover = 1;
140 webfxMenuShowTime = 300;
141 webfxMenuHideTime = 500;
143 var myBar = new WebFXMenuBar;
145 <% foreach my $item ( keys %menu ) {
147 my( $url_or_submenu, $tooltip ) = @{ $menu{$item} };
149 if ( ref($url_or_submenu) ) {
153 my( $subhtml, $submenuname ) = submenu($url_or_submenu, $item);
158 myBar.add(new WebFXMenuButton("<%= $item %>", null, "<%= $tooltip %>", <%= $submenuname %> ));
162 myBar.add(new WebFXMenuButton("<%= $item %>", "<%= $url_or_submenu %>", "<%= $tooltip %>" ));
169 myBar.show( null, 'vertical' );
170 //myBar.show( null, 'horizontal' );
172 //var myMenu = new WebFXMenu;
173 //myMenu.add(new WebFXMenuItem("Menu Item 1", "http://www.domain.com", "Tool tip to show"));
174 //myMenu.add(new WebFXMenuSeparator());
175 //myMenu.add(new WebFXMenuItem("Menu Item 2", "http://www.domain.com", "Tool tip to show"));
177 //var mySubMenu = new WebFXMenu;
178 //mySubMenu.add(new WebFXMenuItem("Menu Item 3", "http://www.domain.com", "Tool tip to show"));
179 //myMenu.add(new WebFXMenuItem("Menu Item 4 with sub menu", null, "Tool tip to show", mySubMenu));
185 <SCRIPT TYPE="text/javascript">
186 function clearhint_search_cust () {
188 if ( this.value='(cust #, name or company)' )
196 <BODY BACKGROUND="<%=$fsurl%>images/background-cheat.png" <%= $etc %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0">
197 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0; padding-right:4">
199 <td rowspan=2 BGCOLOR="#ffffff">
200 <IMG BORDER=0 ALT="freeside" SRC="<%=$fsurl%>images/small-logo.png">
202 <td align=left rowspan=2 BGCOLOR="#ffffff"> <!-- valign="top" -->
203 <font size=6><%= $conf->config('company_name') %> Billing</font>
205 <td align=right valign=top BGCOLOR="#ffffff">Logged in as <b><%= getotaker %> </b><br><FONT SIZE="-2"><a href="<%=$fsurl%>pref/XXXwritethis">Preferences</a> <BR><BR></FONT>
209 <td align=right valign=bottom BGCOLOR="#ffffff">
213 <td align=right BGCOLOR="#ffffff">
215 <A HREF="http://www.sisd.com/freeside">Freeside</A> v<%= $FS::VERSION %><BR>
216 <A HREF="<%= $fsurl %>docs/">Documentation</A><BR>
219 <% if ( $conf->config('ticket_system') eq 'RT_Internal' ) { %>
220 <% eval "use RT;"; %>
221 <td bgcolor=#000000></td>
224 <A HREF="http://www.bestpractical.com/rt">RT<A> v<%= $RT::VERSION %><BR>
225 <A HREF="http://wiki.bestpractical.com/">Documentation</A><BR>
237 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=4>
239 <TD COLSPAN=4 WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD>
242 <TD COLSPAN=1 BGCOLOR="#000000" WIDTH="154">
244 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
245 <FORM ACTION="<%=$fsurl%>edit/cust_main.cgi" METHOD="GET" STYLE="margin:0">
246 <INPUT TYPE="submit" VALUE="New customer">
249 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
250 <FORM ACTION="<%=$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
251 <INPUT NAME="search_cust" TYPE="text" VALUE="(cust #, name or company)" SIZE="23" onFocus="clearhint_search_cust" onClick="clearhint_search_cust">
252 <INPUT TYPE="submit" VALUE="Search customers">
255 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
256 <FORM ACTION="<%=$fsurl%>rt/index.html" METHOD="GET" STYLE="margin:0">
257 <INPUT NAME="q" TYPE="text" VALUE="" onFocus="clearhint_search_ticket" onClick="clearhint_search_ticket">
258 <INPUT TYPE="submit" VALUE="Search tickets">
263 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
265 <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD>
266 <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-corner.png"></TD>
267 <TD STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD>
270 <TD BGCOLOR="#000000" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
271 <SCRIPT TYPE="text/javascript">
272 document.write(myBar);
275 <IMG SRC="<%=$fsurl%>images/32clear.gif" HEIGHT="1" WIDTH="154">
278 <TD STYLE="padding:0" HEIGHT="100%" WIDTH=13 VALIGN="top"><IMG WIDTH="13" HEIGHT="100%" BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-side.png"></TD>
279 <TD BGCOLOR="#e8e8e8" HEIGHT="100%"> <!-- WIDTH="100%"> -->
286 <%= $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>