5 <& /elements/header-logo.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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
18 %#<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
19 %# above is what RT declares, should we switch now? hopefully no glitches result
20 %# or just fuck it, XHTML died anyway, HTML 5 or bust?
24 <% encode_entities($title) || $title_noescape |n %>
26 <!-- per RT, to prevent IE compatibility mode -->
27 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
28 <!-- The X-UA-Compatible <meta> tag above must be very early in <head> -->
29 <META HTTP-Equiv="Cache-Control" Content="no-cache">
30 <META HTTP-Equiv="Pragma" Content="no-cache">
31 <META HTTP-Equiv="Expires" Content="0">
33 <META NAME="viewport" content="width=device-width height=device-height user-scalable=yes">
37 <link href="<%$fsurl%>elements/freeside.css" type="text/css" rel="stylesheet">
38 <link href="<%$fsurl%>elements/freeside-print.css" type="text/css" rel="stylesheet" media="print">
41 % unless ( $no_jquery ) {
42 <link rel="stylesheet" href="<% $fsurl %>elements/jquery-ui.min.css">
43 <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
44 <SCRIPT SRC="<% $fsurl %>elements/jquery-migrate-3.0.1.min.js"></SCRIPT>
45 <SCRIPT SRC="<% $fsurl %>elements/jquery-ui.min.js"></SCRIPT>
46 <SCRIPT SRC="<% $fsurl %>elements/jquery.validate.min.js"></SCRIPT>
47 % if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
48 <SCRIPT SRC="<% $fsurl %>elements/printtofit.js"></SCRIPT>
51 <% include('init_overlib.html') |n %>
52 <% include('rs_init_object.html') |n %>
53 <script type="text/javascript" src="<% $fsurl %>elements/topreload.js"></script>
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>
75 my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
76 my( $nobr, $nocss, $no_jquery ) = ( 0, 0, 0 );
81 $title = $opt->{title};
82 $title_noescape = $opt->{title_noescape};
83 $menubar = $opt->{menubar};
87 $nocss = $opt->{nocss};
88 $mobile = $opt->{mobile};
89 $no_jquery = $opt->{no_jquery};
91 my $conf = new FS::Conf;
93 my $curuser = $FS::CurrentUser::CurrentUser;
95 my $menu_position = $curuser->option('menu_position')
96 || 'top'; #new default for 1.9
98 if ( !defined($mobile) ) {
99 $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
101 if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
105 my($company_name, $company_url);
106 my @agentnums = $curuser->agentnums;
107 if ( scalar(@agentnums) == 1 ) {
108 $company_name = $conf->config('company_name', $agentnums[0] );
109 $company_url = $conf->config('company_url', $agentnums[0] );
111 $company_name = $conf->config('company_name');
112 $company_url = $conf->config('company_url');