Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 4th, 2005, 11:49 PM
wpattison3 wpattison3 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 1 wpattison3 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 43 sec
Reputation Power: 0
Noobe a.b.c.d.....sitemap Please help

I posted earlier for a treeview. However, I've just changed my mind and want to go to an alphabetical order type sitemap similar to this sitemap done in php.

Thanks in advance for your thoughts.

Code:

<%Option Explicit%>
<!--#include file="shop$db.asp"-->
<!--#include file="shopproductfeatures.asp"-->
<!--#include file="shopconvertcurrency.asp"-->
<!--#include file="shopcustomerprices.asp"-->
<!--#include file="shopproductformat.asp"-->
<!--#include file="shopreviewaverage.asp"-->
<!--#include file="shopproductcreatesql.asp"-->
<!--#include file="shopproductformat_template.asp"-->
<!--#include file="shopfileio.asp"--><%

response.buffer = false 


function StripHTML( byref asHTML)
	Dim loRegExp	' Regular Expression Object
	
	' Create built In Regular Expression object
	Set loRegExp = New RegExp
	loRegExp.Global = True
	
	' Set the pattern To look For HTML tags
	loRegExp.Pattern = "<[^>]*>"
	
	' Return the original String stripped of HTML
	StripHTML = loRegExp.Replace(asHTML, "")
	
	' Release object from memory
	Set loRegExp = Nothing
	
End function

ShopPageHeader                  ' normal page header
%><h1>Sitemap</h1><% 

Dim Dbc
dim sql_product
dim rs_product
dim CurrentCategory
dim ProductName
Shopopendatabase dbc


sql_product = "SELECT products.catalogid, products.Cname, " & _
			" Categories.Catdescription " & _
			"  FROM products inner join Categories on Categories.Categoryid = products.ccategory" & _	
			" Order by Categories.Catdescription, products.Cname ASC"
			
set rs_product = dbc.Execute( sql_product )
CurrentCategory = ""
do while rs_product.eof = false
	if CurrentCategory <> rs_product("Catdescription") then
		response.write "<h2>" & rs_product("Catdescription") & "</h2>" & vbcrlf
		CurrentCategory = rs_product("Catdescription")
	end if
	ProductName = UCase(Left(rs_product("Cname"), 1)) & LCase(Mid(rs_product("Cname"), 2))
	ProductName = StripHTML( ProductName )
    %><a href="/shopexd.asp?id=<%=rs_product("catalogid")%>" style="padding-bottom:3px; "><%=ProductName%></a><br> 
	<%
	response.write vbcrlf

	rs_product.movenext
loop


shopclosedatabase dbc

ShopPageTrailer                 ' normal trailer
%>

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Noobe a.b.c.d.....sitemap Please help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway