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 |n %>
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 %>
56 %# announce our base path, and the Mason comp path of this page
57 <script type="text/javascript">
58 window.fsurl = <% $fsurl |js_string %>;
59 window.request_comp_path = <% $m->request_comp->path |js_string %>;
63 <BODY BGCOLOR="#f8f8f8" <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px">
64 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0px; padding-right:4px" CLASS="fshead">
66 <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>
67 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
68 <font size=6><% $company_name || 'ExampleCo' %></font>
70 <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>
71 % if ( $conf->config("ticket_system")
72 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
73 | <a href="<%$fsurl%>rt/Prefs/Other.html" STYLE="color: #000000">Ticketing preferences</a>
80 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
82 <link href="<%$fsurl%>elements/freeside-menu.css" type="text/css" rel="stylesheet">
84 % if ( $menu_position eq 'top' ) {
86 <TR CLASS="fsmenubar">
90 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#dddddd">
91 <SCRIPT TYPE="text/javascript">
92 document.write(myBar.toString());
95 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#dddddd">
96 <% include('searchbar-combined.html') |n %>
101 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#dddddd">
102 <SCRIPT TYPE="text/javascript">
103 document.write(myBar);
109 <TR CLASS="fssearchbar">
111 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
112 <% include('searchbar-prospect.html') |n %>
115 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
116 <% include('searchbar-cust_main.html') |n %>
119 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="center">
120 <% include('searchbar-address2.html') |n %>
123 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right">
124 <% include('searchbar-cust_bill.html') |n %>
127 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
128 <% include('searchbar-cust_svc.html') |n %>
131 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
132 <% include('searchbar-ticket.html') |n %>
139 % } else { #$menu_position eq 'left'
141 <TR CLASS="fsmenubar">
143 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#dddddd">
151 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
155 % if ( $menu_position eq 'left' ) {
157 <TD BGCOLOR="#dddddd" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right" CLASS="fsmenubar">
158 <SCRIPT TYPE="text/javascript">
159 document.write(myBar);
163 <% include('searchbar-prospect.html') |n %>
164 <% include('searchbar-cust_main.html') |n %>
165 <% include('searchbar-address2.html') |n %>
166 <% include('searchbar-cust_bill.html') |n %>
167 <% include('searchbar-cust_svc.html') |n %>
168 <% include('searchbar-ticket.html') |n %>
172 % } else { #$menu_position eq 'top'
175 %# page content starts here
176 <TD CLASS="background" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
179 <% $title_noescape || encode_entities($title) %>
186 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
190 my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
191 my( $nobr, $nocss, $no_jquery ) = ( 0, 0, 0 );
197 $title = $opt->{title};
198 $title_noescape = $opt->{title_noescape};
199 $menubar = $opt->{menubar};
201 $head = $opt->{head};
202 $nobr = $opt->{nobr};
203 $nocss = $opt->{nocss};
204 $mobile = $opt->{mobile};
205 $no_jquery = $opt->{no_jquery};
207 ($title, $menubar) = ( shift, shift );
208 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
209 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
212 my $conf = new FS::Conf;
214 my $curuser = $FS::CurrentUser::CurrentUser;
216 my $menu_position = $curuser->option('menu_position')
217 || 'top'; #new default for 1.9
219 if ( !defined($mobile) ) {
220 $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
222 if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
226 my($company_name, $company_url);
227 my @agentnums = $curuser->agentnums;
228 if ( scalar(@agentnums) == 1 ) {
229 $company_name = $conf->config('company_name', $agentnums[0] );
230 $company_url = $conf->config('company_url', $agentnums[0] );
232 $company_name = $conf->config('company_name');
233 $company_url = $conf->config('company_url');