5 <& /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
12 'no_jquery' => #for use from RT, which loads its own
17 <& /elements/header.html, 'Title', $menubar, $etc, $head &>
20 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
21 %#<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22 %# above is what RT declares, should we switch now? hopefully no glitches result
23 %# or just fuck it, XHTML died anyway, HTML 5 or bust?
27 <% encode_entities($title) || $title_noescape %>
29 <!-- per RT, to prevent IE compatibility mode -->
30 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
31 <!-- The X-UA-Compatible <meta> tag above must be very early in <head> -->
32 <META HTTP-Equiv="Cache-Control" Content="no-cache">
33 <META HTTP-Equiv="Pragma" Content="no-cache">
34 <META HTTP-Equiv="Expires" Content="0">
36 <META NAME="viewport" content="width=device-width height=device-height user-scalable=yes">
39 <% include('menu.html', 'freeside_baseurl' => $fsurl,
40 'position' => $menu_position,
46 % unless ( $no_jquery ) {
47 <link rel="stylesheet" href="<% $fsurl %>elements/jquery-ui.min.css">
48 <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
49 <SCRIPT SRC="<% $fsurl %>elements/jquery-ui.min.js"></SCRIPT>
51 <% include('init_overlib.html') |n %>
52 <% include('rs_init_object.html') |n %>
57 <BODY BGCOLOR="#f8f8f8" <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px">
58 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0px; padding-right:4px" CLASS="fshead">
60 <td BGCOLOR="#ffffff"><% $company_url ? qq(<A HREF="$company_url">) : '' |n %><IMG BORDER=0 ALT="freeside" HEIGHT="36" SRC="<%$fsurl%>view/REAL_logo.cgi"><% $company_url ? '</A>' : '' |n %></td>
61 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
62 <font size=6><% $company_name || 'ExampleCo' %></font>
64 <td align=right valign=top BGCOLOR="#ffffff"><FONT SIZE="-1">Logged in as <b><% $FS::CurrentUser::CurrentUser->username |h %> </b> <FONT SIZE="-2"><a href="<%$fsurl%>loginout/logout.html">logout</a></FONT><br></FONT><FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html" STYLE="color: #000000">Preferences</a>
65 % if ( $conf->config("ticket_system")
66 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
67 | <a href="<%$fsurl%>rt/Prefs/Other.html" STYLE="color: #000000">Ticketing preferences</a>
74 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
76 <link href="<%$fsurl%>elements/freeside-menu.css" type="text/css" rel="stylesheet">
78 % if ( $menu_position eq 'top' ) {
80 <TR CLASS="fsmenubar">
84 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#dddddd">
85 <SCRIPT TYPE="text/javascript">
86 document.write(myBar.toString());
89 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#dddddd">
90 <% include('searchbar-combined.html') |n %>
95 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#dddddd">
96 <SCRIPT TYPE="text/javascript">
97 document.write(myBar);
103 <TR CLASS="fssearchbar">
105 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
106 <% include('searchbar-prospect.html') |n %>
109 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
110 <% include('searchbar-cust_main.html') |n %>
113 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="center">
114 <% include('searchbar-address2.html') |n %>
117 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right">
118 <% include('searchbar-cust_bill.html') |n %>
121 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
122 <% include('searchbar-cust_svc.html') |n %>
125 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
126 <% include('searchbar-ticket.html') |n %>
133 % } else { #$menu_position eq 'left'
135 <TR CLASS="fsmenubar">
137 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#dddddd">
145 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
149 % if ( $menu_position eq 'left' ) {
151 <TD BGCOLOR="#dddddd" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right" CLASS="fsmenubar">
152 <SCRIPT TYPE="text/javascript">
153 document.write(myBar);
157 <% include('searchbar-prospect.html') |n %>
158 <% include('searchbar-cust_main.html') |n %>
159 <% include('searchbar-address2.html') |n %>
160 <% include('searchbar-cust_bill.html') |n %>
161 <% include('searchbar-cust_svc.html') |n %>
162 <% include('searchbar-ticket.html') |n %>
166 % } else { #$menu_position eq 'top'
169 %# page content starts here
170 <TD CLASS="background" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
173 <% $title_noescape || encode_entities($title) %>
180 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
183 my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
184 my( $nobr, $nocss, $no_jquery ) = ( 0, 0, 0 );
190 $title = $opt->{title};
191 $title_noescape = $opt->{title_noescape};
192 $menubar = $opt->{menubar};
194 $head = $opt->{head};
195 $nobr = $opt->{nobr};
196 $nocss = $opt->{nocss};
197 $mobile = $opt->{mobile};
198 $no_jquery = $opt->{no_jquery};
200 ($title, $menubar) = ( shift, shift );
201 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
202 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
205 my $conf = new FS::Conf;
207 my $curuser = $FS::CurrentUser::CurrentUser;
209 my $menu_position = $curuser->option('menu_position')
210 || 'top'; #new default for 1.9
212 if ( !defined($mobile) ) {
213 $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
215 if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
219 my($company_name, $company_url);
220 my @agentnums = $curuser->agentnums;
221 if ( scalar(@agentnums) == 1 ) {
222 $company_name = $conf->config('company_name', $agentnums[0] );
223 $company_url = $conf->config('company_url', $agentnums[0] );
225 $company_name = $conf->config('company_name');
226 $company_url = $conf->config('company_url');