%@ LANGUAGE=VBScript %> <% Response.Buffer = True %> <% IF Session("Common_Access") < 1 THEN 'msgbox "Invalid User Name OR Password",48,"Warning" Response.Clear 'error logon warning Response.Redirect "Default.asp" END IF %>
|
![]()
|
||
| <%= FormatDateTime (date, vbLongDate) %> | |||
|
<% IF Session("ProdSearch") =0 THEN DIM prodTemp, compTemp, cateTemp, cat_v cat_v = "" IF Request.Form("lc_product") = "" Then prodTemp = "%" Else prodTemp = Request.Form("lc_product") End IF IF Request.Form("lc_company") = "" Then compTemp = "%" Else compTemp = Request.Form("lc_company") End IF IF Request.Form("lc_catalog") = "All" Then cateTemp = "%" Else cateTemp = Request.Form("lc_catalog") End IF ELSE gpageSelect = Request.Form("Direct") gPageSize = Request.Form("PageSize") gPage = Request.Form("PageNo") END IF Set IndustryNetSQL = Server.CreateObject("ADODB.Connection") IndustryNetSQL.Open "thaiindustry", "tinhosting", "tinhosting" sql = "SELECT productName, name, brandname, productdescription, " &_ " specification, packing, categories.category " &_ " FROM Products, Categories, Company " &_ " WHERE products.companyid = company.companyid AND " &_ " Products.catid = categories.catid AND " &_ " Products.productName LIKE '" & prodTemp & "%' AND " &_ " Categories.category LIKE '" & cateTemp & "%' AND " &_ " name LIKE '" & compTemp & "%'" &_ " ORDER BY categories.category ASC, productName ASC" Set RS = IndustryNetSQL.Execute(sql) Set RS_r = Server.CreateObject("ADODB.Recordset") RS_r.open sql,IndustryNetSQL,1,3 Set RS_r = IndustryNetSQL.Execute(sql) On Error Resume next TotalRows = RS_r.RecordCount RS_r.PageSize = gPageSize PageSize = RS_r.PageSize TotalPages = RS_r.PageCount SELECT CASE gPageSelect CASE "<<" PageNo = 1 CASE "<" IF gPage = 1 THEN PageNo = 1 ELSE PageNo = gPage - 1 END IF CASE ">" IF gPage = TotalPages THEN PageNo = TotalPages ELSE PageNo = gPage + 1 END IF CASE ">>" gPage = TotalPages CASE "Goto" IF gPage>=TotalPages THEN PageNo=TotalPages ELSEIF gPage <= 1 THEN PageNo = 1 ELSE PageNo = gPage + 1 END IF CASE "" PageNo = 1 END SELECT RS.Absolutepage = gPage Rowcount = 1 %>
|
|
|