add a service search
[freeside.git] / httemplate / elements / header.html
1 <%
2   my($title, $menubar) = ( shift, shift );
3   my $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
4   my $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
5   my $conf = new FS::Conf;
6 %>
7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8 <HTML>
9   <HEAD>
10     <TITLE>
11       <%= $title %>
12     </TITLE>
13     <META HTTP-Equiv="Cache-Control" Content="no-cache">
14     <META HTTP-Equiv="Pragma" Content="no-cache">
15     <META HTTP-Equiv="Expires" Content="0"> 
16
17     <%= include('menu.html', 'freeside_baseurl' => $fsurl ) %>
18
19     <SCRIPT TYPE="text/javascript">
20       function clearhint_search_cust (what) {
21         if ( what.value = '(cust #, name or company)' )
22           what.value = '';
23       }
24
25       function clearhint_search_svc (what) {
26         if ( what.value = '(user, user@domain or domain)' )
27           what.value = '';
28       }
29
30       function clearhint_search_ticket (what) {
31         if ( what.value = '(ticket # or subject string)' )
32           what.value = '';
33       }
34     </SCRIPT>
35
36     <%= $head %>
37
38   </HEAD>
39   <BODY BACKGROUND="<%=$fsurl%>images/background-cheat.png" <%= $etc %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0">
40     <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0; padding-right:4">
41       <tr>
42         <td rowspan=2 BGCOLOR="#ffffff">
43           <IMG BORDER=0 ALT="freeside" SRC="<%=$fsurl%>images/small-logo.png">
44         </td>
45         <td align=left rowspan=2 BGCOLOR="#ffffff"> <!-- valign="top" -->
46           <font size=6><%= $conf->config('company_name') || 'ExampleCo' %></font>
47         </td>
48         <td align=right valign=top BGCOLOR="#ffffff">Logged in as <b><%= getotaker %>&nbsp</b><br><FONT SIZE="-2"><a href="<%=$fsurl%>pref/XXXwritethis">Preferences</a>&nbsp;<BR><BR></FONT>
49         </td>
50       </tr>
51       <tr>
52         <td align=right valign=bottom BGCOLOR="#ffffff">
53   
54           <table>
55             <tr>
56               <td align=right BGCOLOR="#ffffff">
57                 <FONT SIZE="-2">
58                  <A HREF="http://www.sisd.com/freeside">Freeside</A>&nbsp;v<%= $FS::VERSION %><BR>
59                  <A HREF="<%= $fsurl %>docs/">Documentation</A><BR>
60                 </FONT>
61               </td>
62               <% if ( $conf->config('ticket_system') eq 'RT_Internal' ) { %>
63               <% eval "use RT;"; %>
64                 <td bgcolor=#000000></td>
65                 <td align=left>
66                   <FONT SIZE="-2">
67                    <A HREF="http://www.bestpractical.com/rt">RT<A>&nbsp;v<%= $RT::VERSION %><BR>
68                    <A HREF="http://wiki.bestpractical.com/">Documentation</A><BR>
69                   </FONT>
70                 </td>
71               <% } %>
72   
73             </tr>
74           </table>
75   
76         </td>
77       </tr>
78     </table>
79
80     <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=4>
81       <TR>
82         <TD COLSPAN=4 WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD>
83       </TR>
84       <TR>
85         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" WIDTH="15%">
86           <FORM ACTION="<%=$fsurl%>edit/cust_main.cgi" METHOD="GET" STYLE="margin:0">
87             <INPUT TYPE="submit" VALUE="New customer">
88           </FORM>
89         </TD>
90         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
91           <FORM ACTION="<%=$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
92             <INPUT NAME="search_cust" TYPE="text" VALUE="(cust #, name or company)" SIZE="22" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" STYLE="text-align:right">
93             <INPUT TYPE="submit" VALUE="Search customers">
94           </FORM>
95         </TD>
96         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
97           <FORM ACTION="<%=$fsurl%>search/svc_Smart.html" METHOD="GET" STYLE="margin:0">
98             <INPUT NAME="search_svc" TYPE="text" VALUE="(user, user@domain or domain)" SIZE="26" onFocus="clearhint_search_svc(this);" onClick="clearhint_search_svc(this);" STYLE="text-align:right">
99             <INPUT TYPE="submit" VALUE="Search services">
100           </FORM>
101         </TD>
102         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
103           <FORM ACTION="<%=$fsurl%>rt/index.html" METHOD="GET" STYLE="margin:0">
104             <INPUT NAME="q" TYPE="text" VALUE="(ticket # or subject string)" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" STYLE="text-align:right">
105             <INPUT TYPE="submit" VALUE="Search tickets">
106           </FORM>
107         </TD>
108       </TR>
109     </TABLE>
110     <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
111       <TR>
112         <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD>
113         <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-corner.png"></TD>
114         <TD STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD>
115       </TR>
116       <TR HEIGHT="100%">
117         <TD BGCOLOR="#000000" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
118           <SCRIPT TYPE="text/javascript">
119             document.write(myBar);
120           </SCRIPT>
121           <BR>
122           <IMG SRC="<%=$fsurl%>images/32clear.gif" HEIGHT="1" WIDTH="154">
123
124         </TD>
125         <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>
126         <TD BGCOLOR="#e8e8e8" HEIGHT="100%"> <!-- WIDTH="100%"> -->
127
128           <FONT SIZE=6>
129             <%= $title %>
130           </FONT>
131
132           <BR><BR>
133           <%= $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>