%
'*********************************
' * * * N O T I C E * * *
'*********************************
' (c)2001, Grayworld Media, All rights reserved
'
' Grayworld Media is a wholly owned business of John Gray Kales.
'
' No claim to copyright is made for original U.S. Government Works.
'
' This work is wholly owned by Grayworld Media and may not be
' used, in whole or in part, by any person, group or entity to
' generate income or promote a business, service or product
' without the explicit permission of John Gray Kales.
'
' Alteration of this program in any way is strictly prohibited.
' This includes the alteration or removal of this copyright
' notice or alteration of source code.
'
' Violation of this notice will be pursued to the full extent of the law.
%>
<%
imagedirectory = aRootPath & "images\categories\"
set categories = Server.CreateObject("ADODB.Recordset")
if request("category") = "" then
itemSQL = "SELECT * FROM categories ORDER BY Category"
categories.Open itemSQL, ConnString
category = categories("Category")
categories.close
itemSQL = "SELECT * FROM categories WHERE Category = '" & category & "' ORDER BY Category"
else
itemSQL = "SELECT * FROM categories WHERE Category = '" & request("category") & "' ORDER BY Category"
category = request("Category")
end if
categories.Open itemSQL, ConnString
Display
categories.close
set categories = nothing
sub DispImage
recno = categories("ID")
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.FileExists(server.mappath(wsRootPath) & "images/categories/" & recno & ".jpg") then
response.write("
")
end if
set fso = nothing
end sub
sub DispItemImage(IDin)
recno = IDin
'response.write(server.mappath(wsRootPath & "images/items/" & recno & ".jpg"))
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.FileExists(server.mappath(wsRootPath & "images/items/" & recno & ".jpg")) then
response.write("
")
end if
set fso = nothing
end sub
sub DispHeadline
if NOT categories("Headline") = "" then
response.write("
"&categories("Headline")&"
")
end if
end sub
sub DispCategory
if NOT categories("Category") = "" then
response.write(categories("Category"))
end if
end sub
sub DispDescription
Description = categories("Description")
if NOT Description = "" then
response.write(Description)
end if
'
' endposition = 1
' check = true
' for position = 1 to len(Description)
' if mid(Description,position,1) = "." and check then
' endposition = position
' check = false
' end if
' next
' stringout = ""
' stringout = stringout & mid(Description,1,endposition)
' stringout = stringout & "" & mid(Description,endposition+1)
' if len(Description) > 0 then
' response.write(stringout)
' else
' end if
end sub
sub ShowCatMenu
if request("showmenu") = "Yes" then
CatMenu
end if
end sub
%>
<% sub Display %>
Bright Solutions - Browse Catelog
<% if NOT categories.EOF then %>
|
|
<%= categories("Headline")%><%' DispImage %><%' DispDescription%>
|
<%
set itemlist = Server.CreateObject("ADODB.Recordset")
itemSQL = "SELECT * FROM items WHERE Category = '" & categories("Category") & "' ORDER BY PartNumber"
itemlist.Open itemSQL, ConnString
if itemlist.BOF and itemlist.EOF then
else
itemlist.movefirst
do while NOT itemlist.EOF
%>
| <%= itemlist("PartNumber")%> |
|
<% DispItemImage(itemlist("ID")) %>
|
| <%= itemlist("Description")%> |
More Info
|
|
<%
itemlist.movenext
loop
end if
itemlist.close
set itemlist = nothing
%>
|
|
|
 |
|
|
|
|
|
<% else %>BAD CATEGORY <% end if %>
<% end sub %>