%@ LANGUAGE = "VBScript" %>
<% Option Explicit %>
<% Response.Buffer = True %>
<% Response.Expires = -1 %>
<% Response.CacheControl = "Public" %>
<%
'****************************************************************************************
'** Copyright Notice
'**
'** iPortalX.com
'**
'** Copyright 2001-2003 Drew Gauderman All Rights Reserved.
'**
'** This program is a paid software; you can modify (at your own risk) any part of it
'** under the terms of the License that accompanies this software and use it both
'** privately and commercially.
'**
'** All copyright notices must remain in tacked in the scripts and the
'** outputted HTML.
'**
'** You may NOT use parts of this program in your own private work, and you may NOT
'** redistribute, repackage, or sell the whole or any part of this program even
'** if it is modified or reverse engineered in whole or in part without express
'** permission from the author.
'**
'** You may not pass the whole or any part of this application off as your own work.
'**
'** All links to iPortalX.com and powered by logo's (if any) must remain unchanged and in place
'** and must remain visible when the pages are viewed unless permission is first granted
'** by the copyright holder.
'**
'** This program is distributed in the hope that it will be useful,
'** but WITHOUT ANY WARRANTY; without even the implied warranty of
'** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER
'** WARRANTIES WHETHER EXPRESSED OR IMPLIED.
'**
'** Support is for those that have purchased it. Post support questions at: -
'** http://www.iportalx.com/forum
'**
'** Support questions are NOT answered by e-mail ever!
'**
'** For correspondence or non support questions contact: -
'** support@iportalx.com
'**
'****************************************************************************************
Dim blnBannedIP
blnBannedIP = False
If bannedIP() Then
'If the user is using a banned IP then set the banned IP variable to true and active member variable to false
blnBannedIP = True
blnActiveMember = False
End If
intTypeID = Clng(Request.QueryString("TYP"))
Call DirectoryDetials(intTypeID)
If blnGuest = True AND blnMustBeLoggedIn = True Then
adoCon.Close
Set adoCon = Nothing
Set rsCommon = Nothing
Response.Redirect("forum/insufficient_permission.asp?Redirect=" & RedirectOmitPath("Redirect", True))
End If
%>
<% = strWebSiteName %> - <% = strTypeName %>
<%
Dim intTotalEntries
Dim rsCategoryDetails
Dim rsLinks
Dim blnShowNewestDownloads
Set rsCategoryDetails = Server.CreateObject("ADODB.Recordset")
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "CountEntries @intTypeID = " & intTypeID
Else
strSQL = "SELECT Count(" & strDBTable & "Entry.Entry_ID) AS Total_Entries FROM " & strDBTable & "Entry "
strSQL = strSQL & "WHERE " & strDBTable & "Entry.Type_ID = " & intTypeID & " AND " & strDBTable & "Entry.Active = True;"
End If
rsCommon.Open strSQL, adoCon
intTotalEntries = rsCommon("Total_Entries")
rsCommon.Close
Dim intDisplayRow
Dim intTotalCategoryLinks
intDisplayRow = 1
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "EntryCategories @intTypeID = " & intTypeID
Else
strSQL = "SELECT " & strDBTable & "EntryCategory.* FROM " & strDBTable & "EntryCategory "
strSQL = strSQL & "WHERE " & strDBTable & "EntryCategory.Type_ID = " & intTypeID & " "
strSQL = strSQL & "ORDER BY " & strDBTable & "EntryCategory.Cat_name ASC;"
End If
rsCommon.Open strSQL, adoCon
If rsCommon.EOF Then
If intTotalEntries = 0 Then
blnShowNewestDownloads = False
Call FormatTopTable2("100%")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " " & strTypeName & "
")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " | " & strTxtNoCategoriesToDisplay & " | ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " " & strTxtThereAreATotalOf & " " & intTotalEntries & " " & strTxtEntries & " ")
If blnGuestSubmit = False AND blnGuest Then
Response.Write(vbCrLf & strTxtYouMustBe & " " & strTxtLoggedIn & " " & strTxtToSubmitAnyEntries)
ElseIf blnAdmin = True Then
Response.Write(vbCrLf & "" & strTxtAddCategory & "")
End If
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & " | ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " | ")
Response.Write(vbCrLf & "
")
Call FormatBottomTable("100%")
Else
blnShowNewestDownloads = False
Set rsLinks = Server.CreateObject("ADODB.Recordset")
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "NewestEntries @intTypeID = " & intTypeID
Else
strSQL = "SELECT TOP 3 " & strDBTable & "Entry.*, " & strDBTable & "Author.Username FROM " & strDBTable & "Entry "
strSQL = strSQL & "INNER JOIN " & strDBTable & "Author ON " & strDBTable & "Entry.Author_ID = " & strDBTable & "Author.Author_ID "
strSQL = strSQL & "WHERE " & strDBTable & "Entry.Type_ID = " & intTypeID & " AND " & strDBTable & "Entry.Active = True "
strSQL = strSQL & "ORDER BY " & strDBTable & "Entry.Created_date DESC;"
End If
rsLinks.Open strSQL, adoCon
If NOT rsLinks.EOF Then
DO UNTIL rsLinks.EOF
Call FormatEntryFields()
'Get the display of links from the format_entry.asp file
Call FormatEntryDisplay(intEntryID, intEntryAuthorID, strEntryName, strEntryAuthor, strEntryDescription, intEntryNoOfRatings, intEntryRating, strEntryCreatedDate, intEntryTotalVisits, intEntryStatus, intTypeID, blnVisitEntry, intEntryTotalReviews)
rsLinks.Movenext
Loop
End If
rsLinks.Close
Set rsLinks = Nothing
End If
Else
blnShowNewestDownloads = True
Call FormatTopTable2("100%")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " " & strTypeName & "
")
Response.Write(vbCrLf & " ")
DO UNTIL rsCommon.EOF
intTotalCategoryLinks = 0
strSQL = "SELECT Count(" & strDBTable & "Entry.Entry_ID) AS Total_links FROM " & strDBTable & "Entry " & _
"WHERE (" & strDBTable & "Entry.Cat_ID = " & Clng(rsCommon("Cat_ID")) & " AND " & strDBTable & "Entry.Sub_ID = 0 AND " & strDBTable & "Entry.Active = " & CBoolConvert(1) & ");"
rsCategoryDetails.Open strSQL, adoCon
intTotalCategoryLinks = rsCategoryDetails("Total_links")
rsCategoryDetails.Close
strSQL = "SELECT " & strDBTable & "EntrySubCategory.Sub_ID, " & strDBTable & "Entry.Active FROM " & strDBTable & "EntrySubCategory "
strSQL = strSQL & "INNER JOIN " & strDBTable & "Entry ON " & strDBTable & "EntrySubCategory.Sub_ID = " & strDBTable & "Entry.Sub_ID "
strSQL = strSQL & "WHERE " & strDBTable & "EntrySubCategory.Cat_ID = " & Clng(rsCommon("Cat_ID")) & " AND " & strDBTable & "Entry.Active = " & CBoolConvert(True) & " AND " & strDBTable & "Entry.Type_ID = " & intTypeID & " AND " & strDBTable & "EntrySubCategory.Type_ID = " & intTypeID & ";"
rsCategoryDetails.Open strSQL, adoCon, 1
intTotalCategoryLinks = intTotalCategoryLinks + rsCategoryDetails.RecordCount
rsCategoryDetails.Close
%>
| "><% = rsCommon("Cat_name") %> (<% = intTotalCategoryLinks %>)<% If blnAdmin = True Then %> (','links','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width=450,height=350')" class="smLink"><% = strTxtEdit %>)<% End If %> |
| <% = rsCommon("Cat_description") %> |
<%
strSQL = "SELECT " & strDBTable & "EntrySubCategory.Sub_ID, " & strDBTable & "EntrySubCategory.Cat_ID, " & strDBTable & "EntrySubCategory.Sub_name FROM " & strDBTable & "EntrySubCategory "
strSQL = strSQL & "WHERE " & strDBTable & "EntrySubCategory.Cat_ID = " & rsCommon("Cat_ID") & ";"
rsCategoryDetails.Open strSQL, adoCon
If NOT rsCategoryDetails.EOF Then
Response.Write(" " & strTxtSubCategories & " ")
Do UNTIL rsCategoryDetails.EOF
Response.Write("" & rsCategoryDetails("Sub_name") & "")
rsCategoryDetails.Movenext
If NOT rsCategoryDetails.EOF Then Response.Write(", ")
Loop
Response.Write(" | ")
End If
rsCategoryDetails.Close
Response.Write("
| ")
rsCommon.Movenext
If intDisplayRow = 2 AND NOT rsCommon.EOF Then
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " ")
intDisplayRow = 0
End If
intDisplayRow = intDisplayRow + 1
Loop
If rsCommon.EOF and intDisplayRow = 2 Then
Response.Write(vbCrLf & " | ")
End If
Response.Write(vbCrLf & " ")
Response.Write(vbCrLf & " " & strTxtThereAreATotalOf & " " & intTotalEntries & " " & strTxtEntries & " ")
If blnGuestSubmit = False AND blnGuest = True Then
Response.Write(strTxtYouMustBe & " " & strTxtLoggedIn & " " & strTxtToSubmitAnyEntries)
Else
Response.Write(vbCrLf & "" & strTxtSubmitNewEntry & "")
Response.Write(vbCrLf & " | " & strTxtEditMyLinks & "")
If blnAdmin = True Then Response.Write(" | " & strTxtAddCategory & "")
End If
%>
|
|
<%
Call FormatBottomTable("100%")
End If
rsCommon.Close
Set rsCategoryDetails = Nothing
Set rsLinks = Server.CreateObject("ADODB.Recordset")
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "NewestEntries @intTypeID = " & intTypeID
Else
strSQL = "SELECT TOP 3 " & strDBTable & "Entry.*, " & strDBTable & "Author.Username FROM " & strDBTable & "Entry "
strSQL = strSQL & "INNER JOIN " & strDBTable & "Author ON " & strDBTable & "Entry.Author_ID = " & strDBTable & "Author.Author_ID "
strSQL = strSQL & "WHERE " & strDBTable & "Entry.Type_ID = " & intTypeID & " AND " & strDBTable & "Entry.Active = True "
strSQL = strSQL & "ORDER BY " & strDBTable & "Entry.Created_date DESC;"
End If
rsLinks.Open strSQL, adoCon
If NOT rsLinks.EOF Then
%>
<% = strWebsiteName %> : <% = strTypeName %> : <% If intTypeID = 2 Then Response.Write(strTxtNewestDownloads) Else Response.Write(strTxtNewestLinks) %> |
<%
DO UNTIL rsLinks.EOF
Call FormatEntryFields()
'Get the display of links from the format_entry.asp file
Call FormatEntryDisplay(intEntryID, intEntryAuthorID, strEntryName, strEntryAuthor, strEntryDescription, intEntryNoOfRatings, intEntryRating, strEntryCreatedDate, intEntryTotalVisits, intEntryStatus, intTypeID, blnVisitEntry, intEntryTotalReviews)
rsLinks.Movenext
Loop
End If
rsLinks.Close
Set rsLinks = Nothing
%>
<%
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing
%>