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-1.12.1.min.css">
48 <SCRIPT SRC="<% $fsurl %>elements/jquery-3.3.1.js"></SCRIPT>
49 <SCRIPT SRC="<% $fsurl %>elements/jquery-migrate-3.0.1.min.js"></SCRIPT>
50 <SCRIPT SRC="<% $fsurl %>elements/jquery-ui-1.12.1.min.js"></SCRIPT>
51 <SCRIPT SRC="<% $fsurl %>elements/jquery.validate-1.17.0.min.js"></SCRIPT>
52 % if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
53 <SCRIPT SRC="<% $fsurl %>elements/printtofit.js"></SCRIPT>
56 % if ( $include_selectize ) {
57 <script src="<% $fsurl %>elements/selectize/selectize-0.12.6.min.js"></script>
58 <link href="<% $fsurl %>elements/selectize/selectize-0.12.6.css" type="text/css" rel="stylesheet">
59 <link href="<% $fsurl %>elements/selectize/selectize-freeside.css?v=<% $FS::VERSION %>" type="text/css" rel="stylesheet">
61 <% include('init_overlib.html') |n %>
62 <% include('rs_init_object.html') |n %>
63 <script type="text/javascript" src="<% $fsurl %>elements/topreload.js"></script>
66 %# announce our base path, and the Mason comp path of this page
67 <script type="text/javascript">
68 window.fsurl = <% $fsurl |js_string %>;
69 window.request_comp_path = <% $m->request_comp->path |js_string %>;
73 <BODY BGCOLOR="#f8f8f8" <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px">
74 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0px; padding-right:4px" CLASS="fshead">
76 <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>
77 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
78 <font size=6><% $company_name || 'ExampleCo' %></font>
80 <td align="right" BGCOLOR="#ffffff">
81 <& notify-tickets.html &>
83 <td align=right valign=top BGCOLOR="#ffffff">
84 <FONT SIZE="-1"><% mt('Logged in as') |h %>
85 <b><% $FS::CurrentUser::CurrentUser->username |h %> </b>
86 <FONT SIZE="-2"><a href="<%$fsurl%>loginout/logout.html">
91 <FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html" STYLE="color: #000000"><% mt('Preferences') |h %></a>
92 % if ( $conf->config("ticket_system")
93 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
94 | <a href="<%$fsurl%>rt/Prefs/Other.html" STYLE="color: #000000"><% mt('Ticketing preferences') |h %></a>
99 % foreach my $top_warning ( @top_warnings ) {
102 <IMG SRC="<% $fsurl %>images/error.png">
103 <FONT COLOR="#FF0000" SIZE="+1"><% $top_warning %></FONT>
109 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
111 <link href="<%$fsurl%>elements/freeside-menu.css?v=<% $FS::VERSION %>" type="text/css" rel="stylesheet">
113 % if ( $menu_position eq 'top' ) {
115 <TR CLASS="fsmenubar">
119 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#dddddd">
120 <SCRIPT TYPE="text/javascript">
121 document.write(myBar.toString());
124 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#dddddd">
125 <% include('searchbar-combined.html') |n %>
130 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#dddddd">
131 <SCRIPT TYPE="text/javascript">
132 document.write(myBar);
138 <TR CLASS="fssearchbar">
140 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
141 <% include('searchbar-prospect.html') |n %>
144 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
145 <% include('searchbar-cust_main.html') |n %>
148 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="center">
149 <% include('searchbar-address2.html') |n %>
152 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right">
153 <% include('searchbar-cust_bill.html') |n %>
156 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px">
157 <% include('searchbar-cust_svc.html') |n %>
160 <TD COLSPAN=1 BGCOLOR="#dddddd" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
161 <% include('searchbar-ticket.html') |n %>
168 % } else { #$menu_position eq 'left'
170 <TR CLASS="fsmenubar">
172 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#dddddd">
180 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
184 % if ( $menu_position eq 'left' ) {
186 <TD BGCOLOR="#dddddd" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right" CLASS="fsmenubar">
187 <SCRIPT TYPE="text/javascript">
188 document.write(myBar);
192 <% include('searchbar-prospect.html') |n %>
193 <% include('searchbar-cust_main.html') |n %>
194 <% include('searchbar-address2.html') |n %>
195 <% include('searchbar-cust_bill.html') |n %>
196 <% include('searchbar-cust_svc.html') |n %>
197 <% include('searchbar-ticket.html') |n %>
201 % } else { #$menu_position eq 'top'
204 %# page content starts here
205 <TD CLASS="background" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
208 <% $title_noescape || encode_entities($title) %>
211 % my %cookies = CGI::Cookie->fetch($r);
212 % if ( $cookies{freeside_status} ) {
214 % foreach my $status_msg ( $cookies{freeside_status}->value ) {
215 % my ($message, $type) = split /=/, $status_msg;
216 % $type ||= 'status';
217 <TABLE CLASS="fsinnerbox" STYLE="background-color:<% $status_color{$type} %>"><TR>
218 <TD><IMG SRC="<% $fsurl %><% $status_image{$type} %>"> <% $message |h %></TD>
221 <script src="<% $fsurl %>elements/js.cookie.js"></script>
222 <SCRIPT TYPE="text/javascript">
223 Cookies.remove('freeside_status', { path: '/' });
231 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
235 my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
236 my( $nobr, $nocss, $no_jquery ) = ( 0, 0, 0 );
239 my $include_selectize;
243 $title = $opt->{title};
244 $title_noescape = $opt->{title_noescape};
245 $menubar = $opt->{menubar};
247 $head = $opt->{head};
248 $nobr = $opt->{nobr};
249 $nocss = $opt->{nocss};
250 $mobile = $opt->{mobile};
251 $no_jquery = $opt->{no_jquery};
252 $include_selectize = $opt->{include_selectize} ? 1 : 0;
254 ($title, $menubar) = ( shift, shift );
255 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
256 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
259 my $conf = new FS::Conf;
261 my $curuser = $FS::CurrentUser::CurrentUser;
263 my $menu_position = $curuser->option('menu_position')
264 || 'top'; #new default for 1.9
266 if ( !defined($mobile) ) {
267 $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
269 if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
273 my($company_name, $company_url);
274 my @agentnums = $curuser->agentnums;
275 if ( scalar(@agentnums) == 1 ) {
276 $company_name = $conf->config('company_name', $agentnums[0] );
277 $company_url = $conf->config('company_url', $agentnums[0] );
279 $company_name = $conf->config('company_name');
280 $company_url = $conf->config('company_url');
283 ## status->green(#eeffee), warning->yellow(#fdfd96), error->red(#f97c7c)
284 my %status_color = ( 'status' => '#eeffee', 'warning' => '#fefbd0', 'error' => '#f97c7c', );
285 my %status_image = ( 'status' => 'images/tick.png', 'warning' => 'images/tick.png', 'error' => 'images/error.png', );
287 my @top_warnings = ();
288 my $deb_version = int(slurp('/etc/debian_version'));
289 #per wiki.debian.org/LTS
290 push @top_warnings, deb_warning($deb_version)
291 if ( $deb_version <= 8 )
292 or ( $deb_version == 9 && time > 1656658800 ) #7/1/2022
293 or ( $deb_version == 10 && time > 1719817200 ) #7/1/2024
294 or ( $deb_version == 11 && time > 1782889200 ) #7/1/2026
300 WARNING: Your operating system (Debian v$ver) is EOL and no longer supported.
301 This is insecure and a violation of PCI data security standard.
302 Contact <a href="mailto:sales\@freeside.biz?subject=Debian OS upgrade">sales\@freeside.biz</a> to schedule an upgrade ASAP.