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
12 'no_jquery' => #for use from RT, which loads its own
17 include( '/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>
52 <% include('init_overlib.html') |n %>
53 <% include('rs_init_object.html') |n %>
54 <% include('logout.html') |n %>
55 % my $timeout = $conf->config('logout-timeout');
56 % if ( $timeout && $timeout =~ /^\s*\d+\s*$/ ) {
57 <script type="text/javascript">
58 setTimeout('logout()', <% 60000 * $timeout %>);
64 %# announce our base path, and the Mason comp path of this page
65 <script type="text/javascript">
66 window.fsurl = <% $fsurl |js_string %>;
67 window.request_comp_path = <% $m->request_comp->path |js_string %>;
71 <BODY BGCOLOR="#f8f8f8" <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px">
72 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0px; padding-right:4px" CLASS="fshead">
74 <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>
75 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
76 <font size=6><% $company_name || 'ExampleCo' %></font>
78 <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>
79 % if ( $conf->config("ticket_system")
80 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
81 | <a href="<%$fsurl%>rt/Prefs/Other.html" STYLE="color: #000000">Ticketing preferences</a>
88 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
90 <link href="<%$fsurl%>elements/freeside-menu.css" type="text/css" rel="stylesheet">
92 % if ( $menu_position eq 'top' ) {
94 <TR CLASS="fsmenubar">
98 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
99 <SCRIPT TYPE="text/javascript">
100 document.write(myBar.toString());
103 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
104 <% include('searchbar-combined.html') |n %>
109 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
110 <SCRIPT TYPE="text/javascript">
111 document.write(myBar);
117 <TR CLASS="fssearchbar">
119 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
120 <% include('searchbar-prospect.html') |n %>
123 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
124 <% include('searchbar-cust_main.html') |n %>
127 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="center">
128 <% include('searchbar-address2.html') |n %>
131 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right">
132 <% include('searchbar-cust_bill.html') |n %>
135 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
136 <% include('searchbar-cust_svc.html') |n %>
139 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
140 <% include('searchbar-ticket.html') |n %>
147 % } else { #$menu_position eq 'left'
149 <TR CLASS="fsmenubar">
151 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
159 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
163 % if ( $menu_position eq 'left' ) {
165 <TD BGCOLOR="#cccccc" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right" CLASS="fsmenubar">
166 <SCRIPT TYPE="text/javascript">
167 document.write(myBar);
171 <% include('searchbar-prospect.html') |n %>
172 <% include('searchbar-cust_main.html') |n %>
173 <% include('searchbar-address2.html') |n %>
174 <% include('searchbar-cust_bill.html') |n %>
175 <% include('searchbar-cust_svc.html') |n %>
176 <% include('searchbar-ticket.html') |n %>
181 %# page content starts here
182 <TD CLASS="background" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
185 <% $title_noescape || encode_entities($title) %>
192 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
196 my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
197 my( $nobr, $nocss, $no_jquery ) = ( 0, 0, 0 );
203 $title = $opt->{title};
204 $title_noescape = $opt->{title_noescape};
205 $menubar = $opt->{menubar};
207 $head = $opt->{head};
208 $nobr = $opt->{nobr};
209 $nocss = $opt->{nocss};
210 $mobile = $opt->{mobile};
211 $no_jquery = exists($opt->{no_jquery}) ? $opt->{no_jquery} : 1; #v3 only, 0 on v4+
213 ($title, $menubar) = ( shift, shift );
214 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
215 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
218 my $conf = new FS::Conf;
220 my $curuser = $FS::CurrentUser::CurrentUser;
222 my $menu_position = $curuser->option('menu_position')
223 || 'top'; #new default for 1.9
225 if ( !defined($mobile) ) {
226 $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
228 if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
232 my($company_name, $company_url);
233 my @agentnums = $curuser->agentnums;
234 if ( scalar(@agentnums) == 1 ) {
235 $company_name = $conf->config('company_name', $agentnums[0] );
236 $company_url = $conf->config('company_url', $agentnums[0] );
238 $company_name = $conf->config('company_name');
239 $company_url = $conf->config('company_url');