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
16 include( '/elements/header.html', 'Title', $menubar, $etc, $head);
19 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
20 %#<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
21 %# above is what RT declares, should we switch now? hopefully no glitches result
22 %# or just fuck it, XHTML died anyway, HTML 5 or bust?
28 <META HTTP-Equiv="Cache-Control" Content="no-cache">
29 <META HTTP-Equiv="Pragma" Content="no-cache">
30 <META HTTP-Equiv="Expires" Content="0">
32 <META NAME="viewport" content="width=device-width height=device-height user-scalable=yes">
35 <% include('menu.html', 'freeside_baseurl' => $fsurl,
36 'position' => $menu_position,
42 <% include('init_overlib.html') |n %>
43 <% include('rs_init_object.html') |n %>
44 <% include('logout.html') |n %>
45 % my $timeout = $conf->config('logout-timeout');
46 % if ( $timeout && $timeout =~ /^\s*\d+\s*$/ ) {
47 <script type="text/javascript">
48 setTimeout('logout()', <% 60000 * $timeout %>);
55 <BODY BGCOLOR="#f8f8f8" <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px">
56 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0px; padding-right:4px" CLASS="fshead">
58 <td BGCOLOR="#ffffff"><IMG BORDER=0 ALT="freeside" HEIGHT="36" SRC="<%$fsurl%>view/REAL_logo.cgi"></td>
59 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
60 <font size=6><% $company_name || 'ExampleCo' %></font>
62 <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>
63 % if ( $conf->config("ticket_system")
64 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
65 | <a href="<%$fsurl%>rt/Prefs/Other.html" STYLE="color: #000000">Ticketing preferences</a>
72 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
74 <link href="<%$fsurl%>elements/freeside-menu.css" type="text/css" rel="stylesheet">
76 % if ( $menu_position eq 'top' ) {
78 <TR CLASS="fsmenubar">
82 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
83 <SCRIPT TYPE="text/javascript">
84 document.write(myBar.toString());
87 <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
88 <% include('searchbar-combined.html') |n %>
93 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
94 <SCRIPT TYPE="text/javascript">
95 document.write(myBar);
101 <TR CLASS="fssearchbar">
103 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
104 <% include('searchbar-prospect.html') |n %>
107 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
108 <% include('searchbar-cust_main.html') |n %>
111 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="center">
112 <% include('searchbar-address2.html') |n %>
115 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right">
116 <% include('searchbar-cust_bill.html') |n %>
119 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px">
120 <% include('searchbar-cust_svc.html') |n %>
123 <TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
124 <% include('searchbar-ticket.html') |n %>
131 % } else { #$menu_position eq 'left'
133 <TR CLASS="fsmenubar">
135 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
143 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
147 % if ( $menu_position eq 'left' ) {
149 <TD BGCOLOR="#cccccc" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right" CLASS="fsmenubar">
150 <SCRIPT TYPE="text/javascript">
151 document.write(myBar);
155 <% include('searchbar-prospect.html') |n %>
156 <% include('searchbar-cust_main.html') |n %>
157 <% include('searchbar-address2.html') |n %>
158 <% include('searchbar-cust_bill.html') |n %>
159 <% include('searchbar-cust_svc.html') |n %>
160 <% include('searchbar-ticket.html') |n %>
165 %# page content starts here
166 <TD CLASS="background" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
176 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
179 my( $title, $menubar, $etc, $head ) = ( '', '', '', '' );
180 my( $nobr, $nocss ) = ( 0, 0 );
186 $title = $opt->{title};
187 $menubar = $opt->{menubar};
189 $head = $opt->{head};
190 $nobr = $opt->{nobr};
191 $nocss = $opt->{nocss};
192 $mobile = $opt->{mobile};
194 ($title, $menubar) = ( shift, shift );
195 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
196 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
199 my $conf = new FS::Conf;
201 my $curuser = $FS::CurrentUser::CurrentUser;
203 my $menu_position = $curuser->option('menu_position')
204 || 'top'; #new default for 1.9
206 if ( !defined($mobile) ) {
207 $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
209 if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
214 my @agentnums = $curuser->agentnums;
215 if ( scalar(@agentnums) == 1 ) {
216 $company_name = $conf->config('company_name', $agentnums[0] );
218 $company_name = $conf->config('company_name');