5 include( '/elements/header.html',
8 'menubar' => \@menubar,
9 'etc' => '', #included in <BODY> tag, for things like onLoad=
10 'head' => '', #included before closing </HEAD> tag
11 'nobr' => 0, #1 for no <BR><BR> after the title
16 include( '/elements/header.html', 'Title', $menubar, $etc, $head);
19 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
20 %#<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
21 %# above is what RT declares, should we switch now? hopefully no glitches result
22 %# or just fuck it, XHTML died anyway, HTML 5 or bust?
28 <META HTTP-Equiv="Cache-Control" Content="no-cache">
29 <META HTTP-Equiv="Pragma" Content="no-cache">
30 <META HTTP-Equiv="Expires" Content="0">
32 <META NAME="viewport" content="width=device-width height=device-height user-scalable=yes">
35 <% include('menu.html', 'freeside_baseurl' => $fsurl,
36 'position' => $menu_position,
42 <% include('init_overlib.html') |n %>
43 <% include('rs_init_object.html') |n %>
44 <% include('logout.html') |n %>
49 <BODY BGCOLOR="#f8f8f8" <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px">
50 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0px; padding-right:4px">
52 <td BGCOLOR="#ffffff"><IMG BORDER=0 ALT="freeside" HEIGHT="36" SRC="<%$fsurl%>view/REAL_logo.cgi"></td>
53 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
54 <font size=6><% $company_name || 'ExampleCo' %></font>
56 <td align=right valign=top BGCOLOR="#ffffff"><FONT SIZE="-1">Logged in as <b><% getotaker %> </b> <FONT SIZE="-2"><a href="javascript:void(0);" onClick="logout();">logout</a></FONT><br></FONT><FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html" STYLE="color: #000000">Preferences</a>
57 % if ( $conf->config("ticket_system")
58 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
59 | <a href="<%$fsurl%>rt/Prefs/Other.html" STYLE="color: #000000">Ticketing preferences</a>
66 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
68 <link href="<%$fsurl%>elements/freeside-menu.css" type="text/css" rel="stylesheet">
70 % if ( $menu_position eq 'top' ) {
76 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
77 <SCRIPT TYPE="text/javascript">
78 document.write(myBar.toString());
81 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
82 <% include('searchbar-combined.html') |n %>
87 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
88 <SCRIPT TYPE="text/javascript">
89 document.write(myBar);
97 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
98 <% include('searchbar-prospect.html') |n %>
101 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
102 <% include('searchbar-cust_main.html') |n %>
105 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="center">
106 <% include('searchbar-address2.html') |n %>
109 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right">
110 <% include('searchbar-cust_bill.html') |n %>
113 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
114 <% include('searchbar-cust_svc.html') |n %>
117 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
118 <% include('searchbar-ticket.html') |n %>
125 % } else { #$menu_position eq 'left'
129 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
137 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
141 % if ( $menu_position eq 'left' ) {
143 <TD BGCOLOR="#cccccc" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
144 <SCRIPT TYPE="text/javascript">
145 document.write(myBar);
149 <% include('searchbar-prospect.html') |n %>
150 <% include('searchbar-cust_main.html') |n %>
151 <% include('searchbar-address2.html') |n %>
152 <% include('searchbar-cust_bill.html') |n %>
153 <% include('searchbar-cust_svc.html') |n %>
154 <% include('searchbar-ticket.html') |n %>
160 <TD CLASS="background" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
170 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
173 my( $title, $menubar, $etc, $head ) = ( '', '', '', '' );
174 my( $nobr, $nocss ) = ( 0, 0 );
180 $title = $opt->{title};
181 $menubar = $opt->{menubar};
183 $head = $opt->{head};
184 $nobr = $opt->{nobr};
185 $nocss = $opt->{nocss};
186 $mobile = $opt->{mobile};
188 ($title, $menubar) = ( shift, shift );
189 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
190 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
193 my $conf = new FS::Conf;
195 my $curuser = $FS::CurrentUser::CurrentUser;
197 my $menu_position = $curuser->option('menu_position')
198 || 'top'; #new default for 1.9
200 if ( !defined($mobile) ) {
201 $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
203 if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
208 my @agentnums = $curuser->agentnums;
209 if ( scalar(@agentnums) == 1 ) {
210 $company_name = $conf->config('company_name', $agentnums[0] );
212 $company_name = $conf->config('company_name');