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);
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?
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 <% include('menu.html', 'freeside_baseurl' => $fsurl,
34 'position' => $menu_position,
39 <% include('init_overlib.html') |n %>
41 <SCRIPT TYPE="text/javascript">
43 function clearhint_search_prospect (what) {
44 if ( what.value == '<% $prospect_label |n %>' )
48 function clearhint_search_cust (what) {
49 if ( what.value == '<% $cust_label |n %>' )
53 function clearhint_search_address2 (what) {
54 if ( what.value == '<% $address2_label |n %>' )
58 function clearhint_search_invoice (what) {
59 if ( what.value == '<% $inv_label |n %>' )
63 function clearhint_search_svc (what) {
64 if ( what.value == '<% $svc_label |n %>' )
68 function clearhint_search_ticket (what) {
69 if ( what.value == '<% $ticketing_label |n %>' )
78 <BODY <% $menu_position eq 'left' ? qq( BACKGROUND="${fsurl}images/background-cheat.png" ) : ' BGCOLOR="#e8e8e8" ' %> <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0">
79 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0; padding-right:4">
81 <td BGCOLOR="#ffffff"><IMG BORDER=0 ALT="freeside" HEIGHT="36" SRC="<%$fsurl%>view/REAL_logo.cgi"></td>
82 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
83 <font size=6><% $company_name || 'ExampleCo' %></font>
85 <td align=right valign=top BGCOLOR="#ffffff"><FONT SIZE="-1">Logged in as <b><% getotaker %> </b><br></FONT><FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html" STYLE="color: #000000">Preferences</a>
86 % if ( $conf->config("ticket_system")
87 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
88 | <a href="<%$fsurl%>rt/User/Prefs.html" STYLE="color: #000000">Ticketing preferences</a>
95 <style type="text/css">
97 background-color:#333333;
100 border-top-color:#cccccc;
101 border-left-color:#cccccc;
102 border-right-color:#aaaaaa;
103 border-bottom-color:#aaaaaa;
104 font-family: Arial, Verdana, Helvetica, sans-serif;
115 filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666')
118 input.fsblackbuttonselected {
119 background-color:#7e0079;
122 border-top-color:#cccccc;
123 border-left-color:#cccccc;
124 border-right-color:#aaaaaa;
125 border-bottom-color:#aaaaaa;
126 font-family: Arial, Verdana, Helvetica, sans-serif;
137 filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079')
141 border: 2px inset #eee;
142 /*border-top-color:#aaaaaa;
143 border-left-color:#aaaaaa;
144 border-right-color:#cccccc;
145 border-bottom-color:#cccccc;
147 vertical-align:bottom;
149 font-family: Arial,Verdana,Helvetica,sans-serif;
163 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
165 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD>
168 % if ( $menu_position eq 'top' ) {
172 <TD COLSPAN="5" WIDTH="100%" STYLE="padding:0" BGCOLOR="#000000">
173 <SCRIPT TYPE="text/javascript">
174 document.write(myBar);
179 <TD COLSPAN="2" ALIGN="right" STYLE="padding:0px 8px 0px 0px" BGCOLOR="#000000">
180 <TABLE CELLSPACING=0 CELLPADDING=0 BGCOLOR="#000000" BORDER=0>
182 <TD ALIGN="right" STYLE="padding-right:3px;padding-bottom:1px;border-right:1px solid #999999"><% include('/elements/about_freeside.html') |n %></TD>
183 <TD ALIGN="left" STYLE="padding-left:3px;padding-bottom:1px"><% include('/elements/about_rt.html') |n %></TD>
191 <TD COLSPAN="7" WIDTH="100%" HEIGHT="2px" STYLE="padding:0" BGCOLOR="#000000">
196 <TD COLSPAN="7" WIDTH="100%" HEIGHT="4px" STYLE="padding:0" BGCOLOR="#000000">
204 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-left:2px">
205 % if ( $curuser->access_right('List prospects') ) {
206 <FORM ACTION="<%$fsurl%>search/prospect_main.html" METHOD="GET" STYLE="margin:0">
207 <INPUT NAME="search_prospect" TYPE="text" VALUE="<% $prospect_label |n %>" STYLE="width:155px" onFocus="clearhint_search_prospect(this);" onClick="clearhint_search_prospect(this);" CLASS="fstext"><BR>
208 <A HREF="<%$fsurl%>search/report_prospect_main.html" STYLE="color: #ffffff; font-size: 11px">Adv</A>
209 <INPUT TYPE="submit" VALUE="Search prospects" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px;padding-left:1px;padding-right:1px"">
214 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-left:2px">
215 % if ( $curuser->access_right('List customers') ) {
216 <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
217 <INPUT NAME="search_cust" TYPE="text" VALUE="<% $cust_label |n %>" STYLE="width:<%$cust_width%>px" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" CLASS="fstext"><BR>
218 <A HREF="<%$fsurl%>search/report_cust_main.html" STYLE="color: #ffffff; font-size: 11px">Advanced</A>
219 <INPUT TYPE="submit" VALUE="Search customers" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
224 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="center">
225 % if ( $conf->exists('address2-search') ) {
226 <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0;display:inline">
227 <INPUT TYPE="hidden" NAME="address2_on" VALUE="1">
228 <INPUT NAME="address2_text" TYPE="text" VALUE="<% $address2_label |n %>" STYLE="width:67px" onFocus="clearhint_search_address2(this);" onClick="clearhint_search_address2(this);" CLASS="fstext">
230 <INPUT TYPE="submit" VALUE="Search units" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px;padding-left:1px;padding-right:1px;margin-top:3px">
235 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
236 % if ( $curuser->access_right('View invoices') ) {
237 <FORM ACTION="<%$fsurl%>search/cust_bill.html" METHOD="GET" STYLE="margin:0;display:inline">
238 <INPUT NAME="invnum" TYPE="text" VALUE="<% $inv_label |n %>" STYLE="width:56px" onFocus="clearhint_search_invoice(this);" onClick="clearhint_search_invoice(this);" CLASS="fstext">
239 % if ( $curuser->access_right('List invoices') ) {
240 <A HREF="<%$fsurl%>search/report_cust_bill.html" STYLE="color: #ffffff; font-size: 11px">Adv</A>\
242 <BR><INPUT TYPE="submit" VALUE="Search invoices" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px;padding-left:1px;padding-right:1px;margin-top:3px">
247 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-left:2px">
248 % if ( $curuser->access_right('View customer services') ) {
249 <FORM ACTION="<%$fsurl%>search/cust_svc.html" METHOD="GET" STYLE="margin:0">
250 <INPUT NAME="search_svc" TYPE="text" VALUE="<% $svc_label |n %>" STYLE="width:271px" onFocus="clearhint_search_svc(this);" onClick="clearhint_search_svc(this);" CLASS="fstext"><BR>
251 <A NOTYET="<%$fsurl%>search/svc_Smarter.html" STYLE="color: #000000; font-size:11px">Advanced</A>
252 <INPUT TYPE="submit" VALUE="Search services" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
257 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
258 % if ( $conf->config("ticket_system") ) {
259 <FORM ACTION="<% FS::TicketSystem->baseurl %>index.html" METHOD="GET" STYLE="margin:0">
260 <INPUT NAME="q" TYPE="text" VALUE="<% $ticketing_label |n %>" STYLE="width:223px" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" CLASS="fstext"><BR>
261 <A HREF="<% FS::TicketSystem->baseurl %>Search/Build.html" STYLE="color: #ffffff; font-size:11px">Advanced</A>
262 <INPUT TYPE="submit" VALUE="Search tickets" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
270 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
274 % if ( $menu_position eq 'left' ) {
276 <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD>
277 <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-corner.png"></TD>
281 <TD STYLE="padding:0" WIDTH="100%"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD>
287 % if ( $menu_position eq 'left' ) {
289 <TD BGCOLOR="#000000" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
290 <SCRIPT TYPE="text/javascript">
291 document.write(myBar);
294 <IMG SRC="<%$fsurl%>images/32clear.gif" HEIGHT="1" WIDTH="154">
296 <TABLE CELLSPACING=0 CELLPADDING=0 BGCOLOR="#000000" WIDTH="100%">
298 <TD ALIGN="left" STYLE="padding-bottom:1px;border-bottom:1px solid #999999"><% include('/elements/about_freeside.html') |n %></TD>
301 <TD ALIGN="right" STYLE="padding-bottom:1px"><% include('/elements/about_rt.html') |n %></TD>
306 <TD STYLE="padding:0" HEIGHT="100%" WIDTH=13 VALIGN="top"><IMG WIDTH="13" HEIGHT="100%" BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-side.png"></TD>
310 <TD BGCOLOR="#e8e8e8" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
320 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
323 my( $title, $menubar, $etc, $head ) = ( '', '', '', '' );
324 my( $nobr, $nocss ) = ( 0, 0 );
327 $title = $opt->{title};
328 $menubar = $opt->{menubar};
330 $head = $opt->{head};
331 $nobr = $opt->{nobr};
332 $nocss = $opt->{nocss};
334 ($title, $menubar) = ( shift, shift );
335 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
336 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
339 my $conf = new FS::Conf;
341 my $curuser = $FS::CurrentUser::CurrentUser;
343 my $menu_position = $curuser->option('menu_position')
344 || 'top'; #new default for 1.9
347 my @agentnums = $curuser->agentnums;
348 if ( scalar(@agentnums) == 1 ) {
349 $company_name = $conf->config('company_name', $agentnums[0] );
351 $company_name = $conf->config('company_name');
354 my $prospect_label = '(name, company or phone)';
356 my $cust_width = 246;
357 my $cust_label = '(cust #, name, company';
358 if ( $conf->exists('address1-search') ) {
359 $cust_label .= ', address';
362 $cust_label .= ' or contact phone)';
364 my $address2_label = '(Unit #)';
365 my $inv_label = '(inv #)';
366 my $svc_label = '(user, email, ip, mac, domain or service phone)';
367 my $ticketing_label = '(ticket #, subject, email or fulltext:text)';