6 include( '/elements/header.html',
9 'menubar' => \@menubar,
10 'etc' => '', #included in <BODY> tag, for things like onLoad=
11 'head' => '', #included before closing </HEAD> tag
12 'nobr' => 0, #1 for no <BR><BR> after the title
13 'no_jquery' => #for use from RT, which loads its own
18 include( '/elements/header.html', 'Title', $menubar, $etc, $head);
21 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
22 %#<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
23 %# above is what RT declares, should we switch now? hopefully no glitches result
24 %# or just fuck it, XHTML died anyway, HTML 5 or bust?
28 <% encode_entities($title) || $title_noescape |n %>
30 <!-- per RT, to prevent IE compatibility mode -->
31 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
32 <!-- The X-UA-Compatible <meta> tag above must be very early in <head> -->
33 <META HTTP-Equiv="Cache-Control" Content="no-cache">
34 <META HTTP-Equiv="Pragma" Content="no-cache">
35 <META HTTP-Equiv="Expires" Content="0">
37 <META NAME="viewport" content="width=device-width height=device-height user-scalable=yes">
40 <% include('menu.html', 'freeside_baseurl' => $fsurl,
41 'position' => $menu_position,
47 % unless ( $no_jquery ) {
48 <link rel="stylesheet" href="<% $fsurl %>elements/jquery-ui.min.css">
49 <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
50 <SCRIPT SRC="<% $fsurl %>elements/jquery-ui.min.js"></SCRIPT>
53 <% include('init_overlib.html') |n %>
54 <% include('rs_init_object.html') |n %>
55 <% include('logout.html') |n %>
56 % my $timeout = $conf->config('logout-timeout');
57 % if ( $timeout && $timeout =~ /^\s*\d+\s*$/ ) {
58 <script type="text/javascript">
59 setTimeout('logout()', <% 60000 * $timeout %>);
65 %# announce our base path, and the Mason comp path of this page
66 <script type="text/javascript">
67 window.fsurl = <% $fsurl |js_string %>;
68 window.request_comp_path = <% $m->request_comp->path |js_string %>;
72 <BODY BGCOLOR="#f8f8f8" <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px">
73 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0px; padding-right:4px" CLASS="fshead">
75 <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>
76 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
77 <font size=6><% $company_name || 'ExampleCo' %></font>
79 <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>
80 % if ( $conf->config("ticket_system")
81 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
82 | <a href="<%$fsurl%>rt/Prefs/Other.html" STYLE="color: #000000">Ticketing preferences</a>
89 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
91 <link href="<%$fsurl%>elements/freeside-menu.css" type="text/css" rel="stylesheet">
93 % if ( $menu_position eq 'top' ) {
95 <TR CLASS="fsmenubar">
99 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
100 <SCRIPT TYPE="text/javascript">
101 document.write(myBar.toString());
104 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
105 <% include('searchbar-combined.html') |n %>
110 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
111 <SCRIPT TYPE="text/javascript">
112 document.write(myBar);
118 <TR CLASS="fssearchbar">
120 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
121 <% include('searchbar-prospect.html') |n %>
124 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
125 <% include('searchbar-cust_main.html') |n %>
128 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="center">
129 <% include('searchbar-address2.html') |n %>
132 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right">
133 <% include('searchbar-cust_bill.html') |n %>
136 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
137 <% include('searchbar-cust_svc.html') |n %>
140 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
141 <% include('searchbar-ticket.html') |n %>
148 % } else { #$menu_position eq 'left'
150 <TR CLASS="fsmenubar">
152 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
160 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
164 % if ( $menu_position eq 'left' ) {
166 <TD BGCOLOR="#cccccc" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right" CLASS="fsmenubar">
167 <SCRIPT TYPE="text/javascript">
168 document.write(myBar);
172 <% include('searchbar-prospect.html') |n %>
173 <% include('searchbar-cust_main.html') |n %>
174 <% include('searchbar-address2.html') |n %>
175 <% include('searchbar-cust_bill.html') |n %>
176 <% include('searchbar-cust_svc.html') |n %>
177 <% include('searchbar-ticket.html') |n %>
182 %# page content starts here
183 <TD CLASS="background" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
186 <% $title_noescape || encode_entities($title) %>
193 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
197 my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
198 my( $nobr, $nocss, $no_jquery ) = ( 0, 0, 0 );
204 $title = $opt->{title};
205 $title_noescape = $opt->{title_noescape};
206 $menubar = $opt->{menubar};
208 $head = $opt->{head};
209 $nobr = $opt->{nobr};
210 $nocss = $opt->{nocss};
211 $mobile = $opt->{mobile};
212 $no_jquery = exists($opt->{no_jquery}) ? $opt->{no_jquery} : 1; #v3 only, 0 on v4+
214 ($title, $menubar) = ( shift, shift );
215 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
216 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
219 my $conf = new FS::Conf;
221 my $curuser = $FS::CurrentUser::CurrentUser;
223 my $menu_position = $curuser->option('menu_position')
224 || 'top'; #new default for 1.9
226 if ( !defined($mobile) ) {
227 $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
229 if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
233 my($company_name, $company_url);
234 my @agentnums = $curuser->agentnums;
235 if ( scalar(@agentnums) == 1 ) {
236 $company_name = $conf->config('company_name', $agentnums[0] );
237 $company_url = $conf->config('company_url', $agentnums[0] );
239 $company_name = $conf->config('company_name');
240 $company_url = $conf->config('company_url');
245 % # for testing, disable the page menus/search boxes
246 % if ( $FS::CurrentUser::CurrentUser->option('header-minimal') ) {
247 <& header-minimal.html, @_ &>
249 <& header-full.html, @_ &>
251 >>>>>>> cb6214a... more robust testing platform, #37340