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">
19 <link href="<%=$fsurl%>elements/freeside.css" type="text/css" rel="stylesheet">
22 tie my %report_menu, 'Tie::IxHash',
23 'Report one' => [ 'there', 'theretip' ],
24 'Report too' => [ 'here', 'heretip' ],
27 tie my %config_employees, 'Tie::IxHash',
28 'View/Edit employees' => [ $fsurl.'browse/access_user.html', 'Setup internal users' ],
29 'View/Edit employee groups' => [ $fsurl.'browse/access_group.html', 'Employee groups allow you to control access to the backend' ],
32 tie my %config_export_svc_pkg, 'Tie::IxHash',
33 'View/Edit exports' => [ $fsurl.'browse/part_export.cgi', 'Provisioning services to external machines, databases and APIs' ],
34 'View/Edit service definitions' => [ $fsurl.'browse/part_svc.cgi', 'Services are items you offer to your customers' ],
35 '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' ],
36 'View/Edit package classes' => [ $fsurl.'browse/pkg_class.html', 'Package classes define groups of packages, for reporting and convenience purposes.' ],
39 tie my %config_agent, 'Tie::IxHash',
40 'View/Edit agent types' => [ $fsurl.'browse/agent_type.cgi', 'Agent types define groups of package definitions that you can then assign to particular agents' ],
41 '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)' ],
44 tie my %config_billing, 'Tie::IxHash',
45 'View/Edit payment gateways' => [ $fsurl.'browse/payment_gateway.html', 'Credit card and electronic check processors' ],
46 'View/Edit invoice events' => [ $fsurl.'browse/part_bill_event.cgi', 'Actions for overdue invoices' ],
47 'View/Edit prepaid cards' => [ $fsurl.'browse/prepay_credit.html', 'View outstanding cards, generate new cards' ],
48 'View/Edit call rates and regions' => [ $fsurl.'browse/rate.cgi', 'Manage rate plans, regions and prefixes for VoIP and call billing' ],
49 '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' ],
52 tie my %config_dialup, 'Tie::IxHash',
53 'View/Edit access numbers' => [ $fsurl.'browse/svc_acct_pop.cgi', 'Points of Presence' ],
56 tie my %config_broadband, 'Tie::IxHash',
57 'View/Edit routers' => [ $fsurl.'browse/router.cgi', 'Broadband access routers' ],
58 'View/Edit address blocks' => [ $fsurl.'browse/addr_block.cgi', 'Manage address blocks and block assignments to broadband routers' ],
61 tie my %config_misc, 'Tie::IxHash',
62 'View/Edit advertising sources' => [ $fsurl.'browse/part_referral.cgi', 'Where a customer heard about your service. Tracked for informational purposes' ],
63 'View/Edit virtual fields' => [ $fsurl.'browse/part_virtual_field.cgi', 'Locally defined fields', ],
64 'View/Edit message catalog' => [ $fsurl.'browse/msgcat.cgi', 'Change error messages and other customizable labels' ],
65 'View/Edit inventory classes and inventory' => [ $fsurl.'browse/inventory_class.html', 'Setup inventory classes and stock inventory' ],
68 tie my %config_menu, 'Tie::IxHash',
69 'Settings' => [ $fsurl.'config/config-view.cgi', 'XXXconfigittip' ],
70 'separator' => '', #its a separator!
71 'Employees' => [ \%config_employees, 'XXXtooltip' ],
72 'Provisioning, services and packages'
73 => [ \%config_export_svc_pkg, 'XXXtootip' ],
74 'Resellers' => [ \%config_agent, 'XXXtootip' ],
75 'Billing' => [ \%config_billing, 'XXXtootip' ],
76 'Dialup' => [ \%config_dialup, 'XXXtootip' ],
77 'Fixed (username-less) broadband'
78 => [ \%config_broadband, 'XXXtootip' ],
79 'Miscellaneous' => [ \%config_misc, 'XXXtootip' ],
82 tie my %menu, 'Tie::IxHash',
83 'Home' => [ $fsurl, 'hometip', ],
84 'Top item one' => [ 'nowhere_yet', 'nowheretip', ],
85 'Top item too' => [ 'nowhere_yet_either', 'eithertip', ],
86 'Reports' => [ \%report_menu, 'reportmenutip' ],
87 'Configuration' => [ \%config_menu, 'configmenutip' ],
90 use vars qw($gmenunum);
94 my($submenu, $title) = @_;
95 my $menunum = $gmenunum++;
97 #return two args: html, menuname
99 "var myMenu$menunum = new WebFXMenu;\n".
100 #"myMenu$menunum.useAutoPosition = true;\n".
101 "myMenu$menunum.emptyText = '$title';\n".
106 if ( !ref( $submenu->{$_} ) ) {
108 "myMenu$menunum.add(new WebFXMenuSeparator());";
112 my($url_or_submenu, $tooltip ) = @{ $submenu->{$_} };
113 if ( ref($url_or_submenu) ) {
115 my($subhtml, $submenuname ) = submenu($url_or_submenu, $_); #mmm, recursion
118 "myMenu$menunum.add(new WebFXMenuItem(\"$_\", null, \"$tooltip\", $submenuname ));";
122 "myMenu$menunum.add(new WebFXMenuItem(\"$_\", \"$url_or_submenu\", \"$tooltip\" ));";
130 "myMenu$menunum.width = 224\n",
137 <SCRIPT TYPE="text/javascript">
139 webfxMenuImagePath = "<%=$fsurl%>images/";
140 webfxMenuUseHover = 1;
141 webfxMenuShowTime = 300;
142 webfxMenuHideTime = 500;
144 var myBar = new WebFXMenuBar;
146 <% foreach my $item ( keys %menu ) {
148 my( $url_or_submenu, $tooltip ) = @{ $menu{$item} };
150 if ( ref($url_or_submenu) ) {
154 my( $subhtml, $submenuname ) = submenu($url_or_submenu, $item);
159 myBar.add(new WebFXMenuButton("<%= $item %>", null, "<%= $tooltip %>", <%= $submenuname %> ));
163 myBar.add(new WebFXMenuButton("<%= $item %>", "<%= $url_or_submenu %>", "<%= $tooltip %>" ));
170 myBar.show( null, 'vertical' );
171 //myBar.show( null, 'horizontal' );
173 //var myMenu = new WebFXMenu;
174 //myMenu.add(new WebFXMenuItem("Menu Item 1", "http://www.domain.com", "Tool tip to show"));
175 //myMenu.add(new WebFXMenuSeparator());
176 //myMenu.add(new WebFXMenuItem("Menu Item 2", "http://www.domain.com", "Tool tip to show"));
178 //var mySubMenu = new WebFXMenu;
179 //mySubMenu.add(new WebFXMenuItem("Menu Item 3", "http://www.domain.com", "Tool tip to show"));
180 //myMenu.add(new WebFXMenuItem("Menu Item 4 with sub menu", null, "Tool tip to show", mySubMenu));
186 <SCRIPT TYPE="text/javascript">
187 function clearhint_search_cust (what) {
188 if ( what.value = '(cust #, name or company)' )
193 <SCRIPT TYPE="text/javascript">
194 function clearhint_search_ticket (what) {
195 if ( what.value = '(ticket # or subject string)' )
203 <BODY BACKGROUND="<%=$fsurl%>images/background-cheat.png" <%= $etc %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0">
204 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0; padding-right:4">
206 <td rowspan=2 BGCOLOR="#ffffff">
207 <IMG BORDER=0 ALT="freeside" SRC="<%=$fsurl%>images/small-logo.png">
209 <td align=left rowspan=2 BGCOLOR="#ffffff"> <!-- valign="top" -->
210 <font size=6><%= $conf->config('company_name') || 'ExampleCo' %></font>
212 <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>
216 <td align=right valign=bottom BGCOLOR="#ffffff">
220 <td align=right BGCOLOR="#ffffff">
222 <A HREF="http://www.sisd.com/freeside">Freeside</A> v<%= $FS::VERSION %><BR>
223 <A HREF="<%= $fsurl %>docs/">Documentation</A><BR>
226 <% if ( $conf->config('ticket_system') eq 'RT_Internal' ) { %>
227 <% eval "use RT;"; %>
228 <td bgcolor=#000000></td>
231 <A HREF="http://www.bestpractical.com/rt">RT<A> v<%= $RT::VERSION %><BR>
232 <A HREF="http://wiki.bestpractical.com/">Documentation</A><BR>
244 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=4>
246 <TD COLSPAN=4 WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD>
249 <TD COLSPAN=1 BGCOLOR="#000000" WIDTH="154">
251 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
252 <FORM ACTION="<%=$fsurl%>edit/cust_main.cgi" METHOD="GET" STYLE="margin:0">
253 <INPUT TYPE="submit" VALUE="New customer">
256 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
257 <FORM ACTION="<%=$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
258 <INPUT NAME="search_cust" TYPE="text" VALUE="(cust #, name or company)" SIZE="23" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" STYLE="text-align:right">
259 <INPUT TYPE="submit" VALUE="Search customers">
262 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
263 <FORM ACTION="<%=$fsurl%>rt/index.html" METHOD="GET" STYLE="margin:0">
264 <INPUT NAME="q" TYPE="text" VALUE="(ticket # or subject string)" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" STYLE="text-align:right">
265 <INPUT TYPE="submit" VALUE="Search tickets">
270 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
272 <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD>
273 <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-corner.png"></TD>
274 <TD STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD>
277 <TD BGCOLOR="#000000" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
278 <SCRIPT TYPE="text/javascript">
279 document.write(myBar);
282 <IMG SRC="<%=$fsurl%>images/32clear.gif" HEIGHT="1" WIDTH="154">
285 <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>
286 <TD BGCOLOR="#e8e8e8" HEIGHT="100%"> <!-- WIDTH="100%"> -->
293 <%= $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>