%
set con = Server.CreateObject("ADODB.Connection")
con.Open strCon
%>
<%
if Request.QueryString("step") = "" then
sql1 = "select * from category1 where parentcatid = -1 and active=1 and langFlag = 'G' order by sort"
set rscat = server.CreateObject("ADODB.Recordset")
set rscat = con.execute(sql1)
%>
<%
dim i, flag
temparr = split(Request.QueryString("pstring"),",",-1)
set temprs = server.CreateObject("ADODB.Recordset")
Response.Write ("")
for i= 0 to ubound(temparr)
sql2 = "select catid, name from category1 where catid = "& temparr(i)&" and langFlag = 'G' order by sort"
set temprs = con.execute(sql2)
Response.Write("" &temprs(1)& "" &" > ")
catname=temprs(1)
next
Response.Write (" |
")
temprs.Close()
set temprs = nothing
if rscat.EOF then
flag = 0
%> <% else
flag = 1
dim ctr1
ctr1 = 0
%>
Sub-Categories under the category : <%=catname%>
|
<%
while not rscat.EOF
if ctr1 mod 2 = 0 and ctr1 <> 0 then
response.write" "
end if
ctr1=ctr1+1
'*************start of code to calculate height and width of image*************
img = rscat("image1")
Set objFSO = CreateObject("Scripting.FileSystemObject")
path = server.MapPath("products.asp")
path1 = left(path,InStr(path,"greek\html\products.asp"))
Set objF = objFSO.GetFolder(path1 &"..\..\media\catimg\")
Set objFC = objF.Files
For Each f1 in objFC
if f1.Name = img then
fname = f1.name
fpath = f1.path
end if
next
if not (fpath = "") then
strWH=gfxSpex(fPath)
arrwh=Split(strWH,",")
width=int(arrwh(0))
height=int(arrwh(1))
if (width > 165) then
width = 165
end if
end if
'*************End of Code to calculate height and width of image*************
%>
|
<%
rscat.MoveNext
wend
%>
|
<% end if %>
<%
set rsestmt = server.CreateObject("ADODB.Recordset")
sql3 = "select * from item where catid = "& catid &" and active = 1 order by sort"
set rsestmt = con.execute(sql3)
if not rsestmt.eof then
flag = 1
dim ctr2
ctr2=0
%>
<%
while not rsestmt.eof
if ctr2 mod 2 = 0 and ctr2 <> 0 then
response.write" "
end if
ctr2=ctr2+1
'*************start of code to calculate height and width of image*************
img = rsestmt("imagefile")
Set objFSO = CreateObject("Scripting.FileSystemObject")
path = server.MapPath("products.asp")
path1 = left(path,InStr(path,"greek\html\products.asp"))
Set objF = objFSO.GetFolder(path1 &"..\..\media\products\")
Set objFC = objF.Files
For Each f1 in objFC
if f1.Name = img then
fname = f1.name
fpath = f1.path
end if
next
if not (fpath = "") then
strWH=gfxSpex(fPath)
arrwh=Split(strWH,",")
width=int(arrwh(0))
height=int(arrwh(1))
if (width > 165) then
width = 165
end if
end if
'*************End of Code to calculate height and width of image*************
%>
|
<%
rsestmt.movenext
wend
%>
|
<% end if %>
<%
if flag = 0 then
%>
Sorry no Subcategory
or Product found. |
<% end if
rscat.Close()
set rscat = nothing
rsestmt.Close()
set rsestmt = nothing
%>
|
<% end if %>
<% end if %>