1.7 has no per_agent config
[freeside.git] / httemplate / elements / header.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <HTML>
3   <HEAD>
4     <TITLE>
5       <% $title %>
6     </TITLE>
7     <META HTTP-Equiv="Cache-Control" Content="no-cache">
8     <META HTTP-Equiv="Pragma" Content="no-cache">
9     <META HTTP-Equiv="Expires" Content="0"> 
10
11     <% include('menu.html', 'freeside_baseurl' => $fsurl,
12                             'position'         => $menu_position,
13               )
14     %>
15
16     <% include('init_overlib.html') %>
17
18     <SCRIPT TYPE="text/javascript">
19       function clearhint_search_cust (what) {
20         if ( what.value == '<% $cust_label %>' )
21           what.value = '';
22       }
23
24       function clearhint_search_address2 (what) {
25         if ( what.value == '<% $address2_label %>' )
26           what.value = '';
27       }
28
29       function clearhint_search_invoice (what) {
30         if ( what.value == '<% $inv_label %>' )
31           what.value = '';
32       }
33
34       function clearhint_search_svc (what) {
35         if ( what.value == '<% $svc_label %>' )
36           what.value = '';
37       }
38
39       function clearhint_search_ticket (what) {
40         if ( what.value == '<% $ticketing_label %>' )
41           what.value = '';
42       }
43     </SCRIPT>
44
45     <% $head %>
46
47   </HEAD>
48   <BODY <% $menu_position eq 'left' ? qq( BACKGROUND="${fsurl}images/background-cheat.png" ) : ' BGCOLOR="#e8e8e8" ' %> <% $etc %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0">
49     <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0; padding-right:4">
50       <tr>
51         <td rowspan=2 BGCOLOR="#ffffff"><IMG BORDER=0 ALT="freeside" SRC="<%$fsurl%>images/small-logo.png"></td>
52         <td align=left rowspan=2 BGCOLOR="#ffffff"> <!-- valign="top" -->
53           <font size=6><% $conf->config('company_name') || 'ExampleCo' %></font>
54         </td>
55         <td align=right valign=top BGCOLOR="#ffffff"><FONT SIZE="-1">Logged in as <b><% getotaker %>&nbsp;</b><br></FONT><FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html">Preferences</a>&nbsp;<BR></FONT>
56         </td>
57       </tr>
58       <tr>
59         <td align=right valign=bottom BGCOLOR="#ffffff">
60   
61           <table>
62             <tr>
63               <td align=right BGCOLOR="#ffffff">
64                 <FONT SIZE="-2">
65                   <% include('/elements/popup_link.html',
66                                'action'      => $fsurl.'docs/about.html',
67                                'label'       => 'Freeside',
68                                'actionlabel' => 'About',
69                                'width'       => 300,
70                                'height'      => 360,
71                                'color'       => '#7e0079',
72                                'scrolling'   => 'no',
73                             )
74                  %>&nbsp;v<% $FS::VERSION %><BR>
75                  <A HREF="<% $conf->config('support-key') ? "http://www.freeside.biz/mediawiki/index.php/Supported:Documentation" : "http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation" %>" TARGET="_blank">Documentation</A><BR>
76                 </FONT>
77               </td>
78 % if ( $conf->config('ticket_system') eq 'RT_Internal' ) { 
79 % eval "use RT;"; 
80
81                 <td bgcolor=#000000></td>
82                 <td align=left>
83                   <FONT SIZE="-2">
84                    <A HREF="http://www.bestpractical.com/rt" TARGET="_blank">RT<A>&nbsp;v<% $RT::VERSION %><BR>
85                    <A HREF="http://wiki.bestpractical.com/" TARGET="_blank">Documentation</A><BR>
86                   </FONT>
87                 </td>
88 % } 
89
90   
91             </tr>
92           </table>
93   
94         </td>
95       </tr>
96     </table>
97
98 <style type="text/css">
99 input.fsblackbutton {
100          background-color:#333333;
101          color: #ffffff;
102          border:1px solid;
103          border-top-color:#cccccc;
104          border-left-color:#cccccc;
105          border-right-color:#aaaaaa;
106          border-bottom-color:#aaaaaa;
107          font-weight:bold;
108          padding-left:12px;
109          padding-right:12px;
110          overflow:visible;
111          filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666')
112 }
113
114 input.fsblackbuttonselected {
115          background-color:#7e0079;
116          color: #ffffff;
117          border:1px solid;
118          border-top-color:#cccccc;
119          border-left-color:#cccccc;
120          border-right-color:#aaaaaa;
121          border-bottom-color:#aaaaaa;
122          font-weight:bold;
123          padding-left:12px;
124          padding-right:12px;
125          overflow:visible;
126          filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079')
127 }
128 </style>
129
130     <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
131       <TR>
132         <TD COLSPAN=6 WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD>
133       </TR>
134
135 % if ( $menu_position eq 'top' ) {
136
137       <TR>
138
139         <TD COLSPAN="6" WIDTH="100%" STYLE="padding:0">
140           <SCRIPT TYPE="text/javascript">
141             document.write(myBar);
142           </SCRIPT>
143         </TD>
144
145       </TR>
146
147       <TR>
148         <TD COLSPAN="6" WIDTH="100%" HEIGHT="2px" STYLE="padding:0" BGCOLOR="#000000">
149         </TD>
150       </TR>
151       
152       <TR>
153         <TD COLSPAN="6" WIDTH="100%" HEIGHT="4px" STYLE="padding:0" BGCOLOR="#000000">
154         </TD>
155       </TR>
156
157 % }
158
159       <TR>
160
161         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
162           <FORM ACTION="<%$fsurl%>edit/cust_main.cgi" METHOD="GET" STYLE="margin:0">
163             <INPUT TYPE="submit" VALUE="New customer" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="vertical-align:bottom; font-size:100%">
164           </FORM>
165         </TD>
166
167         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
168 % if ( $curuser->access_right('List customers') ) {
169           <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
170             <INPUT NAME="search_cust" TYPE="text" VALUE="<% $cust_label %>" STYLE="width:<%$cust_width%>px" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" STYLE="vertical-align:bottom;text-align:right"><BR>
171             <A HREF="<%$fsurl%>search/report_cust_main.html" STYLE="color: #ffffff; font-size: 70%">Advanced</A>
172             <INPUT TYPE="submit" VALUE="Search customers" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
173           </FORM>
174 % }
175         </TD>
176
177         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="center">
178 % if ( $conf->exists('address2-search') ) { 
179             <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0;display:inline">
180               <INPUT TYPE="hidden" NAME="address2_on" VALUE="1">
181               <INPUT NAME="address2_text" TYPE="text" VALUE="<% $address2_label %>" STYLE="width:67px" onFocus="clearhint_search_address2(this);" onClick="clearhint_search_address2(this);" STYLE="vertical-align:bottom;text-align:right;margin-bottom:1px">
182               <BR>
183               <INPUT TYPE="submit" VALUE="Search units" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%;padding-left:2px;padding-right:2px">
184             </FORM>
185 % } 
186         </TD>
187
188         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
189 % if ( $curuser->access_right('View invoices') ) { 
190             <FORM ACTION="<%$fsurl%>search/cust_bill.html" METHOD="GET" STYLE="margin:0;display:inline">
191               <INPUT NAME="invnum" TYPE="text" VALUE="<% $inv_label %>" STYLE="width:64px" onFocus="clearhint_search_invoice(this);" onClick="clearhint_search_invoice(this);" STYLE="vertical-align:bottom;text-align:right;margin-bottom:1px">
192 %   if ( $curuser->access_right('List invoices') ) { 
193
194                 <A HREF="<%$fsurl%>search/report_cust_bill.html" STYLE="color: #ffffff; font-size: 70%">Adv</A>
195 %   } 
196
197               <BR>
198               <INPUT TYPE="submit" VALUE="Search invoices" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
199             </FORM>
200 % } 
201         </TD>
202
203         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
204 % if ( $curuser->access_right('View customer services') ) {
205           <FORM ACTION="<%$fsurl%>search/cust_svc.html" METHOD="GET" STYLE="margin:0">
206             <INPUT NAME="search_svc" TYPE="text" VALUE="<% $svc_label %>" STYLE="width:224px" onFocus="clearhint_search_svc(this);" onClick="clearhint_search_svc(this);" STYLE="vertical-align:bottom;text-align:right"><BR>
207             <A NOTYET="<%$fsurl%>search/svc_Smarter.html" STYLE="color: #000000; font-size: 70%">Advanced</A>
208             <INPUT TYPE="submit" VALUE="Search services" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
209           </FORM>
210 % }
211         </TD>
212
213         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-right:4px">
214 % if ( $conf->config("ticket_system") ) { 
215           <FORM ACTION="<% FS::TicketSystem->baseurl %>index.html" METHOD="GET" STYLE="margin:0">
216             <INPUT NAME="q" TYPE="text" VALUE="<% $ticketing_label %>" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" STYLE="width=155px;vertical-align:bottom;text-align:right"><BR>
217             <A HREF="<% FS::TicketSystem->baseurl %>Search/Build.html" STYLE="color: #ffffff; font-size: 70%">Advanced</A>
218             <INPUT TYPE="submit" VALUE="Search tickets" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%;padding-left:2px;padding-right:2px">
219           </FORM>
220 % }
221         </TD>
222
223       </TR>
224     </TABLE>
225
226     <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
227
228       <TR>
229
230 % if ( $menu_position eq 'left' ) {
231
232         <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD>
233         <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-corner.png"></TD>
234
235 % }
236
237         <TD STYLE="padding:0" WIDTH="100%"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD>
238
239       </TR>
240
241       <TR HEIGHT="100%">
242
243 % if ( $menu_position eq 'left' ) {
244
245         <TD BGCOLOR="#000000" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
246           <SCRIPT TYPE="text/javascript">
247             document.write(myBar);
248           </SCRIPT>
249           <BR>
250           <IMG SRC="<%$fsurl%>images/32clear.gif" HEIGHT="1" WIDTH="154">
251
252         </TD>
253         <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>
254
255 % }
256
257         <TD BGCOLOR="#e8e8e8" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
258
259           <FONT SIZE=6>
260             <% $title %>
261           </FONT>
262
263           <BR><BR>
264           <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
265 <%init>
266
267 my($title, $menubar) = ( shift, shift );
268 my $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
269 my $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
270
271 my $conf = new FS::Conf;
272
273 my $curuser = $FS::CurrentUser::CurrentUser;
274
275 my $menu_position = $FS::CurrentUser::CurrentUser->option('menu_position')
276                     || 'left';
277
278 my $cust_width = 288; #251 #ok for IE, slightly bigger for windows firefox
279 my $cust_label = '(cust #, name, company';
280 if ( $conf->exists('address1-search') ) {
281   $cust_label .= ', address';
282   $cust_width += 64;
283 }
284 $cust_label .= ' or contact phone)';
285
286 my $address2_label = '(Unit #)';
287 my $inv_label = '(inv #)';
288 my $svc_label = '(user, email, ip, mac, or domain)';
289 my $ticketing_label = '(ticket # or subject string)';
290
291 </%init>