den er her:
<%
Side = Request("side")
tp = request("tp")
if tp = "" then tp = "rock"
dagsdato = convertdate(date())
userid = Request.querystring("userid")
musik = Request.querystring("musik")
submenu = "news"
'Først skal vi have antallet af poster
Set objRs = Conn.Execute("SELECT newsid AS records FROM tblnews;")
intRecords = int(objRs("records"))
objRs.Close
Set objRs = Nothing
if not side = "" then Title2 = ", side " & side
select case tp
case "rock"
sql = "Select * From tblNews where place = 'Pop/rock' and releaseDate <= " & Dagsdato & " order by releaseDate desc"
Sektion = "Pop/rock"
title = "pop/rock nyheder " & Title2
case "udland"
sql = "Select * From tblNews where place = 'udland' and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
Sektion = "Udland"
title = "Internationale nyheder " & Title2
case "jazz"
sql = "Select * From tblNews where place = 'Jazz' and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
Sektion = "Jazz"
title = "Jazznyheder" & Title2
case "blues"
sql = "Select * From tblNews where place = 'blues' and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
Sektion = "blues/Folk/country"
title = "Folk, blues og countrynyheder" & Title2
case "world"
sql = "Select * From tblNews where place = 'World' and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
Sektion = "World"
title = "Verdensmusik nyheder" & Title2
case "klassisk"
sql = "Select * From tblNews where place = 'Klassisk' and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
Sektion = "Klassisk"
title = "Klassisk musik nyheder" & Title2
case "pro"
sql = "Select * From tblNews where place = 'ProNyhed' and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
Sektion = "Backstage"
title = "Nyheder fra musikkens verden" & Title2
case "akademi"
sql = "Select * From tblNews where place = 'Pro artikel' and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
Sektion = "Bandakademiet"
title = "Bandakademiet" & Title2
case "bandnyt"
if not userid = "" then
sql = "SELECT * FROM tblNews WHERE UserID = " & userid & " and releaseDate <= " & Dagsdato & " ORDER BY DateCreated desc"
If session("userid") = cint(userid) then
sql = "SELECT * FROM tblNews WHERE UserID = " & userid & " ORDER BY releaseDate desc"
end if
title = "nyheder fra " & musik & Title2
else
SQL =" SELECT * FROM tblNews Where place = 'Pop/rock'"
sql = sql & " Or place = 'Folk/country/world'"
sql = sql & " Or place = 'Jazz'"
sql = sql & " Or place = 'petit stof'"
sql = sql & " and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
title = "Samlet nyhedsliste" & Title2
end if
case "spillested"
sql = "SELECT * FROM tblNews WHERE UserID = " & userid & " ORDER BY releaseDate desc"
'Sektion = "Pop/rock"
case else
SQL =" SELECT * FROM tblNews Where place = 'Pop/rock'"
sql = sql & " Or place = 'Folk/country/world'"
sql = sql & " Or place = 'Jazz'"
sql = sql & " Or place = 'petit stof'"
sql = sql & " and releaseDate <= " & Dagsdato & " order by tblNews.DateCreated desc"
title = "Samlet nyhedsliste" & Title2
end select
'Variabler til query´et
intPage = Request.QueryString("side")
if intPage = "" OR not isNumeric(intPage) then
intPage = int(1)
else
intPage = int(intPage)
end if
intPageSize = int(10)
intStart = intPage*intPageSize
intStart = intStart-intPageSize
intPages = int(intRecords/intPageSize)+1
'ekstra indsat
intValue = (intRecords - intStart)
If intPageSize > intValue Then
intPageSize = intValue
end if
'ekstra indsat slut
Set Rs = Conn.Execute(sql &" LIMIT " & intStart & ", " & intPageSize & ";")
htmlstr =""
If intRecords > intPageSize Then
Htmlstr = "<p>Gå til side : "
For i = 1 to intRecords/intPageSize
Htmlstr = Htmlstr & "<a href='
http://"& HTTP_HOST &"nyheder_oversigt.asp?side=" & i & "&tp=" & tp & "'>" & i & "</a> "
Next
End If %>
<!-- #include file="includes/top.asp"-->
<table width="100%" class="form">
<tr>
<td class="menu1" height="25">Sidste nyt<% if not sektion= "" then Response.Write(" i "& Sektion) %><br></td>
</tr>
<tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-7440922308098903";
/* lister */
google_ad_slot = "4915315947";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="
http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
</center>
</td>
</tr>
</table></td></tr><%
'if not rs.EOF then rs.Absolutepage = side
x=0
PicList = ""
do While Not rs.EOF 'and x < rs.pageSize
' if x= 4 then %>
<!-- <tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><center><script language=JavaScript src=http://www.bandlist.dk/absolutebmxe/abm.asp?z=10></script></center></td>
</tr>
</table>
</td>
</tr> --><%
' end if
frontpic = ""
groupname = ""
video = 0
If instr(rs("bread"),"youtube") > 0 Then video = 1
If instr(rs("bread"),"vimeo") > 0 Then video = 1
if rs("userid") > 0 then
sql1 = "select * from tblGroups where groupid = " & rs("userid")
Set rs1 = conn.execute(sql1)
if not rs1.eof then
groupname = rs1("groupname")
frontpic = Rs1("frontpic")
If instr(1,PicList, frontpic,1) = 0 then
PicList = PicList & frontpic
else
frontpic = ""
end if
end if
end if %>
<tr>
<TD class=no-line-link>
<h2><I><%= FormatDateTime(realdate(rs("releasedate")),vbShortDate) %></I>
<a href="
http://<%= HTTP_HOST %>nyheder_info.asp?musik=<%= Headerlink(groupname) %>&nyt=<%= Headerlink(rs("Header")) %>&userid=<%= rs("userid") %>&newsid=<%= rs("NewsID") %>"><% If video = 1 Then %> <img src="img/cam.gif" alt="se video" border="0"> <% End If %> <%= rs("Header") %></a></h2>
</TD>
</TR>
<TR>
<TD class=formtekst>
<table border="0" cellpadding="0" cellspacing="0" class="pictures-left-border">
<tr>
<td>
<% If not frontpic = "" Then %>
<img width="100" alt="<%= groupname %>" src="upload/<%= rs("userid") %>/front/<%= frontpic %>" border="0">
<% End If %>
</td>
</tr>
</table>
<span class="no-line-link">
<a href="
http://<%= HTTP_HOST %>nyheder_info.asp?musik=<%= Headerlink(groupname) %>&nyt=<%= Headerlink(rs("Header")) %>&userid=<%= rs("userid") %>&newsid=<%= rs("NewsID") %>">
<%
bread = rs("bread")
bread = StripHTML(bread)
response.Flush() %>
<%= left(bread,250) %>...<b>Læs mere</b></A><br>
<% if rs("userid") > 0 then
on error resume next%>
<a href="
http://<%= HTTP_HOST %>band_info.asp?musik=<%= Headerlink(rs("ekstra2")) %>&userid=<%= rs("userid") %>"><b>Se <%= rs("ekstra2") %>'s profil</b></a><br>
<% on error goto 0
End If %>
<% if session("usertype") = 7 then Response.Write("Læst " & rs("clickcount") &" gange<br>") %>
</span>
</TD>
</TR>
<TR>
<TD class=line> </TD>
</TR>
<% x = x + 1
rs.movenext
Loop %>
<tr>
<td class="formtekst"><% = htmlstr%></td>
</tr>
</table>