<% 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 '** '**************************************************************************************** %> <% = strWebSiteName %> - Linkovi <% rsLinks.Close Set rsLinks = Nothing %>
<% 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") & "
[Dodaj link]
" rsCategory.Close Set rsCategory = Nothing Set rsLinks = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT tblLinks.* FROM tblLinks WHERE tblLinks.Cat_ID=" & strCategoryID & " AND tblLinks.Active = True ORDER BY " & strOrderBy rsLinks.CursorType = 3 rsLinks.Open strSQL, strLinksCon rsLinks.PageSize = strLinksPerPage If NOT rsLinks.EOF Then rsLinks.AbsolutePage = intRecordPositionPageNum %>

<% 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 %>
 <% If strUserGood = "True" Then %>','links','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width=450,height=450')" class="tabletitle">Edit <% End If %> Link: " target="_new" class="tabletitle"><% = rsLinks("Link") %> Dodan: <% = FormatDateTime(rsLinks("Date"), 2) %>  
 Opis:
<% = rsLinks("Description") %>
Prosječna ocjena bazirana na <% = rsLinks("No_of_ratings") %> glasova ','poll','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width=350,height=400')">_star_rating.gif" align="absmiddle" border="0">
 Broj posjeta: <% = rsLinks("visits") %> ','poll','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width=250,height=150')" class="tabletitle">Prijavi neispravan link Status: <% If rsLinks("Status") => 5 Then Response.Write "Ne radi" Else Response.Write "Radi" End If%>

<% rsLinks.Movenext Next End if %>
<% If intRecordPositionPageNum > 1 or NOT rsLinks.EOF Then Response.Write vbCrLf & " Page:  " End If If intRecordPositionPageNum > 1 Then Response.Write vbCrLf & " << Prev " End If If intRecordPositionPageNum > 1 or NOT rsLinks.EOF Then For intLinkPageNum = 1 to intTotalNumNewsPages If intLinkPageNum = intRecordPositionPageNum Then Response.Write vbCrLf & " " & intLinkPageNum Else Response.Write vbCrLf & "  " & intLinkPageNum & " " End If Next End If If NOT rsLinks.EOF then Response.Write vbCrLf & "  Next >>" End If %>

Povratak na popis kategorija