Wednesday, February 11, 2004
<% const fldCategoryID = "CategoryID" const fldCategoryName = "CategoryName" const fldCategoryHTML = "CategoryHTML" const fldCategoryLink = "CategoryLink" const fldSubCategories = "CategorySubcategories" const fldCategoryType = "CategoryType" const fldCatDescription = "CategoryDescription" const fldFeaturedLinks = "FeaturedLinks" 'const fldSponsoredLinks = "SponsoredLinks" const fldTotal = "Total" const fldEntryID = "EntryID" const fldUrl = "Url" const fldEmail = "Email" const fldSubject = "Subject" const fldTitle = "Title" const fldAuthor = "Author" const fldIP = "Ip" const fldVersion = "Version" const fldPosition = "CurrentPosition" const fldEducation = "Education" const fldExperience = "Experience" const fldLowSalary = "LowSalary" const fldHighSalary = "HighSalary" const fldPrice = "Price" const fldCapacity = "Capacity" const fldQuantity = "Quantity" const fldKeywords = "Keywords" const fldDescription = "Description" const fldOs = "OperatingSystem" const fldLocation = "Location" const fldZipCode = "ZipCode" const fldEntryDateTime = "EntryDateTime" const fldExpDateTime = "EntryExpDateTime" const fldHitsToday = "HitsToday" const fldHitsTotal = "HitsTotal" const fldRating = "Rating" const fldNumberRatings = "NumberRatings" const fldValue = "Value" const fldMinAccessLevel = "MinAccessLevel" const fldMinAccessPoints = "MinAccessPoints" const fldSponsor = "Sponsor" const fldRecommended = "Recommended" const fldFeatured = "Featured" const fldActive = "Active" const fldHTMLMarkBefore = "HTMLMarkBefore" const fldHTMLMarkAfter = "HTMLMarkAfter" const fldLastEntryDate = "LastEntryDate" dim strSQL dim strSQLFields dim intCategory dim pstrCats dim intCounter dim strQuery dim strCommand dim intEntryID dim ctType dim strSort, strSortOrder dim intMaxRecords ' Settings for the display of this category dim intDisplayColumns dim intDisplaySubCategories dim intDisplaySideSubCategories dim intCategoryColumns, intCurrentRecord dim intMaxPageSize,intTotalPages dim intStartRecord,intTotalRecords,intLastRecord dim strCategoryLink,intTotal,strSubCategories dim strDescription,strLastEntryDate intCurrentRecord = 0 intMaxRecords = -1 intDisplayColumns = 3 ctType = "List" ' List of items intCategory = ReadFormValue("catid","") pstrCats = ReadFormValue("pcats","") strQuery = ReadFormValue("query","") strCommand = ReadFormValue("command","") intEntryID = ReadFormValue("entryid","") strSort = ReadFormValue("sort","EntryDateTime") strSortOrder = ReadFormValue("order","DESC") if IsBlank(strCommand) and IsBlank(strQuery) and (Isblank(intCategory) or intCategory="0") AND IsBlank(intentryid) then strCommand = "FrontPage" end if if OpenConnection() = false then call showHTMLMessage("Please Check your settings. We can not open the database.
Typically this could be due to the following:
1. DSN or ODBC Settings are invalid.
2. You are using the wrong ConnString Setting.
3. The Database path is incorrect.
4. Your security or permission settings.
5. You didn't configure anything and expected it to work.
Please check the setup.asp settings and adjust them accordingly.","readme.htm") HaltProgram(True) end if dim intCatID dim strCatName dim intLastRow,intRow dim intCol dim tblResult dim tblEResult dim tblRResult dim tblFields redim tblFields(11) tblFields(0) = fldCategoryID tblFields(1) = fldCategoryName tblFields(2) = fldCategoryLink tblFields(3) = fldSubCategories tblFields(4) = fldTotal tblFields(5) = fldHTMLMarkBefore tblFields(6) = fldCatDescription tblFields(7) = fldCategoryHTML tblFields(8) = fldLastEntryDate tblFields(9) = fldHTMLMarkAfter tblFields(10) = "HTMLSubMarkBefore" tblFields(11) = "HTMLSubMarkAfter" if Isblank(intCategory) or intCategory="0" then strSQL = " SELECT * FROM Settings " else ' get settings strSQL = " SELECT * FROM Category WHERE CategoryID = " & intCategory end if OpenRecordset(strSQL) if not IsData() then call showHTMLMessage("Category Not Found.","directory/results.asp") Response.end end if ctType = rs(fldCategoryType) rs.close if IsBlank(intCategory) or intCategory="0" then strSQL = " SELECT CategoryID,CategoryName,CategoryLink," strSQL = strSQL & " CategorySubCategories,Total,HTMLMarkBefore,HTMLMarkAfter," strSQL = strSQL & " HTMLSubMarkBefore, HTMLSubMarkAfter,CategoryDescription," strSQL = strSQL & "CategoryHTML,LastEntryDate FROM Category WHERE CategoryID=CategoryLevel" strSQL = strSQL & " ORDER BY CategoryName" else ' get children strSQL = " SELECT CategoryID,CategoryName,CategoryLink," strSQL = strSQL & " CategorySubCategories,Total,HTMLMarkBefore,HTMLMarkAfter," strSQL = strSQL & " HTMLSubMarkBefore, HTMLSubMarkAfter,CategoryDescription," strSQL = strSQL & "CategoryHTML,LastEntryDate FROM Category WHERE CategoryLevel=" & intCategory strSQL = strSQL & " AND CategoryID<>CategoryLevel " strSQL = strSQL & " ORDER BY CategoryName " end if 'if blnShowRightColumn = False then 'intDisplayColumns = intDisplayColumns - 1 'end if 'if blnShowLeftColumn = False then 'intDisplayColumns = intDisplayColumns - 1 'end if 'if intCategoryColumns <= 0 then 'intCategoryColumns = 3 'end if 'if isZero(intMaxPageSize) then 'intMaxPageSize = 15 'end if 'if IsBlank(ctType) or IsNull(ctType) then ' ctType = "List" 'end if Response.write "
" Response.write "Search: " response.write "
" if IsBlank(intCategory) or intCategory="0" then Response.write " Entire Index" Response.write " This Tree" else Response.write " Entire Index" Response.write " This Tree" end if response.write "
" 'Response.write "" & stySideColumn & "Add Entry | " 'Response.write "" & stySideColumn & "Whats New | " 'Response.write "" & stySideColumn & "Whats Hot | " 'Response.write "" & stySideColumn & "Whats Popular" Response.write "" & "Add Entry | " Response.write "" & "Whats New | " Response.write "" & "Whats Hot | " Response.write "" & "Whats Popular" %>
   
  Web Site Directory - Sites organized by subject
 INSERT DIRECTORY CONTENTS TABLE
  Features of the Day