<% Option Explicit %> <% If session("LANGUAGE") = "" Then response.Redirect("index.asp") End If Dim id, Search, SearchText Dim SQL, MontAnvisningarRS Dim Counter Counter = "productInfoRowWhite" Dim ArticleType If Request.Form("ArticleType") <> "" Then ArticleType = Request.Form("ArticleType") Else ArticleType = -1 Dim newsRS id = Request.QueryString("id") Search = Request.Form("Search") SearchText = Request.Form("SearchText") SearchText = Trim(SearchText) SearchText = Replace(SearchText," ","%") If ArticleType <> "-1" Then If SearchText <> "" Then ' Tröck på knappen "Spara" ' SQL = "SELECT * FROM tbl_calix_montanvisning WHERE (fld_name LIKE '%" & SearchText & "%' OR fld_filename LIKE '%" & SearchText & "%') AND fld_type = " & ArticleType & " ORDER BY fld_type, fld_name;" SQL = "SELECT " &_ "fld_date, " &_ "HEX(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(fld_name, 'RE', ''), 'M', ''), 'A', ''), 'B', ''), 'C', ''), 'D', ''), 'L', ''), 'V', ''), 'PH', ''), 'U', '')) AS fld_sort, "&_ "fld_name, "&_ "fld_filename, "&_ "fld_type "&_ "FROM tbl_calix_montanvisning "&_ "WHERE (fld_name LIKE '%" & SearchText & "%' OR fld_filename LIKE '%" & SearchText & "%') AND fld_type = " & ArticleType & " "&_ "ORDER BY "&_ "fld_type, "&_ "CAST(fld_sort AS UNSIGNED);" Set MontAnvisningarRS = Conn.Execute(SQL) Else ' SQL = "SELECT * FROM tbl_calix_montanvisning WHERE fld_type = " & ArticleType & " ORDER BY fld_type, fld_name;" SQL = "SELECT " &_ "fld_date, " &_ "HEX(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(fld_name, 'RE', ''), 'M', ''), 'A', ''), 'B', ''), 'C', ''), 'D', ''), 'L', ''), 'V', ''), 'PH', ''), 'U', '')) AS fld_sort, "&_ "fld_name, "&_ "fld_filename, "&_ "fld_type "&_ "FROM tbl_calix_montanvisning "&_ "WHERE fld_type = " & ArticleType & " "&_ "ORDER BY "&_ "fld_type, "&_ "CAST(fld_sort AS UNSIGNED);" Set MontAnvisningarRS = Conn.Execute(SQL) End If Else If SearchText <> "" Then ' Tröck på knappen "Spara" ' SQL = "SELECT * FROM tbl_calix_montanvisning WHERE (fld_name LIKE '%" & SearchText & "%' OR fld_filename LIKE '%" & SearchText & "%') ORDER BY fld_type, fld_name;" SQL = "SELECT " &_ "fld_date, " &_ "HEX(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(fld_name, 'RE', ''), 'M', ''), 'A', ''), 'B', ''), 'C', ''), 'D', ''), 'L', ''), 'V', ''), 'PH', ''), 'U', '')) AS fld_sort, "&_ "fld_name, "&_ "fld_filename, "&_ "fld_type "&_ "FROM tbl_calix_montanvisning "&_ "WHERE (fld_name LIKE '%" & SearchText & "%' OR fld_filename LIKE '%" & SearchText & "%') "&_ "ORDER BY "&_ "fld_type, "&_ "CAST(fld_sort AS UNSIGNED);" Set MontAnvisningarRS = Conn.Execute(SQL) Else ' SQL = "SELECT * FROM tbl_calix_montanvisning ORDER BY fld_type, fld_name;" SQL = "SELECT " &_ "fld_date, " &_ "HEX(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(fld_name, 'RE', ''), 'M', ''), 'A', ''), 'B', ''), 'C', ''), 'D', ''), 'L', ''), 'V', ''), 'PH', ''), 'U', '')) AS fld_sort, "&_ "fld_name, "&_ "fld_filename, "&_ "fld_type "&_ "FROM tbl_calix_montanvisning "&_ "ORDER BY "&_ "fld_type, "&_ "CAST(fld_sort AS UNSIGNED);" Set MontAnvisningarRS = Conn.Execute(SQL) End If End If Dim TempType TempType = "" %> Calix AB
<%= Translate("SearchInstallationInstructionsHeader") %>
<%= Translate("SearchInstallationInstructionsText") %>


<% If MontAnvisningarRS.EOF Then %> <% Else Do Until MontAnvisningarRS.EOF If TempType <> MontAnvisningarRS("fld_type") Then TempType = MontAnvisningarRS("fld_type") Response.Write(" " & vbcrlf) Counter = "productInfoRowWhite" End If %> <% If Counter = "productInfoRowWhite" Then Counter = "productInfoRowGrey" Else Counter = "productInfoRowWhite" End If MontAnvisningarRS.Movenext Loop End If %>
">
" type="submit" class="button">


<%= Translate("InstallationInstructions") %> <%= Translate("Date") %>

<%= Translate("NoProducts") %>

" & GetTypeName(TempType) & " 
" target="_blank"><%= MontAnvisningarRS("fld_name") %> <%= MontAnvisningarRS("fld_date") %>
 
<% Conn.Close: Set Conn = Nothing %>