% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Copyright 2002 Drew Gauderman All Rights Reserved. '** '** This program is free software; you can redistribute it and/or modify '** it under the terms of the GNU General Public License as published by '** the Free Software Foundation; either version 2 of the License, or '** any later version. '** '** All copyright notices must remain intacked in the scripts and the '** outputted HTML. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to www.maddogs-asp.com must remain in place and the powered by '** link or image must remain visiable when the pages are viewed. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '** GNU General Public License for more details. '** '** You should have received a copy of the GNU General Public License '** along with this program; if not, write to the Free Software '** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA '** '** No official support is available for this program but you may post support questions at: - '** http://www.maddogs-asp.com/ '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** webmaster@maddogs-asp.com '** '**************************************************************************************** %>
| <%
Dim intRecordPositionPageNum
Dim intTotalNumNewsPages
Dim intLinkPageNum
Dim intTotalNumNewsEntries
Dim intRecordLoopCounter
Dim rsLinks
Dim strCategoryID
Dim strStars
Dim rsCategory
Dim strOrder
Dim strOrderBy
If Request.QueryString("PagePosition") = "" Then
intRecordPositionPageNum = 1
Else
intRecordPositionPageNum = CInt(Request.QueryString("PagePosition"))
End If
strOrder = Request.QueryString("Short")
strOrderBy = Request.QueryString("Order")
strCategoryID = Request.QueryString("cat")
If strCategoryID = "" Then Response.Redirect "links.asp"
Select Case strOrder
Case "ASC"
strOrder = "ASC"
Case "DESC"
strOrder = "DESC"
Case Else
strOrder = "ASC"
End Select
Select Case strOrderBy
Case "Title"
strOrderBy = "tblLinks.Link " & strOrder & ";"
Case "Desc"
strOrderBy = "tblLinks.Description " & strOrder & ";"
Case "Date"
strOrderBy = "tblLinks.Date " & strOrder & ";"
Case "Rating"
strOrderBy = "tblLinks.Rating " & strOrder & ";"
Case "Hits"
strOrderBy = "tblLinks.Visits " & strOrder & ";"
Case Else
strOrderBy = "tblLinks.Visits " & strOrder & ";"
End Select
Set rsCategory = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblCatLinks.* FROM tblCatLinks WHERE tblCatLinks.ID=" & strCategoryID & ";"
rsCategory.Open strSQL, strLinksCon
If NOT rsCategory.EOF Then Response.Write " " & rsCategory("Cat_Name") & " <% If rsLinks.EOF Then Response.Write " Nema linkova u ovoj kategoriji. " Else intTotalNumNewsEntries = rsLinks.RecordCount intTotalNumNewsPages = rsLinks.PageCount For intRecordLoopCounter = 1 to strLinksPerPage If rsLinks.EOF Then Exit For %>
<% rsLinks.Movenext Next End if %>
|