| "
response.write " " & mainIntroText & " "
Set val = conn.execute("SELECT id, catName, shortD, catEnabled FROM cats WHERE parentID = 0 AND catEnabled = 1 AND hideCat = 0 ORDER BY sortNum, catName")
response.write ""
If val.eof Then response.write "No categories found. "
num = 0
Do While Not val.eof
If num = 0 Then
catname1 = val(1)
id1 = val(0)
shortd1 = val(2)
num = 1
Else
response.write "" & catname1 & " " & shortd1 & "
| "
response.write "" & val(1) & " " & val(2) & "
| "
catname1 = ""
id1 = ""
shortd1 = ""
num = 0
End If
val.MoveNext
Loop
If num = 1 Then response.write "" & catname1 & " " & shortd1 & "
| | "
val.close
response.write " "
'=================================
'If a Category Is Specified
'=================================
Else
Set val = conn.execute("SELECT longD,catName,parentID,requireLogin,showFile FROM cats WHERE catEnabled = 1 AND id = " & onlyNumbers(request("id")))
If Not val.eof Then
If val(3) AND request.cookies("rcShopper") = "" AND regCustomerRecords <> "0" Then response.redirect secureYes & "rcLogin.asp?" & theOutput & "&l=true"
If val(4) <> "" Then response.redirect secureNo & val(4)
lastOne=1
For i = 1 to 10
If onlyNumbers(request("c" & i)) <> "" Then
cTrail = cTrail & " >> "
For j = 1 to 10
If request("c" & j) <> "" AND j < lastOne Then addOn = addOn & "&c" & j & "=" & request("c" & j)
Next
Set temp = conn.execute("SELECT catName FROM cats WHERE id = " & onlyNumbers(request("c" & i)))
cTrail = cTrail & "" & temp("catName") & ""
URLaddOn = URLaddOn & "&c" & i & "=" & onlyNumbers(request("c" & i))
lastOne = lastOne+1
addOn = ""
temp.close
End If
Next
Call loginWrite()
'Edit Text Here
response.write " |
| "
response.write " Products" & cTrail & " >> " & val("catName") & "
"
response.write "" & val("catName") & " " & val("longD") & " "
'End Edit
response.write ""
If val.eof Then
response.write "Category Not Found. "
Else
num = 0
Set childrenCats = conn.execute("SELECT catName,id,shortD FROM cats WHERE catEnabled = 1 AND hideCat = 0 AND parentID = " & onlyNumbers(request("id")) & " ORDER BY catName DESC")
Do While Not childrenCats.eof
If num = 0 Then
catname1 = childrenCats("catName")
id1 = childrenCats("id")
shortd1 = childrenCats("shortD")
num = 1
Else
'Edit Text Here
response.write "" & catname1 & " " & shortd1 & "
| " & vbCrLf
response.write "" & childrenCats("catName") & " " & childrenCats("shortD") & "
| " & vbCrLf
'End Edit
catname1 = ""
id1 = ""
shortd1 = ""
num = 0
End If
childrenCats.MoveNext
Loop
childrenCats.close
'Edit Text Here
If num = 1 Then response.write "" & catname1 & " " & shortd1 & "
| | "
'End Edit
End If
val.close
response.write " "
'=================================
'Now Do The Products
'=================================
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
imgPath = "rcadmin/" & imgPath
picsPath = Server.Mappath(imgPath) & "/"
id = onlyNumbers(request("id"))
Set temp = conn.execute("SELECT twinID,hideBasePrice FROM cats WHERE id = " & id)
id = temp(0)
If temp(1) Then hideBasePrice = True Else hideBasePrice = False
temp.close
response.write "" & vbCrLf
SQL = "SELECT products.id, products.shortD, products.prodName, products.basePrice, products.listDate, products.pop, products.newTag"
SQL = SQL & ", (SELECT count(id) FROM varvals WHERE prodID = products.id) as numVars"
SQL = SQL & ", (SELECT salePrice FROM prodOptions WHERE prodID = products.id AND saleStart <= " & dateVar & FormatDateTime(Now,vbShortDate) & dateVar & " AND saleEnd >= " & dateVar & FormatDateTime(Now,vbShortDate) & dateVar & " AND salePrice > 0) as saleValue"
SQL = SQL & ", (SELECT mName FROM manufacturers WHERE id <> 1 AND id = products.manu) as manu"
SQL = SQL & " FROM catProds INNER JOIN products ON catProds.prodID = products.id WHERE catProds.catID = " & id & " AND products.prodEnabled <> 0 AND products.listDate <= " & dateVar & FormatDateTime(Now,vbShortDate) & dateVar & " ORDER BY catProds.sortNum, products.basePrice DESC,products.prodname"
Set val = conn.execute(SQL)
colNum = 1
Do While Not val.eof
prodName = val(2)
If regForceCaps Then prodName = uCase(prodName)
id = val(0)
shortD = val(1)
salePrice = val("saleValue")
If val("numVars") = 0 Then prodDest = "rcCart" Else prodDest = "rcProd1"
If Not isNumeric(regNewTag) Then regNewTag = 0
tagValue = ""
If isNumeric(salePrice) Then
salePrice = " SALE " & FormatCurrency(salePrice,2)
tagValue = " "
Elseif val(6) AND DateDiff("d",val(4),Now) < cInt(regNewTag) Then
tagValue = " "
Elseif val(5) Then
tagValue = " "
Else
tagValue = ""
End If
If Not hideBasePrice Then thePrice = FormatCurrency(val(3),2)
manu = val("manu")
If Not isNull(manu) AND manu <> "" AND regManuShow Then mName = manu & " " Else mName = ""
img = ""
For Each k in docAllow
If objFSO.FileExists(picsPath & id & "-1." & k) Then
getImgSize(picsPath & id & "-1." & k)
img = " "
End If
Next
If colNum = 1 Then response.write ""
Call prodBuilder()
If colNum = numberOfColumns Then
colNum = 1
response.write " " & vbCrLf
Else
colNum = colNum + 1
End If
val.MoveNext
Loop
For i = 1 to numberOfColumns
If colNum < numberOfColumns Then
response.write " | "
If colNum + 1 = numberOfColumns Then response.write ""
colNum = colNum + 1
End If
Next
response.write " "
val.close
End If
Sub prodBuilder()
'Edit Text Here
%>
|
|
<%
'End Edit
End Sub
End If %>