<% Option Explicit dim strSection, strSectFile, strConn, strLine, strUseHead, strFullSection, strORDER dim SQL, SQLsuffix, whichFile, bookHeaderFile, intCount, intCurrent, intTmp dim fs, conn, bd, bdCOUNT dim db ' ======= Initialize variables ====================== intCount = 0 intCurrent = 0 strORDER = "new DESC, sort ASC" ' ======= End Initialize variables ================== ' ======= Gather and parse input from URL =========== strSection = Request("section") ' Set Needed Variables from URL Set fs = CreateObject("Scripting.FileSystemObject") strSectFile = strSection & ".html" ' Check file If not fs.fileExists(Server.MapPath(strSectFile)) Then strSectFile = "error.html" strSection = "error" End If intCount = CInt(Request("start")) strUseHead = Request("usehead") ' ======= End Gather and parse input from URL =========== ' ======= Open connection to bookstore database ======= Session.timeout = 15 ' ======= Comment by Kasapa Aware Co,Ltd ======= 'strConn = "bookstoreDB" 'Set conn = Server.CreateObject("ADODB.Connection") 'conn.Open strConn ' ======= Add by Kasapa Aware Co,Ltd ======= db ="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("../database/booklist.mdb") Select Case strSection case "new" SQLsuffix = " WHERE new = 'yes'" case "all" SQLsuffix = "" case else SQLsuffix = " WHERE section = '" & strSection & "'" end Select if strSection = "new" Or strSection = "all" then strORDER = "sort ASC" end if ' ======= Comment by Kasapa Aware Co,Ltd ======= ' CREATE RECORDSOURCE set to 'bd' 'SQL = "SELECT * FROM books" & SQLsuffix & " ORDER BY " & strORDER 'Set bd = conn.Execute(SQL) ' ======= Add by Kasapa Aware Co,Ltd ======= SQL = "SELECT * FROM books" & SQLsuffix & " ORDER BY " & strORDER Set bd = Server.CreateObject("ADODB.Recordset") bd.Open SQL, db,1,3 ' ======= Comment by Kasapa Aware Co,Ltd ======= ' CREATE RECORDSOURCE FOR COUNT set to 'bdCOUNT' as 'total' 'SQL = "SELECT COUNT(*) AS [total] FROM books" & SQLsuffix 'Set bdCOUNT = conn.Execute(SQL) ' ======= Add by Kasapa Aware Co,Ltd ======= SQL = "SELECT COUNT(*) AS [total] FROM books" & SQLsuffix Set bdCOUNT = Server.CreateObject("ADODB.Recordset") bdCOUNT.Open SQL, db,1,3 ' ======= End open connection to bookstore database ======= ' ======= Open header file ======== whichFile = Server.MapPath(strSectFile) Set bookHeaderFile = fs.OpenTextFile(whichfile, 1, False) strFullSection = bookHeaderFile.readline ' ======= End Open header file ======== %> <%=strFullSection%>
Our 4 largest sections of books:

The most interesting and inspiring
categories:

New Books

Full Selection
arranged alphabetically:

African Art and
Culture


American Art and
Culture
(especially Native
American)


The Ancient and
Classical World
(especially Egypt)


Asian Art and
Culture


Biographies of
Inspired Humans


The Death Journey

Earth Mysteries and
Far-out Theories


Environment and
Sustainable Living


European Art and
Culture


The Evolution of
Consciousness


Gifts for Children
and Young Readers


Initiation, Shamanism
and Healing


Mythology and
Symbolism


Nature

Pilgrimage to
Sacred Places


Poetry, Novels, and
Inspired Writings


Reference

Science and Mysticism

Travel, Exploration
and Adventure


Visionary Art

World Religions
and Philosophy


 

BOOKS

<%=strFullSection%>
<% ' Print Header from bookHeaderFile if strUseHead <> "no" Or Request("start") = "0" then response.write("
") do while not bookHeaderFile.AtEndOfStream strLine = bookHeaderFile.readline response.write strLine loop response.write("
") end if %>
<% ' move recordset to count do while not bd.eof And intCurrent <> intCount intCurrent = intCurrent + 1 bd.movenext loop intCount = intCount + 10 do while not bd.eof And intCurrent <> intCount response.write("" & vbnewline) response.write("" & vbnewline & vbNewline) intCurrent = intCurrent + 1 bd.movenext loop %>
" & vbnewline) response.write("" & vbnewline) response.write("" & bd("title") & "
" & vbnewline) response.write(bd("author") & "
" & vbnewline) response.write(bd("publisher") & vbnewline) response.write("
" & vbnewline) response.write("" & vbnewline) if trim(bd("image")) <> "" then response.write("") response.write("" & vbnewline) end if response.write("" & vbnewline) response.write("
" & vbnewline) response.write("" & vbnewline) response.write(bd("desc") & vbnewline) response.write("" & vbnewline) response.write("
" & vbnewline) response.write("") response.write("Information / Purchase" & vbnewline) response.write("
") If Request("section") = "new" Or Request("section") = "all" Then response.write("Section: " & getFullTitle(bd("section")) & "") End If response.write("



More <%=getFullTitle(strSection)%> Books:      
<% dim intTotal, intNum intCurrent = 0 intNum = 0 intTotal = CInt(bdCOUNT("total")) if intCount > 10 then response.write("<<Prev " & vbNewline) end if do until intCurrent >= intTotal intNum = intNum + 1 if intCurrent = CInt(Request("start")) then response.write(" " & intNum & " ") else response.write(" " & intNum & " " & vbNewline) end if intCurrent = intCurrent + 10 loop if intCount > intTotal then response.write("      ") else response.write(" Next>>     ") end if %>


In Association with Amazon.com

Email us. Questions
Comments Information
Info@Inspiredplanet.com


Send this page to a friend

Opening Page | Travel | Books | Table of Contents | Artifacts | Masks and Ritual Objects | Jewelry | Paintings | Contact | Photography | Photo Lectures |

<% ' ====== close all open files/databases ===== ' Close Header File 'bookHeaderFile.Close set bookHeaderFile=nothing set fs=nothing ' Close database 'conn.close set conn = Nothing set bd = Nothing set bdCount = nothing ' ====== end close all open files/databases ====== Function getFullTitle(strTitle) select case strTitle case "afro" getFullTitle = "African Art and Culture" case "amer" getFullTitle = "American Art and Culture " case "ancient" getFullTitle = "The Ancient and Classical World" case "asia" getFullTitle = "Asian Art and Culture" case "bio" getFullTitle = "Biographies of Inspired Humans" case "child" getFullTitle = "Gifts for Children and Young Readers" case "death" getFullTitle = "The Death Journey" case "earth" getFullTitle = "Earth Mysteries and Far-out Theories" case "env" getFullTitle = "Environment, Sustainable Living" case "euro" getFullTitle = "European Art and Culture" case "evo" getFullTitle = "Evolution of Consciousness" case "init" getFullTitle = "Initiation, Shamamism and Healing" case "myth" getFullTitle = "Mythology and Symbolism" case "nature" getFullTitle = "Nature" case "pilgrim" getFullTitle = "Pilgrimage to Sacred Places" case "poetry" getFullTitle = "Poetry, Novels and Inspired Writing" case "ref" getFullTitle = "Reference" case "sci" getFullTitle = "Science and Mysticism" case "travel" getFullTitle = "Travel, Exploration and Adventure" case "vis" getFullTitle = "Visionary Art" case "world" getFullTitle = "World Religions and Philosophy" case "new" getFullTitle = "New" case else getFullTitle = "" end select End Function %>