hur fixar jag det hära??
<%
mypage = Request("sida")
If mypage = "" then
mypage = 1
End If
mypagesize = 36
Set db = Server.CreateObject("ADODB.Connection")
db.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath ("Database/grupper.mdb")
SQL = "SELECT * FROM inlagg WHERE Rum LIKE '"& request.querystring("rum") &"' ORDER BY Datum DESC"
Set rs = db.Execute(SQL)
SQL = "SELECT * FROM rum_rum WHERE Namn LIKE '"& request.querystring("rum") &"'"
Set rs2 = db.Execute(SQL)
SQL = "SELECT * FROM medlemmar WHERE Namn LIKE '"& session("username") &"' AND Rum LIKE '"&request.querystring("rum")&"'"
Set rs3 = db.Execute(SQL)
rs.cursorlocation = 3
rs.cachesize = 5
%>
VideMedlem sedan dec. 19998 577 inlägg jag vill helst använda mig utav:
<%
If maxcount <> 0 then
pad = "0"
scriptname = request.Servervariables("script_name")
for counter = 1 to maxcount
If counter >= 10 then
pad = ""
End If
ref = "<a href='" & scriptname & "?sida=" & counter & "&pagesize=" & mypagesize & "&tillid=" & Request.QueryString("tillid") & "'>" & pad & counter & "</a> "
response.write ref & " "
Next
End If
%>
VideMedlem sedan dec. 19998 577 inlägg det blir mycket kod men snälla kan nån hjälpa mig :(
<%
on error resume next
mypage = Request("sida")
If mypage = "" then
mypage = 1
End If
mypagesize = 31
Set db = Server.CreateObject("ADODB.Connection")
db.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath ("Database/grupper.mdb")
SQL = "SELECT * FROM inlagg WHERE Rum LIKE '"& request.querystring("rum") &"' ORDER BY Datum DESC"
Set rs = db.Execute(SQL)
SQL = "SELECT * FROM rum_rum WHERE Namn LIKE '"& request.querystring("rum") &"'"
Set rs2 = db.Execute(SQL)
SQL = "SELECT * FROM medlemmar WHERE Namn LIKE '"& session("username") &"' AND Rum LIKE '"&request.querystring("rum")&"'"
Set rs3 = db.Execute(SQL)
%>
<html>
<head>
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width=313 border=0 height="35">
<TR>
<TD width=415 bgColor=#ffffff height="35">
<TABLE cellSpacing=0 cellPadding=0 width=415 border=0 height="17">
<TBODY>
<TR>
<TD height="17" valign="top" align="right">
<TABLE cellSpacing=0 cellPadding=0 width=414 border=0 style="border-collapse: collapse" height="1">
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/1pxtrans2.gif" width="1" height="1"><TBODY>
<% IF NOT (RS.EOF) THEN %>
<tr>
<TD height=1 width="4"></TD>
<TD align="right" height="1">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="410" height="1">
<tr>
<TD height=1 width="4"></TD>
<TD align="right" height="1">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="410" height="1">
<tr>
<td width="410" height="1" colspan="3"></td>
</tr>
<tr>
<td width="18" height="1">
<p align="center">
</td>
<td width="196" height="1">
<b><font face="Arial" size="2"><%=request.querystring("rum")%></font></b></td>
<td width="196" height="1" valign="bottom">
<p align="right"><font size="1" face="Arial">
<a href="krypin.asp?checkid=<%=request.querystring("id")%>"><%=request.querystring("moderator")%></a> <%=left(request.querystring("kon"),1)%> </font></td>
</tr>
</table>
</TD>
</tr>
</table>
</TD>
</tr>
<tr>
<TD height=1 width="4"></TD>
<TD align="right" height="1">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="410" height="1">
<tr>
<td width="410" height="1"></td>
</tr>
</table>
</TD>
</tr>
</TBODY></TABLE>
</TD>
</TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=414 border=0 style="border-collapse: collapse" height="1">
<TBODY>
<tr>
<TD height=1 width="4"></TD>
<TD align="right" height="1">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="410" height="1">
<tr>
<font face="Arial">
<%
rs.movefirst
rs.pagesize = mypagesize
maxcount = Cint(rs.pagecount)
rs.absolutepage = mypage
howmanyrecs = 0
howmanyfields = rs.fields.count -1
Do While Not RS.EOF AND howmanyrecs < rs.pagesize
counter = counter + 1
If counter mod 2 = 0 then
color = "#FFFFFF"
Else
color = "#F0F0F0"
End If
%> </font>
<td bgcolor="<%= color %>" width="359" height="1" valign="top" style="padding:0; ">
<font size="1" face="Arial" color="#800000">
<%if rs("VIP") = "Ja" then%>
<p>
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/VIP.gif" alt="<%=rs("username")%> är VIP medlem!" width="11" height="10"><%else%><%end if%><img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/1pxtrans2.gif" width="2" height="1"><a href="krypin.asp?checkid=<%=rs("id1")%>"><%=Rs("av")%></a></font><font face="Arial" size="1"><b>
</b></font><font color="#800000" face="Arial" size="1"> <%=left(rs("kon"),1)%>
<%
newage = DateDiff ("d", rs("alder"), Now)
newage = newage - (newage Mod 365)
newage = newage / 365
response.write(newage)%>
</font><font face="Arial" size="1">
från <%=rs("stad")%> -
<%postDate = cdate(rs("datum"))
days = datediff("d",postDate,now())
if days = 0 then
response.write "<font color='#800000'>idag "& "</font>" & FormatDateTime(postDate,3)
elseif days = 1 then
response.write "<font color='#000080'>igår "& "</font>" & FormatDateTime(postDate,3)
else
response.write postDate
end if%>
<br> <%=rs("Text")%></font></td>
</font><font face="Arial">
</tr>
<%
RS.Movenext
howmanyrecs = howmanyrecs + 1
Loop
RS.Close
%> </font>
<% ELSE %>
</table>
</TD>
</tr>
<tr>
<td height="1" colspan="2" align="center">
<font size="1" face="Arial">
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/1pxtrans2.gif" width="1" height="1"><br>
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/1pxtrans2.gif" width="1" height="1"><img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/Streck.gif" width="407" height="1"></font></td>
</tr>
<tr>
<td height="1" colspan="2" align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="406" height="1">
<tr>
<td width="404" height="1">
<p align="center">
<font face="Arial" size="1">
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/1pxtrans2.gif" width="1" height="1"><br>
Tyvärr denna grupp är tom!<%=rs("av")%><br>
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/1pxtrans2.gif" width="1" height="1"></font></td>
</tr> <%End if%>
</table>
</td>
</tr>
</TBODY></TABLE>
<div align="center">
<center>
<TABLE cellSpacing=0 cellPadding=0 width=415 border=0 height="4" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<TD height="1" colspan="3">
<p align="center">
<font face="Arial">
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/Streck.gif" width="407" height="1"></font></TD>
</tr>
<tr>
<TD height="1" width="24">
<font face="Arial" size="1">
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/Meny/foregaende.GIF" width="21" height="11"><IMG height=1 src="file:///C:/Inetpub/wwwroot/default-filer/1x1.gif"
width=5></font></TD>
<TD height="1" width="371">
<%
If maxcount <> 0 then
pad = "0"
scriptname = request.Servervariables("script_name")
for counter = 1 to maxcount
If counter >= 10 then
pad = ""
End If
ref = "<a href='" & scriptname & "?sida=" & counter & "&pagesize=" & mypagesize & "&tillid=" & Request.QueryString("tillid") & "'>" & pad & counter & "</a> "
response.write ref & " "
Next
End If
%><font size="1" face="Arial"> </font><font size="1" face="Arial"><br>
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/1pxtrans2.gif" width="4" height="4"></font></TD>
<TD height="1" width="20">
<font face="Arial" size="1">
<img border="0" src="file:///C:/Inetpub/wwwroot/Bilder/Meny/nasta.gif" width="21" height="11"></font></TD>
</tr>
</TABLE>
</center>
</div>
</TD>
</TR>
</TABLE>
</body>
</html>