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 %>
40 <% include('rs_init_object.html') |n %>
41 <% include('logout.html') |n %>
43 <SCRIPT TYPE="text/javascript">
45 function clearhint_search_prospect (what) {
46 if ( what.value == '<% $prospect_label |n %>' )
50 function clearhint_search_cust (what) {
51 if ( what.value == '<% $cust_label |n %>' )
55 function clearhint_search_address2 (what) {
56 if ( what.value == '<% $address2_label |n %>' )
60 function clearhint_search_invoice (what) {
61 if ( what.value == '<% $inv_label |n %>' )
65 function clearhint_search_svc (what) {
66 if ( what.value == '<% $svc_label |n %>' )
70 function clearhint_search_ticket (what) {
71 if ( what.value == '<% $ticketing_label |n %>' )
80 <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">
81 <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0; padding-right:4">
83 <td BGCOLOR="#ffffff"><IMG BORDER=0 ALT="freeside" HEIGHT="36" SRC="<%$fsurl%>view/REAL_logo.cgi"></td>
84 <td align=left BGCOLOR="#ffffff"> <!-- valign="top" -->
85 <font size=6><% $company_name || 'ExampleCo' %></font>
87 <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>
88 % if ( $conf->config("ticket_system")
89 % && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
90 | <a href="<%$fsurl%>rt/User/Prefs.html" STYLE="color: #000000">Ticketing preferences</a>
97 <style type="text/css">
99 background-color:#333333;
102 border-top-color:#cccccc;
103 border-left-color:#cccccc;
104 border-right-color:#aaaaaa;
105 border-bottom-color:#aaaaaa;
106 font-family: Arial, Verdana, Helvetica, sans-serif;
117 filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666')
120 input.fsblackbuttonselected {
121 background-color:#7e0079;
124 border-top-color:#cccccc;
125 border-left-color:#cccccc;
126 border-right-color:#aaaaaa;
127 border-bottom-color:#aaaaaa;
128 font-family: Arial, Verdana, Helvetica, sans-serif;
139 filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079')
143 border: 2px inset #eee;
144 /*border-top-color:#aaaaaa;
145 border-left-color:#aaaaaa;
146 border-right-color:#cccccc;
147 border-bottom-color:#cccccc;
149 vertical-align:bottom;
151 font-family: Arial,Verdana,Helvetica,sans-serif;
165 <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
167 <TD COLSPAN="7" WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD>
170 % if ( $menu_position eq 'top' ) {
174 <TD COLSPAN="5" WIDTH="100%" STYLE="padding:0" BGCOLOR="#000000">
175 <SCRIPT TYPE="text/javascript">
176 document.write(myBar);
181 <TD COLSPAN="2" ALIGN="right" STYLE="padding:0px 8px 0px 0px" BGCOLOR="#000000">
182 <TABLE CELLSPACING=0 CELLPADDING=0 BGCOLOR="#000000" BORDER=0>
184 <TD ALIGN="right" STYLE="padding-right:3px;padding-bottom:1px;border-right:1px solid #999999"><% include('/elements/about_freeside.html') |n %></TD>
185 <TD ALIGN="left" STYLE="padding-left:3px;padding-bottom:1px"><% include('/elements/about_rt.html') |n %></TD>
193 <TD COLSPAN="7" WIDTH="100%" HEIGHT="2px" STYLE="padding:0" BGCOLOR="#000000">
198 <TD COLSPAN="7" WIDTH="100%" HEIGHT="4px" STYLE="padding:0" BGCOLOR="#000000">
206 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-left:2px">
207 % if ( $curuser->access_right('List prospects') ) {
208 <FORM ACTION="<%$fsurl%>search/prospect_main.html" METHOD="GET" STYLE="margin:0">
209 <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>
210 <A HREF="<%$fsurl%>search/report_prospect_main.html" STYLE="color: #ffffff; font-size: 11px">Adv</A>
211 <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"">
216 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-left:2px">
217 % if ( $curuser->access_right('List customers') ) {
218 <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
219 <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>
220 <A HREF="<%$fsurl%>search/report_cust_main.html" STYLE="color: #ffffff; font-size: 11px">Advanced</A>
221 <INPUT TYPE="submit" VALUE="Search customers" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
226 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="center">
227 % if ( $conf->exists('address2-search') ) {
228 <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0;display:inline">
229 <INPUT TYPE="hidden" NAME="address2_on" VALUE="1">
230 <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">
232 <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">
237 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
238 % if ( $curuser->access_right('View invoices') ) {
239 <FORM ACTION="<%$fsurl%>search/cust_bill.html" METHOD="GET" STYLE="margin:0;display:inline">
240 <INPUT NAME="invnum" TYPE="text" VALUE="<% $inv_label |n %>" STYLE="width:56px" onFocus="clearhint_search_invoice(this);" onClick="clearhint_search_invoice(this);" CLASS="fstext">
241 % if ( $curuser->access_right('List invoices') ) {
242 <A HREF="<%$fsurl%>search/report_cust_bill.html" STYLE="color: #ffffff; font-size: 11px">Adv</A>\
244 <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">
249 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-left:2px">
250 % if ( $curuser->access_right('View customer services') ) {
251 <FORM ACTION="<%$fsurl%>search/cust_svc.html" METHOD="GET" STYLE="margin:0">
252 <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>
253 <A NOTYET="<%$fsurl%>search/svc_Smarter.html" STYLE="color: #000000; font-size:11px">Advanced</A>
254 <INPUT TYPE="submit" VALUE="Search services" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
259 <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
260 % if ( $conf->config("ticket_system") ) {
261 <FORM ACTION="<% FS::TicketSystem->baseurl %>index.html" METHOD="GET" STYLE="margin:0">
262 <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>
263 <A HREF="<% FS::TicketSystem->baseurl %>Search/Build.html" STYLE="color: #ffffff; font-size:11px">Advanced</A>
264 <INPUT TYPE="submit" VALUE="Search tickets" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:11px">
272 <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
276 % if ( $menu_position eq 'left' ) {
278 <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD>
279 <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-corner.png"></TD>
283 <TD STYLE="padding:0" WIDTH="100%"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD>
289 % if ( $menu_position eq 'left' ) {
291 <TD BGCOLOR="#000000" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
292 <SCRIPT TYPE="text/javascript">
293 document.write(myBar);
296 <IMG SRC="<%$fsurl%>images/32clear.gif" HEIGHT="1" WIDTH="154">
298 <TABLE CELLSPACING=0 CELLPADDING=0 BGCOLOR="#000000" WIDTH="100%">
300 <TD ALIGN="left" STYLE="padding-bottom:1px;border-bottom:1px solid #999999"><% include('/elements/about_freeside.html') |n %></TD>
303 <TD ALIGN="right" STYLE="padding-bottom:1px"><% include('/elements/about_rt.html') |n %></TD>
308 <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>
312 <TD BGCOLOR="#e8e8e8" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
322 <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
325 my( $title, $menubar, $etc, $head ) = ( '', '', '', '' );
326 my( $nobr, $nocss ) = ( 0, 0 );
329 $title = $opt->{title};
330 $menubar = $opt->{menubar};
332 $head = $opt->{head};
333 $nobr = $opt->{nobr};
334 $nocss = $opt->{nocss};
336 ($title, $menubar) = ( shift, shift );
337 $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
338 $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
341 my $conf = new FS::Conf;
343 my $curuser = $FS::CurrentUser::CurrentUser;
345 my $menu_position = $curuser->option('menu_position')
346 || 'top'; #new default for 1.9
349 my @agentnums = $curuser->agentnums;
350 if ( scalar(@agentnums) == 1 ) {
351 $company_name = $conf->config('company_name', $agentnums[0] );
353 $company_name = $conf->config('company_name');
356 my $prospect_label = '(name, company or phone)';
358 my $cust_width = 246;
359 my $cust_label = '(cust #, name, company';
360 if ( $conf->exists('address1-search') ) {
361 $cust_label .= ', address';
364 $cust_label .= ' or contact phone)';
366 my $address2_label = '(Unit #)';
367 my $inv_label = '(inv #)';
368 my $svc_label = '(user, email, ip, mac, domain or service phone)';
369 my $ticketing_label = '(ticket #, subject, email or fulltext:text)';