<% Set conn = Server.CreateObject ("ADODB.Connection") conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("bbg/bbg.mdb") conn.Open Function valid_sql(s) For i = 1 To Len(s) If Mid(s, i, 1) = "'" or Mid(s, i, 1) = "*" or Mid(s, i, 1) = "%" Then temp = temp + "" else temp = temp + Mid(s, i, 1) end if Next valid_sql=trim(temp) End Function function sql_filter(str) str = trim(str) if str = "" then exit function str = replace(str,"<","<",1,-1,1) str = replace(str,">",">",1,-1,1) str = replace(str,"""","""",1,-1,1) str = replace(str,"'","""",1,-1,1) str = replace(str,"=","=",1,-1,1) str = replace(str," "," ",1,-1,1) str = replace(str,"select","sel_ect",1,-1,1) str = replace(str,"join","jo_in",1,-1,1) str = replace(str,"union","un_ion",1,-1,1) str = replace(str,"where","wh_ere",1,-1,1) str = replace(str,"insert","ins_ert",1,-1,1) str = replace(str,"delete","del_ete",1,-1,1) str = replace(str,"update","up_date",1,-1,1) str = replace(str,"like","lik_e",1,-1,1) str = replace(str,"drop","dro_p",1,-1,1) str = replace(str,"create","cr_eate",1,-1,1) str = replace(str,"modify","mod_ify",1,-1,1) str = replace(str,"rename","ren_aMe",1,-1,1) str = replace(str,"alter","alt_er",1,-1,1) str = replace(str,"cast","ca_st",1,-1,1) sql_filter = str end function %> <% Dim Currpage, pageLen, lastNumber, PageRem, PageTen Dim connection, rsGetProducts, sSQL, sConnString, next10, prev10, P Dim RSPrevPage, RSNextPage, start If IsEmpty(Request.Querystring("PageNo")) then CurrPage = 1 Else CurrPage = Cint(Request.Querystring("PageNo")) End If Function getNext10(num) pageLen = len(num) If pageLen = 1 Then next10 = 12 Else If pageLen>1 Then pageRem = 12 pageTen = right(num, 1) next10 = num + pageRem - pageTen End If End If getNext10 = next10 End Function Function getPrev10(num) pageLen = len(num) If pageLen = 1 then prev10 = 1 Else If pageLen>1 then lastNumber = right(num, 1) prev10 = num - lastNumber - 12 End If End If If prev10 = 0 then prev10 = 1 End If getPrev10 = prev10 End Function Set rsGetProducts=Server.CreateObject("Adodb.Recordset") rsGetProducts.CursorLocation = 3 rsGetProducts.CursorType = 3 qry = "select * from products where categoryid = "& sql_filter(valid_sql(Request.QueryString("categoryid"))) rsGetProducts.open qry, conn rsGetProducts.PageSize=12 rsGetProducts.AbsolutePage = CurrPage next10 = getNext10(CurrPage) prev10 = getPrev10(CurrPage) %> Welcome To BlackBridalGuide.com - African American Wedding Planning – Jumping Brooms – African American Bridal Hairstyles, African American Wedding Planners <% Set rsmeta=Server.CreateObject("Adodb.Recordset") qry = "select * from products where categoryid = 30" rsmeta.open qry, conn if not rsmeta.bof or not rsmeta.eof then do until rsmeta.eof meta = meta & rsmeta("productname") & ", " rsmeta.movenext loop end if rsmeta.close set rsmeta = nothing %>
<% set rsbanner = server.CreateObject("adodb.recordset") if Request.ServerVariables("SCRIPT_NAME") = "/black/index.asp" then banner = " select * from banners where page_name = 'Home'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/wedding_gown.asp" then banner = " select * from banners where page_name = 'Wedding_Gowns'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/bridesmaid_gown.asp" then banner = " select * from banners where page_name = 'Bridesmaids_Gown'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/mens_wear.asp" then banner = " select * from banners where page_name = 'Menswear'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/jewelry.asp" then banner = " select * from banners where page_name = 'Jewelry'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/product.asp" then banner = " select * from banners where page_name = 'Wedding_Shop'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/local_vendors.asp" then banner = " select * from banners where page_name = 'Local_Vendors'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/articles.asp" OR Request.ServerVariables("SCRIPT_NAME") = "/black/article_detail.asp" then banner = " select * from banners where page_name = 'Articles'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/poll_result.asp" then banner = " select * from banners where page_name = 'Poll'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/aboutus.asp" then banner = " select * from banners where page_name = 'AboutUs'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/contactus.asp" then banner = " select * from banners where page_name = 'ContactUs'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/disclaimer.asp" then banner = " select * from banners where page_name = 'disclaimer'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/shipping_policy.asp" then banner = " select * from banners where page_name = 'Shipping'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/signup.asp" then banner = " select * from banners where page_name = 'SignUp'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/email_friend.asp" then banner = " select * from banners where page_name = 'Email Friend'" elseif Request.ServerVariables("SCRIPT_NAME") = "/black/products.asp" then if Request.QueryString("categoryid") <> "" then banner = " select * from cart_banners where cat_id = "& Request.QueryString("categoryid") else banner = " select * from cart_banners" end if else banner = " select * from banners where page_name is Null" end if rsbanner.open banner, conn if not rsbanner.eof then %> <%else%> <%end if rsbanner.close set rsbanner = nothing %>
" target="<%=rsbanner("target")%>" >" alt="<%=rsbanner("alt_text")%>" border="0" width="460" height="60"/>
<%=request("category")%> <% RSPrevPage = CurrPage - 1 RSNextPage = CurrPage + 1 If Next10 > rsGetProducts.PageCount Then Next10 = rsGetProducts.PageCount End If If prev10 = 1 AND next10 - 1 < 10 Then start = 1 Else start = Next10 - 10 If right(start, 1) > 0 Then start = replace(start, right(start, 1), "0") start = start + 10 End If End If If rsGetProducts.PageCount > 1 Then If next10 > 10 Then%> &category=<%=request("category")%>&pageno=<%=Prev10%>" > << Previous  <%End If If NOT RSPrevPage = 0 then%> &category=<%=request("category")%>&pageno=<%=Prev10%>" > < First  <%End If For P = start to Next10 If NOT P = CurrPage then%> &category=<%=request("category")%>&pageno=<%=P%>"><%=P%> <%Else response.write(" " & P & " ") End If Next If NOT RSNextPage > rsGetProducts.PageCount Then%> &category=<%=request("category")%>&pageno=<%=RSNextPage%>"> Next > <%End If If NOT Next10 = rsGetProducts.PageCount Then%> &category=<%=request("category")%>&pageno=<%=Next10%>"> Last >>") <%End If End If %>
<%if not rsGetProducts.bof or not rsGetProducts.eof then%> <%i = intstart xtd = 0 Do Until rsGetProducts.AbsolutePage <> CurrPage OR rsGetProducts.Eof if xtd mod 3 = 0 then Response.Write("") end if Path = Server.MapPath ("prodimages/"&rsGetProducts("imagepath")&"") %> <%i = i + 1 xtd = xtd + 1 rsGetProducts.movenext If rsGetProducts.EOF Then exit do Loop%> <%else%> <%end if%>

<%=rsGetProducts("productname")%>
Size: <%=rsGetProducts("productsize")%>
Price: $<%=rsGetProducts("productprice")%>
" name="productid" /> " name="productprice" /> " name="productsize" /> " name="productname" />
&pageno=<%=currpage%>">
There is no products available in this category. Please check this page later.
<% RSPrevPage = CurrPage -1 RSNextPage = CurrPage + 1 If Next10 > rsGetProducts.PageCount Then Next10 = rsGetProducts.PageCount End If If prev10 = 1 AND next10 - 1 < 10 Then start = 1 Else start = Next10 - 10 If right(start, 1) > 0 Then start = replace(start, right(start, 1), "0") start = start + 10 End If End If If rsGetProducts.PageCount > 1 Then If next10 > 10 Then%> &category=<%=request("category")%>&pageno=<%=Prev10%>" > << Previous  <%End If If NOT RSPrevPage = 0 then%> &category=<%=request("category")%>&pageno=<%=Prev10%>" > < First  <%End If For P = start to Next10 If NOT P = CurrPage then%> &category=<%=request("category")%>&pageno=<%=P%>"><%=P%> <%Else response.write(" " & P & " ") End If Next If NOT RSNextPage > rsGetProducts.PageCount Then%> &category=<%=request("category")%>&pageno=<%=RSNextPage%>"> Next > <%End If If NOT Next10 = rsGetProducts.PageCount Then%> &category=<%=request("category")%>&pageno=<%=Next10%>"> Last >>") <%End If End If %>
Home | About Us | Contact Us |Privacy policy/Terms of use | Shipping Policy | Investment Info
Copyrights © 2009 - All rights reserved by BlackBridalGuide.com Site Developed by: Balianti, Inc