Hi Sergey, I would like to add one additional box to the front page. I don't want the user to have to go into advanced. I would like to have a user enter the assetID in one box and type the text of the part in the original search box. Example: User searches for a water pump for assetid 6750
The user will be doing the same thing all day, therefore I want to avoid flipping back and forth. Here is the code thx
<%@ Language=VBScript %>
<link REL="stylesheet" href="include/style.css" type="text/css">
<%
If Session("UserID")="" then
Session("MyURL")=request.ServerVariables("SCRIPT_NAME") & "?" & request.ServerVariables("QUERY_STRING")
Response.Redirect "login.asp?message=expired"
End If
if CheckSecurity("", "Add")<>True and CheckSecurity("", "Search")<>True Then
Response.Write "<p>" & MultilangMessage("NO_PERMISSIONS") & "<a href=""login.asp"">" & MultilangMessage("BACK_TO_LOGIN") & "</a></p>"
Response.End
end if
%>
<!--#include file="include/languages.asp"-->
<!--#include file="include/jsvariables.asp"-->
<% Call DefineScriptMessages %>
<!--#include file="include/maintenance_variables.asp"-->
<!--#include file="include/maintenance_aspfunctions.asp"-->
<%
Session(strTableName & "_ListURL")=Request.ServerVariables("SCRIPT_NAME") & "?" & Request.ServerVariables("QUERY_STRING")
if InStr(Session(strTableName & "_ListURL"), "action=OrderBy&")>0 then
Session(strTableName & "_ListURL") = Replace(Session(strTableName & "ListURL"), "action=OrderBy&", "action=none&" )
end if
Session.LCID = 1033
Dim rs, dbConnection
strOrderBy="" : strOrderImage="" : strDir="" : strOrderByClause = ""
Call CalculateOrderBy
if Request("action")="" then
Session(strTableName & "SQL")=""
Session(strTableName & "MasterKey")=""
end if
strMasterKey = Request("masterkey")
if strMasterKey="" then
strMasterKey = Session(strTableName & "MasterKey")
end if
Session(strTableName & "MasterKey") = strMasterKey
if Request("action")="language" then
Session("Language") = Request("lang")
Response.CharSet = "Windows-" & MultilangCodepage()
Session.CodePage = CInt(MultilangCodepage())
end if
TargetPageNumber=Request("TargetPageNumber")
if TargetPageNumber="" or Request("action")="search" then
TargetPageNumber=1
if Request("PageSize")<>"" then
Session("PageSize") = Request("PageSize")
end if
if Session("PageSize")<>"" then PageSize = Session("PageSize")
' delete record(s)
if (Request("mdelete")<>"") then
On Error Resume Next
set dbConnection = server.CreateObject ("ADODB.Connection")
dbConnection.ConnectionString = strConnection
dbConnection.Open
Call ReportError
On Error GoTo 0
for i=1 to Request("mdelete").count
ind = CLng(Request("mdelete")(i))
strSQL="delete from " & strTableName &
" where " & AddWrappers(strKeyField) & "=" & gstrQuote & Replace(Request("mdelete1")(ind), "'", "''") & gstrQuote
if strKeyField2<>"" then
strSQL = strSQL & " and " & AddWrappers(strKeyField2) & "=" & gstrQuote2 & Replace(Request("mdelete2")(ind), "'", "''") & gstrQuote2
if strKeyField3<>"" then
strSQL = strSQL & " and " & AddWrappers(strKeyField3) & "=" & gstrQuote3 & Replace(Request("mdelete3")(ind), "'", "''") & gstrQuote3
On Error Resume Next
LogInfo(strSQL)
dbConnection.Execute strSQL
Call ReportError
On Error Goto 0
next
dbConnection.close
set dbConnection = nothing
end if
if Request("action")<>"Search" and Request("action")<>"AdvancedSearch" and Len(Session(strTableName & "SQL"))>3 then
strSQL=Session(strTableName & "SQL")
else
if gstrSQL="" then
strSQL="select * from " & strTableName
else
strSQL = gstrSQL
end if
' see if we have some search parameters
' regular search
if Request("action")="Search" and ( Request("SearchFor")<>"" or Request("SearchOption")="IsNull") then
strSearchFor=Trim(Request("SearchFor"))
strSearchOption=Trim(Request("SearchOption"))
if Request("SearchField")<>"AnyField" then
if IsNumeric(strSearchFor) or (IfNeedQuotes(GetFieldType(strTableName, Request("SearchField")))="True" and IsSortableField(GetFieldType(strTableName, Request("SearchField")))) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere(Request("SearchField"), strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then
strAdd = sRet
else
strAdd = "1=0"
end if
end if
else
strAdd = "1=0"
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "MaintenanceID"))="True" and IsSortableField(GetFieldType(strTableName, "MaintenanceID")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("MaintenanceID", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "AssetID"))="True" and IsSortableField(GetFieldType(strTableName, "AssetID")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("AssetID", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "AppointmentDate"))="True" and IsSortableField(GetFieldType(strTableName, "AppointmentDate")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("AppointmentDate", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "AppointmentTime"))="True" and IsSortableField(GetFieldType(strTableName, "AppointmentTime")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("AppointmentTime", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "MaintenanceDate"))="True" and IsSortableField(GetFieldType(strTableName, "MaintenanceDate")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("MaintenanceDate", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "ReturnTime"))="True" and IsSortableField(GetFieldType(strTableName, "ReturnTime")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("ReturnTime", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "OdoReading"))="True" and IsSortableField(GetFieldType(strTableName, "OdoReading")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("OdoReading", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "PONum"))="True" and IsSortableField(GetFieldType(strTableName, "PONum")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("PONum", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "CreditNum"))="True" and IsSortableField(GetFieldType(strTableName, "CreditNum")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("CreditNum", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "WONum"))="True" and IsSortableField(GetFieldType(strTableName, "WONum")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("WONum", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "RepairRequest"))="True" and IsSortableField(GetFieldType(strTableName, "RepairRequest")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("RepairRequest", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "MaintenanceDescription"))="True" and IsSortableField(GetFieldType(strTableName, "MaintenanceDescription")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("MaintenanceDescription", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "LocationID"))="True" and IsSortableField(GetFieldType(strTableName, "LocationID")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("LocationID", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "DivisionComments"))="True" and IsSortableField(GetFieldType(strTableName, "DivisionComments")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("DivisionComments", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "VendorComments"))="True" and IsSortableField(GetFieldType(strTableName, "VendorComments")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("VendorComments", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "Status"))="True" and IsSortableField(GetFieldType(strTableName, "Status")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("Status", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "Division"))="True" and IsSortableField(GetFieldType(strTableName, "Division")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("Division", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "City"))="True" and IsSortableField(GetFieldType(strTableName, "City")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("City", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
if IsNumeric(strSearchFor) or ( IfNeedQuotes(GetFieldType(strTableName, "WarrCreditID"))="True" and IsSortableField(GetFieldType(strTableName, "WarrCreditID")) ) or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere("WarrCreditID", strSearchFor, strSearchOption, "", "Basic")
if sRet<>"" then strAdd = strAdd & " or " & sRet
end if
end if
strSQL = AddWhere(strSQL, strAdd)
end if
' advanced search
if Request("action")="AdvancedSearch" then
sWhere=""
For i = 1 To Request("FieldName").Count
sFieldName = Request("FieldName")(i)
Session("SearchOption" & strTableName & "" & Request("FieldName")(i)) = Request("SearchOption")(i)
strSearchOption=Trim(Request("SearchOption")(i))
' listbox with multiple selection
if Request(sFieldName).Count>1 then
Session("SearchFor1" & strTableName & "" & Request("FieldName")(i)) = ""
sAdd=" ("
sSaved = ""
for k=1 to Request(sFieldName).Count
strSearchFor=Trim(Request(sFieldName)(k))
if sSaved <> "" then sSaved = sSaved & ","
sSaved = sSaved & strSearchFor
if IsNumeric(strSearchFor) or IfNeedQuotes(GetFieldType(strTableName, Request("FieldName")(i)))="True" or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere(Request("FieldName")(i), strSearchFor, strSearchOption, strSearchFor2, "Advanced")
if sRet<>"" then
sAdd = sAdd & sRet
if k<Request(sFieldName).Count then sAdd = sAdd & " or "
end if
end if
next
Session("SearchFor1" & strTableName & "" & Request("FieldName")(i)) = sSaved
sAdd = sAdd & ") "
if sWhere="" then sWhere="1=1"
sWhere = sWhere & " and " & sAdd
else
strSearchFor=Trim(Request(sFieldName))
strSearchFor2=Trim(Request(sFieldName & "999"))
Session("SearchFor1" & strTableName & "" & Request("FieldName")(i)) = strSearchFor
Session("SearchFor2" & strTableName & "" & Request("FieldName")(i)) = strSearchFor2
if strSearchFor<>"" or Request("SearchOption")(i)="IsNull" then
if sWhere="" then sWhere="1=1"
strSearchOption=Trim(Request("SearchOption")(i))
if (IsNumeric(strSearchFor) and (strSearchFor2="" or IsNumeric(strSearchFor2))) or IfNeedQuotes(GetFieldType(strTableName, Request("FieldName")(i)))="True" or
strSearchOption="Contains" or strSearchOption="Starts with ..." then
sRet = StrWhere(Request("FieldName")(i), strSearchFor, strSearchOption, strSearchFor2, "Advanced")
if sRet<>"" then sWhere = sWhere & " and " & sRet
end if
end if
end if
next
strSQL = AddWhere(strSQL, sWhere)
end if
end if
if strMasterKey <> "" then
n1 = InStr(LCase(strSQL), " where ")
n2 = InStr(LCase(strSQL), " order by ")
n3 = InStr(strSQL, "`AssetID` = " & strMasterKey)
if n3 = 0 then
if n1>0 then
if n2>0 then
strSQL = Left(strSQL,n1) & " where (" + Mid(strSQL, n1 + len(" where "), n2-n1-len(" where ")) + ") and `AssetID` = " & strMasterKey & Mid(strSQL, n2 )
else
strSQL = Left(strSQL,n1) & " where (" + Mid(strSQL, n1 + len(" where ")) & ") and `AssetID` = " & strMasterKey
end if
else
if n2>0 then
strSQL = Left(strSQL,n2) & " where `AssetID` = " & strMasterKey & Mid(strSQL, n2 )
else
strSQL = strSQL & " where `AssetID` = " & strMasterKey
end if
end if
end if
end if
' order by
if Request("action")<>"Search" and Request("action")<>"AdvancedSearch" and Len(Session(strTableName & "SQL"))>3 then
if strOrderBy<>"" then
if InStr(1, LCase(strSQL), "order by")>0 then
strSQL = Left(strSQL, InStr(1, LCase(strSQL), "order by")-1) & strOrderByClause
else
strSQL = strSQL & strOrderByClause
end if
end if
else
strSQL = strSQL & strOrderByClause
end if
Session(strTableName & "SQL") = strSQL
Response.Write("<html>")
Response.Write("<head>")
Response.Write("<title>maintenance</title>")
Response.Write("</head>")
Response.Write("<body topmargin=5 bgcolor=white")
if Request.Form<>"" or Request.QueryString<>"" then Response.Write(" onLoad=""if (document.frmAdmin.SearchFor != null) document.frmAdmin.SearchFor.focus();""")
Response.Write(">")
%>
<!-- log out form -->
<form name=logout method=GET action="login.asp">
<input type=hidden name=action value="logout">
</form>
<!-- edit form -->
<form method="GET" action="maintenance_edit.asp" name="editform">
<input type=hidden id="editid" name="editid" value="" >
<input type=hidden id="editid2" name="editid2" value="" >
<input type=hidden id="editid3" name="editid3" value="" >
<input type=hidden id="TargetPageNumber" name="TargetPageNumber" value=<%=TargetPageNumber%>>
<input type=hidden id="todo" name="todo" value="view">
<input type=hidden id=masterkey name=masterkey value="<%=strMasterKey%>">
</form>
<form method="GET" action="maintenance_add.asp" name="copyform">
<input type=hidden id="copyid" name="copyid" value="" >
<input type=hidden id="copyid2" name="copyid2" value="" >
<input type=hidden id="copyid3" name="copyid3" value="" >
<input type=hidden id="TargetPageNumber" name="TargetPageNumber" value=<%=TargetPageNumber%>>
<input type=hidden id="todo" name="todo" value="copy">
<input type=hidden id=masterkey name=masterkey value="<%=strMasterKey%>">
</form>
<%
' Pagination: Control Variables
dim iNumberOfRows
dim maxRecords
dim maxpages
dim mypage
iNumberOfRows =0
maxRecords = 0
maxpages = 0
mypage = TargetPageNumber
if mypage = "" then mypage =1
if CDBL(mypage)<=0 then mypage =1
%>
<% Session(strTableName & "MasterSQL")= strSQL %>
<form method="get" action="" name="details">
<input type=hidden id="masterTargetPageNumber" name="masterTargetPageNumber" value="<%=Request("TargetPageNumber")%>" >
<input type=hidden id=masterkey name=masterkey value="">
</form>
<% if strMasterKey<>"" then %>
<table><tr><td width=20> </td><td><p><%= MultilangMessage("MASTER") %>: [service]</p></td></tr></table>
<table rows='1' cols='1' align='center' width='98%' border='0'>
<tr><td align="right">
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR><TD BGCOLOR=black align=center>
<table border=0 width=100% CELLPADDING=3 CELLSPACING=1>
<%
strMasterSQL = "select `AssetID`, `StatusID`, `Attachment`, `DepartmentID`, `CustomerID`, `NxtDryDate`, `NxtWetDate`, `LastWetDate`, `NxtSerType`, `Odometer`, `NxtDryOdo`, `NxtWetOdo`, `ServiceThres`, `DayThres`, `SafetyDate`, `ReeferThres`, `NxtReeferWet`, `CurrReeferHrs`, `LastWetKM`, `KmAdjust`, `ReeferWetDate`, `IsHtrRfr`, `NoWet`, `Last_CurrServDate` From `service` where `AssetID` =" & strMasterKey
set rsMaster = Server.CreateObject ("ADODB.Recordset")
set dbConnection = server.CreateObject ("ADODB.Connection")
dbConnection.ConnectionString = strConnection
On Error Resume Next
dbConnection.Open
Call ReportError
LogInfo(strMasterSQL)
rsMaster.open strMasterSQL, dbConnection
Call ReportError
On Error Goto 0
Call DisplayMasterTableInfo(rsMaster)
rsMaster.Close
set rsMaster=Nothing
dbConnection.Close
set dbConnection = nothing
%>
</table>
</td></tr></table>
</td></tr></table>
<%end if%>
<table><tr>
<td width=30> </td>
<td align=center>
<font size=+0><b>Table: <%=Replace("maintenance", " ", " ")%></b></font>
</td><td width=50 align=center>
<td width=80% align=center>
<table align='center' border='0'>
<tr>
<td width=10> </td>
<%
if strMasterKey<>"" then
if Session(AddWrappers("service") & "_ListURL")="" then
sHref = "service_list.asp"
else
sHref = Session(AddWrappers("service") & "_ListURL")
end if
Response.write " <a href=""" & sHref & """>" & MultilangMessage("BACK_TO_MASTER") & "</a>
"
end if
%>
<%
If Session("UserID")<>"" Then
%>
<td align=center><%= MultilangMessage("LOGGED_AS") %> <b><%=Session("UserID")%></b>
<a href="#" onclick="document.forms.logout.submit();return true;"><%= MultilangMessage("LOG_OUT") %></a>
</td><td width=20> </td>
<% End If %>
<td align=center>
<a href="changepwd.asp"><%= MultilangMessage("CHANGE_PASSWORD") %></a>
</td><td width=20> </td>
<td align=center><%= MultilangMessage("LANGUAGE") %> <select name="language"
onchange="java script: document.forms.frmAdmin.action.value='language';
frmAdmin.lang.value=this.options[this.selectedIndex].value; frmAdmin.submit();">
<%
dim arrLanguages
arrLanguages = GetListOfLanguages()
for ind=lbound(arrLanguages) to ubound(arrLanguages)
lang = arrLanguages(ind)
Response.Write "<option value=""" & lang & """"
if lang=GetCurrentLanguage() then Response.Write " selected"
Response.Write ">" & lang & "</option>"
next
%></select>
</td><td width=20> </td>
<td align=center><span class="jump"><%= MultilangMessage("QUICK_JUMP") %>:</span></td>
<td align=center>
<select onchange="window.location.href=this.options[this.selectedIndex].value;">
<option value="menu.asp"><%= MultilangMessage("BACK_TO_MENU") %></option>
<%
dim tables
tables=GetTables(Session("UserID"))
for ind=lbound(tables) to ubound(tables)
response.write "<option value=""" & GetShortTableName(tables(ind)) & "_list.asp"""
if tables(ind)=RemoveWrappers(strTableName) then Response.Write " selected"
Response.Write ">" & GetTableCaption(tables(ind)) & "</option>" & vbcrlf
next
%>
</select>
</td>
<td width=20> </td>
<% if CheckSecurity("", "Search")=True then %>
<td align=center>
<a href="maintenance_search.asp" onClick="document.advsearch.submit();return false;" ><%= MultilangMessage("ADVANCED_SEARCH") %></a>
</td><td width=20> </td>
<% end if %>
<% if CheckSecurity("", "Export")=True then %>
<td align=center>
<a href="maintenance_export.asp" onClick="document.exportto.submit();return false;"><%= MultilangMessage("EXPORT_RESULTS") %></a>
</td><td width=20> </td>
<td align=center>
<a href="maintenance_print.asp" onClick="document.printerfriendly.submit();return false;">
<img src="images/printer.gif" border=0></a>
</td>
<td align=center>
<a href="maintenance_print.asp" onClick="document.printerfriendly.submit();return false;">
<%= MultilangMessage("PRINTER_FRIENDLY") %></a>
</td>
<td width=20> </td>
<% end if %>
</tr></table>
</tr></table>
<span id=pwait><p align=center><%= MultilangMessage("PLEASE_WAIT") %> ...</p></span>
<%' Control Functions %>
<form method="get" action="" name="frmAdmin">
<input type="hidden" id="TargetPageNumber" name="TargetPageNumber" value="1" >
<input type="hidden" id="action" name="action" value="Search">
<input type="hidden" id="lang" name="lang" value="">
<input type="hidden" id="orderby" name="orderby" value="<%=strOrderBy%>">
<input type="hidden" id="dir" name="dir" value="<%=strDir%>">
<input type="hidden" id="PageSize" name="PageSize" value="<%=Session("PageSize")%>">
<input type=hidden id=masterkey name=masterkey value="<%=strMasterKey%>">
<script language="JavaScript" src="include/jsfunctions.js"></script>
<script>
var bSelected=false;
function GotoPage(nPageNumber)
{
document.forms.frmAdmin.action.value = 'goto';
document.forms.frmAdmin.TargetPageNumber.value = nPageNumber;
document.forms.frmAdmin.submit();
}
</script>
<%
Response.Flush
set rs = setupRs(strConnection,strSQL,PageSize)
Call ReportError
Set FieldsList = CreateObject("Scripting.Dictionary")
for i=0 to rs.Fields.Count-1
FieldsList.Add rs.Fields(i).Name, CStr(i+1)
next
%>
<script language="JavaScript">
document.getElementById('pwait').style.display='none';
</script>
<% if CheckSecurity("", "Search")=True then %>
<%' Pagination: Write Search result Header%>
<table rows='1' cols='1' align='center' width='95%' border='0'>
<tr><td align="right">
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR><TD BGCOLOR=black align=center>
<table border=0 width=100% CELLPADDING=3 CELLSPACING=1><tr valign=center>
<% if CheckSecurity("", "Add")=True then %>
<!-- Add new record -->
<td align=center class='shade'>
<a href=maintenance_add.asp
onClick="java script: document.forms.editform.action='maintenance_add.asp';
document.forms.editform.todo.value = 'add';
document.forms.editform.TargetPageNumber.value=<%=mypage%>; document.forms.editform.submit(); return false;" ><%= MultilangMessage("ADD_NEW") %></a>
</td>
<% end if %>
<!-- Search form -->
<td align=center valign=middle class=shade>
<b><%= MultilangMessage("SEARCH_FOR") %>: </b>
<SELECT ID="SearchField" NAME="SearchField" SIZE="1">
<OPTION VALUE="AnyField"><%= MultilangMessage("ANY_FIELD") %></option>
<OPTION VALUE="MaintenanceID"><%=Label("MaintenanceID")%></option>
<OPTION VALUE="AssetID"><%=Label("AssetID")%></option>
<OPTION VALUE="AppointmentDate"><%=Label("AppointmentDate")%></option>
<OPTION VALUE="AppointmentTime"><%=Label("AppointmentTime")%></option>
<OPTION VALUE="MaintenanceDate"><%=Label("MaintenanceDate")%></option>
<OPTION VALUE="ReturnTime"><%=Label("ReturnTime")%></option>
<OPTION VALUE="OdoReading"><%=Label("OdoReading")%></option>
<OPTION VALUE="PONum"><%=Label("PONum")%></option>
<OPTION VALUE="CreditNum"><%=Label("CreditNum")%></option>
<OPTION VALUE="WONum"><%=Label("WONum")%></option>
<OPTION VALUE="RepairRequest"><%=Label("RepairRequest")%></option>
<OPTION VALUE="MaintenanceDescription"><%=Label("MaintenanceDescription")%></option>
<OPTION VALUE="LocationID"><%=Label("LocationID")%></option>
<OPTION VALUE="DivisionComments"><%=Label("DivisionComments")%></option>
<OPTION VALUE="VendorComments"><%=Label("VendorComments")%></option>
<OPTION VALUE="Status"><%=Label("Status")%></option>
<OPTION VALUE="Division"><%=Label("Division")%></option>
<OPTION VALUE="City"><%=Label("City")%></option>
<OPTION VALUE="WarrCreditID"><%=Label("WarrCreditID")%></option>
</SELECT>
<SELECT ID="SearchOption" NAME="SearchOption" SIZE="1">
<OPTION VALUE="Contains"><%= MultilangMessage("CONTAINS") %></option>
<OPTION VALUE="Equals"><%= MultilangMessage("EQUALS") %></option>
<OPTION VALUE="Starts with ..."><%= MultilangMessage("STARTS_WITH") %></option>
<OPTION VALUE="More than ..."><%= MultilangMessage("MORE_THAN") %></option>
<OPTION VALUE="Less than ..."><%= MultilangMessage("LESS_THAN") %></option>
<OPTION VALUE="Equal or more than ..."><%= MultilangMessage("EQUAL_OR_MORE") %></option>
<OPTION VALUE="Equal or less than ..."><%= MultilangMessage("EQUAL_OR_LESS") %></option>
<OPTION VALUE="IsNull"><%= MultilangMessage("EMPTY") %></option>
</SELECT>
<%
if Request("action")="Search" then
%>
<script>
var i;
for (i=0; i<document.forms.frmAdmin.SearchOption.options.length; ++i)
{
if (document.forms.frmAdmin.SearchOption.options[i].value=='<%=Request("SearchOption")%>')
{
document.forms.frmAdmin.SearchOption.selectedIndex=i;
break;
}
}
for (i=0; i<document.forms.frmAdmin.SearchField.options.length; ++i)
{
if (document.forms.frmAdmin.SearchField.options[i].value=='<%=Request("SearchField")%>')
{
document.forms.frmAdmin.SearchField.selectedIndex=i;
break;
}
}
</script>
<%
end if
%>
<input type=text size=20 name=SearchFor value="<%if Request("action")="Search" then Response.Write Request("SearchFor")%>">
<input type=button class=button name="SearchButton" value="<%= MultilangMessage("SEARCH") %>"
onClick="java script: document.forms.frmAdmin.action.value = 'Search';
document.forms.frmAdmin.submit();">
<input type=button class=button value="<%= MultilangMessage("SHOW_ALL") %>"
onClick="java script: document.forms.frmAdmin.action.value = 'Search';
document.forms.frmAdmin.SearchFor.value=''; document.forms.frmAdmin.submit();">
</td>
<!-- How many records found-->
<td align=center class=shade>
<%= MultilangMessage("DETAILS_FOUND") %>: <%=maxRecords%>
<%= MultilangMessage("PAGE1") %> <%=mypage%> <%= MultilangMessage("PAGE2") %> <%=maxpages%>
</td>
<td align=center class=shade width=100>
<!--Records per page-->
<%= MultilangMessage("RECORDS_PP") %>
<SELECT name=PageSizeSelect onChange="java script: document.forms.frmAdmin.action.value='pagesize'; document.forms.frmAdmin.PageSize.value = document.forms.frmAdmin.PageSizeSelect.options[document.forms.frmAdmin.PageSizeS
elect.selectedIndex].value;document.forms.frmAdmin.submit();">
<OPTION value=10 <%if session("pagesize")=10 then Response.Write " selected"%>>10
<OPTION value=20 <%if session("pagesize")=20 then Response.Write " selected"%>>20
<OPTION value=30 <%if session("pagesize")=30 then Response.Write " selected"%>>30
<OPTION value=50 <%if session("pagesize")=50 then Response.Write " selected"%>>50
<OPTION value=100 <%if session("pagesize")=100 then Response.Write " selected"%>>100
<OPTION value=500 <%if session("pagesize")=500 then Response.Write " selected"%>>500
<!--START-->
<script language="JavaScript">DisplayHeader();</script>
<% else %>
<% if CheckSecurity("", "Add")=True then %>
<!-- Add new record -->
<td align=center class='shade'>
<a href=maintenance_add.asp
onClick="java script: document.forms.editform.action='maintenance_add.asp';
document.forms.editform.todo.value = 'add';
document.forms.editform.TargetPageNumber.value=<%=mypage%>; document.forms.editform.submit(); return false;" ><%= MultilangMessage("ADD_NEW") %></a>
</td>
<% end if %>
<% end if %>
<% if not rs.eof then %>
<% if CheckSecurity(Session("OwnerID"), "Delete")=True then %>
<a href=# onClick = "var i; bSelected = !bSelected; for (i=0;i<document.forms.deleteform.mdelete.length;++i) document.forms.deleteform.mdelete[i].checked=bSelected;"><%= MultilangMessage("SELECT") %></a>
<a href="#" onClick="if (confirm('<%= MultilangMessage("DELETE_CONFIRM") %>')) { document.forms.deleteform.submit(); return false; } else {return true;}"><%= MultilangMessage("DELETE_SELECTED") %></a>
<% end if %>
<%
end if
' quotes for search and edit fields
for i=0 to rs.Fields.Count-1
strNeedQuotes=IfNeedQuotes(rs.Fields(i).Type)
' Response.Write "<input type=hidden name=NeedQuotes" & BuildFieldName(rs.Fields(i).Name) & " value=" & strNeedQuotes & ">" & vbCRLF
if rs.Fields(i).Name=strKeyField or rs.Fields(i).Name=strKeyField2 or rs.Fields(i).Name=strKeyField3 then
%>
<script language="JavaScript">
// document.forms.editform.NeedQuotes<%=BuildFieldName(rs.Fields(i).Name)%>.value = "<%=strNeedQuotes%>";
</script>
<%
if rs.Fields(i).Name=strKeyField then if strNeedQuotes="True" then gstrQuote=GetQuote(strTableName, rs.Fields(i).Name) else gstrQuote="" end if end if
if rs.Fields(i).Name=strKeyField2 then if strNeedQuotes="True" then gstrQuote2=GetQuote(strTableName, rs.Fields(i).Name) else gstrQuote2="" end if end if
if rs.Fields(i).Name=strKeyField3 then if strNeedQuotes="True" then gstrQuote3=GetQuote(strTableName, rs.Fields(i).Name) else gstrQuote3="" end if end if
end if
next
Session(strTableName & "_gstrQuote")=gstrQuote
Session(strTableName & "_gstrQuote2")=gstrQuote2
Session(strTableName & "_gstrQuote3")=gstrQuote3
%>
</form>
<!-- advanced search form -->
<form name=advsearch method=GET action="maintenance_search.asp">
<input type=hidden id=masterkey name=masterkey value="<%=strMasterKey%>">
</form>
<!-- export to form -->
<form target=_blank name=exportto method=GET action="maintenance_export.asp">
<input type=hidden id=mypage name=mypage value=<%=CStr(TargetPageNumber)%>>
<input type=hidden id=pagesize name=pagesize value=<%=CStr(PageSize)%>>
</form>
<!-- printer-friendly form -->
<form target=_blank name=printerfriendly method=GET action="maintenance_print.asp">
<input type=hidden id=mypage name=mypage value=<%=CStr(TargetPageNumber)%>>
<input type=hidden id=pagesize name=pagesize value=<%=CStr(PageSize)%>>
<input type=hidden id=masterkey name=masterkey value="<%=strMasterKey%>">
</form>
<!-- delete form -->
<form method="post" action="maintenance_list.asp" name="deleteform">
<input type=hidden id=masterkey name=masterkey value="<%=strMasterKey%>">
<input type=hidden id="action" name="action" value="delete">
<input type="hidden" id="TargetPageNumber" name="TargetPageNumber" value=<%=TargetPageNumber%> >
<table align='center' width='95%' border='0' cellpadding=3 cellspacing=2>
<%
if CheckSecurity("", "Search")=True then
if rs.eof then
Response.Write "<p> </p><p align=center><b>" & MultilangMessage("NO_RECORDS") & "</b></p>"
else
call WriteTableHeader
call loopRs(rs, CLng(PageSize))
end if
end if
%>
<%
rs.Close
Set rs = Nothing
%>
</table>
</form>
<% if CheckSecurity("", "Search")=True then %>
<script language="JavaScript">WritePagination(<%=mypage%>,<%=maxpages%>);</script>
<% end if %>
<%
Response.Write("</body>")
Response.Write("</html>")
function setupRs(strConnection,strSQL,nPageSize)
Err.Clear
Set setupRs = server.CreateObject ("ADODB.Recordset")
if GetDatabaseType()=DATABASE_MySQL or GetDatabaseType()=DATABASE_Oracle then setupRs.CursorLocation = 3
set dbConnection = server.CreateObject ("ADODB.Connection")
dbConnection.ConnectionString = strConnection
On Error Resume Next
dbConnection.Open
Call ReportError
LogInfo(strSQL)
setupRs.open strSQL,dbConnection, 1, 2
Call ReportError
On Error Goto 0
' Pagination:
if NOT setupRs.EOF then
maxRecords = cdbl(setupRs.RecordCount)
maxpages = maxRecords \ nPageSize
if maxRecords mod nPageSize > 0 then maxpages =maxpages +1
if cdbl(mypage) > cdbl(maxpages) then mypage = maxpages
maxrecs=nPageSize
setupRs.MoveFirst
if nPageSize (mypage-1) > 0 then setupRs.Move nPageSize (mypage-1)
End IF
end function
sub WriteTableHeader
%>
<tr CLASS="blackshade" valign=top>
<TD align=center><img src=images/icon_edit.gif></td>
<TD align=center><img src=images/icon_copy.gif></td>
<TD align=center><img src=images/icon_view.gif></td>
<TD align=center><img src=images/icon_delete.gif></td>
<td> </td>
<td> </td>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("AssetID").Type) then
Response.Write Label("AssetID") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("AssetID")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("AssetID")%>
</td>
<%
if (Request("orderby")="AssetID" or FieldsList("AssetID")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("MaintenanceDate").Type) then
Response.Write Label("MaintenanceDate") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("MaintenanceDate")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("MaintenanceDate")%>
</td>
<%
if (Request("orderby")="MaintenanceDate" or FieldsList("MaintenanceDate")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("WONum").Type) then
Response.Write Label("WONum") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("WONum")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("WONum")%>
</td>
<%
if (Request("orderby")="WONum" or FieldsList("WONum")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("RepairRequest").Type) then
Response.Write Label("RepairRequest") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("RepairRequest")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("RepairRequest")%>
</td>
<%
if (Request("orderby")="RepairRequest" or FieldsList("RepairRequest")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("MaintenanceDescription").Type) then
Response.Write Label("MaintenanceDescription") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("MaintenanceDescription")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("MaintenanceDescription")%>
</td>
<%
if (Request("orderby")="MaintenanceDescription" or FieldsList("MaintenanceDescription")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("DivisionComments").Type) then
Response.Write Label("DivisionComments") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("DivisionComments")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("DivisionComments")%>
</td>
<%
if (Request("orderby")="DivisionComments" or FieldsList("DivisionComments")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("VendorComments").Type) then
Response.Write Label("VendorComments") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("VendorComments")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("VendorComments")%>
</td>
<%
if (Request("orderby")="VendorComments" or FieldsList("VendorComments")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("LocationID").Type) then
Response.Write Label("LocationID") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("LocationID")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("LocationID")%>
</td>
<%
if (Request("orderby")="LocationID" or FieldsList("LocationID")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("Status").Type) then
Response.Write Label("Status") & "</td>"
else
%>
<a class=blackshade href="maintenance_list.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("Status")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("Status")%>
</td>
<%
if (Request("orderby")="Status" or FieldsList("Status")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
<TD>
<table><tr><td class=blackshade>
<% if not IsSortableField(rs.Fields("WarrCreditID").Type) then
Response.Write Label("WarrCreditID") & "</td>"
else
%>
<a class=blackshade href="maintenancelist.asp" onClick="java script:
document.forms.frmAdmin.action.value = 'OrderBy';
document.forms.frmAdmin.orderby.value = '<%=FieldsList("WarrCreditID")%>';
document.forms.frmAdmin.submit(); return false; "><%=Label("WarrCreditID")%>
</td>
<%
if (Request("orderby")="WarrCreditID" or FieldsList("WarrCreditID")=Request("orderby")) and strOrderImage<>"" then
Response.Write "<td><img src=images/" & strOrderImage & " border=0></td>"
end if
end if
%>
</tr></table>
</TD>
</tr>
<%
end sub
' display table with results
sub loopRs(rs,nPageSize)
' Pagination:
dim iShadeTheDetail, iNumberOfRows, nColumns
iNumberOfRows = 0
nDelete=1
nColumns=0
if isObject(rs) then
' Pagination: UNTIL iNumberOfRows>=maxrecs
DO UNTIL rs.eof OR iNumberOfRows>=nPageSize
' To insure that every other one is shaded
If iShadeTheDetail = 0 then
sShadeClass = "class=shade"
iShadeTheDetail = 1
Else
sShadeClass = ""
iShadeTheDetail = 0
End If
%>
<tr valign=top
<%=sShadeClass%> onmouseover="rowRollover(<%=iNumberOfRows%>, 1);" onmouseout="rowRollover(<%=iNumberOfRows%>, 0);" id="tr<%=iNumberOfRows%>" >
<td align=center>
<%
nColumns = nColumns + 1
strOwnerID = RemoveWrappers("``")
if strOwnerID<>"" then strOwnerID = rs(strOwnerID)
if CheckSecurity(strOwnerID, "Edit")=True then
%>
<a href="maintenance_edit.asp"
onClick="java script: document.forms.editform.TargetPageNumber.value=<%=mypage%>;
document.forms.editform.editid.value = '<%=EscapeQuotes(rs(strKeyField))%>';
<% if strKeyField2<>"" then %>
document.forms.editform.editid2.value = '<%=EscapeQuotes(rs(strKeyField2))%>';
<% end if %>
<% if strKeyField3<>"" then %>
document.forms.editform.editid3.value = '<%=EscapeQuotes(rs(strKeyField3))%>';
<% end if %>
document.forms.editform.todo.value = 'view';document.forms.editform.submit();
return false;" ><%= MultilangMessage("EDIT") %></a>
<% end if %>
</td>
<td align=center>
<%
nColumns = nColumns + 1
strOwnerID = RemoveWrappers("``")
if strOwnerID<>"" then strOwnerID = rs(strOwnerID)
if CheckSecurity(strOwnerID, "Add")=True then
%>
<a href="maintenance_add.asp"
onClick="java script: document.forms.copyform.TargetPageNumber.value=<%=mypage%>;
document.forms.copyform.copyid.value = '<%=EscapeQuotes(rs(strKeyField))%>';
<% if strKeyField2<>"" then %>
document.forms.copyform.copyid2.value = '<%=EscapeQuotes(rs(strKeyField2))%>';
<% end if %>
<% if strKeyField3<>"" then %>
document.forms.copyform.copyid3.value = '<%=EscapeQuotes(rs(strKeyField3))%>';
<% end if %>
document.forms.copyform.todo.value = 'copy';document.forms.copyform.submit();
return false;" ><%= MultilangMessage("COPY") %></a>
<% end if %>
</td>
<td align=center>
<a href="maintenance_view.asp"
onClick="java script: document.forms.editform.action='maintenance_view.asp';
document.forms.editform.TargetPageNumber.value=<%=mypage%>;
document.forms.editform.editid.value = '<%=EscapeQuotes(rs(strKeyField))%>';
<%
nColumns = nColumns + 1
if strKeyField2<>"" then %>
document.forms.editform.editid2.value = '<%=EscapeQuotes(rs(strKeyField2))%>';
<% end if %>
<% if strKeyField3<>"" then %>
document.forms.editform.editid3.value = '<%=EscapeQuotes(rs(strKeyField3))%>';
<% end if %>
document.forms.editform.todo.value = 'readonly';document.forms.editform.submit();
return false;" ><%= MultilangMessage("VIEW") %></a>
</td>
<td align=center valign=middle>
<%
nColumns = nColumns + 1
strOwnerID = RemoveWrappers("``")
if strOwnerID<>"" then strOwnerID = rs(strOwnerID)
if CheckSecurity(strOwnerID, "Delete")=True then %>
<input type=checkbox name=mdelete value=<%=nDelete%>>
<input type=hidden name=mdelete1 value="<%=rs(strKeyField)%>">
<% if strKeyField2<>"" then %>
<input type=hidden name=mdelete2 value="<%=rs(strKeyField2)%>">
<% end if %>
<% if strKeyField3<>"" then %>
<input type=hidden name=mdelete3 value="<%=rs(strKeyField3)%>">
<% end if
nDelete = nDelete + 1
%>
<%
end if
%>
</td>
<td align=center>
<%
nColumns = nColumns + 1
strQuote = GetQuote(strTableName, "`AssetID`")
%>
<a href="assetinfo_list.asp" onClick = "document.forms.details.action='assetinfo_list.asp';document.forms.details.masterkey.value='<%=EscapeQuotes(strQuote & rs(RemoveWrappers("`AssetID`")) & strQuote)%>'; document.forms.details.submit();return false;">
assetinfo
</a>
</td>
<td align=center>
<%
nColumns = nColumns + 1
strQuote = GetQuote(strTableName, "`AssetID`")
%>
<a href="service_list.asp" onClick = "document.forms.details.action='service_list.asp';document.forms.details.masterkey.value='<%=EscapeQuotes(strQuote & rs(RemoveWrappers("`AssetID`")) & strQuote)%>'; document.forms.details.submit();return false;">
service
</a>
</td>
<TD>
<%
if IsBinaryField(rs.Fields("AssetID")) or Format("AssetID")=FORMAT_DATABASE_FILE then
Response.Write CreateImageControl(rs, "AssetID", "")
else
strData = GetData(rs.Fields("AssetID"), "")
Response.Wr