|
<%
Dim Conn,strSQL,objRec
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "Driver={SQL Server};Server=mssql0818.wc2\inst2;Database=515116_s63;UID=515116_s63;PWD=dK7zviws776;"
If Width = 0 AND Height = 0 Then
strSQL = "SELECT * FROM tbl_product_index WHERE StatusID = 1 ORDER BY SeriesID"
End If
If Width = 10 AND Height = 0 Then
strSQL = "SELECT * FROM tbl_product_index WHERE Width = 10 AND StatusID = 1 ORDER BY SeriesID"
End If
If Width = 20 AND Height = 20 Then
strSQL = "SELECT * FROM tbl_product_index WHERE Width = 20 AND Height = 20 AND StatusID = 1 ORDER BY SeriesID"
End If
If Width = 20 AND Height = 0 Then
strSQL = "SELECT * FROM tbl_product_index WHERE Width = 20 AND Height > 20 AND StatusID = 1 ORDER BY SeriesID"
End If
If Width = 30 AND Height = 0 Then
strSQL = "SELECT * FROM tbl_product_index WHERE Width = 30 AND StatusID = 1 ORDER BY SeriesID"
End If
If Width = 40 AND Height = 0 Then
strSQL = "SELECT * FROM tbl_product_index WHERE Width = 40 AND StatusID = 1 ORDER BY SeriesID"
End If
If Width = 50 AND Height = 0 Then
strSQL = "SELECT * FROM tbl_product_index WHERE Width = 50 AND StatusID = 1 ORDER BY SeriesID"
End If
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.Open strSQL, Conn, 1,3
If objRec.EOF Then
Response.write (" Not found record.")
Else
Dim PageLen,PageNo,TotalRecord,TotalPage,No,intID
PageLen = 7
PageNo = Request.QueryString("Page")
if PageNo = "" Then PageNo = 1
TotalRecord = objRec.RecordCount
objRec.PageSize = PageLen
TotalPage = objRec.PageCount
objRec.AbsolutePage = PageNo
%>
<%
No=1
Do While Not objRec.EOF and No <= PageLen
%>
.png" width="17" height="17" border="0" alt="">
<%
SQL1 = "SELECT TOP 1 * FROM tbl_product_images WHERE ProductID = " & objRec.Fields("ProductID").Value & " ORDER BY ImageID ASC"
Set rstemp1 = conntemp.Execute(SQL1)
%>
<%If rstemp1.EOF Then%>
<%Else%>
<%Do While NOT rstemp1.EOF%>
">" width="139" height="94" border="0" alt="">
<%
rstemp1.movenext
Loop
rstemp1.close
Set rstemp1=Nothing
%>
<%End If%>
|
<%=objRec.Fields("Width").Value%>' x <%=objRec.Fields("Height").Value%>' <%=objRec.Fields("SizeDesc").Value%> Inventory: <%=objRec.Fields("Inventory").Value%> ">Click to Preview
<%
SQL1 = "SELECT TOP 1 * FROM tbl_product_data WHERE ProductID = " & objRec.Fields("ProductID").Value & " AND ItemPrice > 99 ORDER BY ItemPrice ASC"
Set rstemp1 = conntemp.Execute(SQL1)
%>
<%If rstemp1.EOF Then%>
<%Else%>
<%Do While NOT rstemp1.EOF%>
Starting at $<%=rstemp1("ItemPrice")%>
<%
rstemp1.movenext
Loop
rstemp1.close
Set rstemp1=Nothing
%>
<%End If%>
|
<%
No = No + 1
objRec.MoveNext
Loop
%>
|