Jeg kan ikke helt se hvor det der skal ind henne af?
Her er koden:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
site = "hotornot"
%>
<!--#include virtual="/includeall.asp"-->
<!--#include virtual="/top.asp"-->
<%
Response.Cookies("spotpeople.dk"&session("id")&"")("id") = session("id")
if request.QueryString("gender") = "" then
Response.Cookies("spotpeople.dk"&session("id")&"")("gender") = Request.Cookies("spotpeople.dk"&session("id")&"")("gender")
else
Response.Cookies("spotpeople.dk"&session("id")&"")("gender") = request.QueryString("gender")
end if
Response.Cookies("spotpeople.dk"&session("id")&"").Expires = Date+365
Response.Cookies("spotpeople.dk"&session("id")&"").Domain = "
www.spotpeople.dk"strCookieID = Request.Cookies("spotpeople.dk"&session("id")&"")("id")
strCookieGENDER = Request.Cookies("spotpeople.dk"&session("id")&"")("gender")
if request.QueryString("mode") = "picture" then
SQLCookie = "SELECT * FROM hotbilleder where id = " & request.QueryString("pictureID") &""
else
if strCookieID = session("id") then
if strCookieGENDER = "" then
strCookieGENDER = "5"
else
strCookieGENDER = strCookieGENDER
end if
if strCookieGENDER = "1" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND hotstemmer.stemmeID IS NULL AND profiler.kon = '1' ORDER BY RAND()"
elseif strCookieGENDER = "2" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND hotstemmer.stemmeID IS NULL AND profiler.kon = '2' ORDER BY RAND()"
elseif strCookieGENDER = "3" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND hotstemmer.stemmeID IS NULL AND profiler.kon = '1' AND profiler.partnerstatus = '1' ORDER BY RAND()"
elseif strCookieGENDER = "4" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND hotstemmer.stemmeID IS NULL AND profiler.kon = '2' AND profiler.partnerstatus = '1' ORDER BY RAND()"
elseif strCookieGENDER = "5" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND hotstemmer.stemmeID IS NULL ORDER BY RAND()"
end if
else
if strCookieGENDER = "" then
strCookieGENDER = "5"
else
strCookieGENDER = strCookieGENDER
end if
if strCookieGENDER = "1" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND (hotstemmer.stemmeID = "&session("ID")&" IS NULL) AND profiler.kon = '1' AND profiler.id <> "& session("ID") &" ORDER BY RAND()"
elseif strCookieGENDER = "2" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND (hotstemmer.stemmeID = "&session("ID")&" IS NULL) AND profiler.kon = '2' AND profiler.id <> "& session("ID") &" ORDER BY RAND()"
elseif strCookieGENDER = "3" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND (hotstemmer.stemmeID = "&session("ID")&" IS NULL) AND profiler.kon = '1' AND profiler.partnerstatus = '1' AND profiler.id <> "& session("ID") &" ORDER BY RAND()"
elseif strCookieGENDER = "4" then
SQLCookie = "SELECT hotbilleder.* FROM (hotbilleder LEFT JOIN profiler ON hotbilleder.profilerID = profiler.id) LEFT JOIN hotstemmer ON hotbilleder.id = hotstemmer.hotbillederID WHERE hotbilleder.godkendt = '1' AND (hotstemmer.stemmeID = "&session("ID")&" IS NULL) AND profiler.kon = '2' AND profiler.partnerstatus = '1' AND profiler.id <> "& session("ID") &" ORDER BY RAND()"
elseif strCookieGENDER = "5" then
SQLCookie = "SELECT hotbilleder.* FROM hotbilleder LEFT JOIN profiler ON (hotbilleder.profilerID = profiler.id) LEFT OUTER JOIN hotstemmer on (hotbilleder.id = hotstemmer.hotbillederID) where (hotstemmer.stemmeID is NULL or hotstemmer.stemmeID <>'"& session("ID") &"') AND hotbilleder.godkendt = '1' AND profiler.id <> '"& session("ID") &"' ORDER BY RAND()"
end if
end if
end if
SQLhotbilleder = SQLCookie
'response.Write(SQLhotbilleder)
'response.End
set RShotbilleder = Conn.execute(SQLhotbilleder)
if not RShotbilleder.EOF then
SQLprofiler = "SELECT * FROM profiler where id = " & RShotbilleder("profilerID") &""
set RSprofiler = Conn.execute(SQLprofiler)
SQLpostnrby = "SELECT * FROM postnrby where id = " & RSprofiler("postnrby") &""
set RSpostnrby = Conn.execute(SQLpostnrby)
SQLland = "SELECT * FROM land where id = " & RSprofiler("land") &""
set RSland = Conn.execute(SQLland)
SQLdag = "SELECT * FROM dag where id = " & RSprofiler("dag") &""
set RSdag = Conn.execute(SQLdag)
SQLmaaned = "SELECT * FROM maaned where id = " & RSprofiler("maaned") &""
set RSmaaned = Conn.execute(SQLmaaned)
SQLaar = "SELECT * FROM aar where id = " & RSprofiler("aar") &""
set RSaar = Conn.execute(SQLaar)
end if
Function GetAge(Foedselsdato)
BornDay = Day(Foedselsdato)
BornMonth = Month(Foedselsdato)
BornYear = Year(Foedselsdato)
If CInt(BornMonth) > CInt(Month(Date)) Then
GetAge = Year(Date) - BornYear - 1
ElseIf CInt(BornMonth) = CInt(Month(Date)) Then
If CInt(BornDay) > CInt(Day(Date)) Then
GetAge = Year(Date) - BornYear - 1
Else
GetAge = Year(Date) - BornYear
End If
Else
GetAge = Year(Date) - BornYear
End If
End Function
if request.QueryString("mode") = "vote" then
if not session("brugeraccess") = "1" then
response.Redirect("/login/")
else
SQLvote = "insert into hotstemmer (hotbillederID,profilerID,stemmeID,point,dato) values('" & request.QueryString("pictureID") & "','" & request.QueryString("profileID") & "','" & request.QueryString("voteID") & "','" & request.QueryString("point") & "','"& now() &"')"
Conn.execute(SQLvote)
end if
end if
%>
<table width="772" border="0" align="center" cellpadding="0" cellspacing="0" class="borderTop">
<tr bgcolor="#FFFFFF">
<td width="144" align="left" valign="top"><!--#include virtual="/left.asp"--></td>
<td width="523" align="left" valign="top"><div align="center">
<br>
<%if not RShotbilleder.EOF then
if CInt(RShotbilleder("profilerID")) = CInt(session("id")) then
response.Write("Du kan ikke stemme på dit eget billede!")
end if
end if
if request.QueryString("mode") = "vote" then
bg = "images/hotbg_12_2.jpg"
%>
</div>
<table width="463" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="15" align="left" valign="top" background="images/hotbgvote_22.jpg"><img src="images/hotbgvote_11.jpg" width="462" height="15"></td>
</tr>
<tr>
<td align="left" valign="top" background="images/hotbgvote_12.jpg"><table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="284" align="right" valign="middle">
<%
SQLhotstemmerVOTE = "SELECT COUNT(*) AS count FROM hotstemmer where hotbillederID = " & request.QueryString("pictureID") &""
set RShotstemmerVOTE = Conn.execute(SQLhotstemmerVOTE)
SQLprofilerVOTE = "SELECT * FROM profiler where id = " & request.QueryString("profileID") &""
set RSprofilerVOTE = Conn.execute(SQLprofilerVOTE)
SQLdagVOTE = "SELECT * FROM dag where id = " & RSprofilerVOTE("dag") &""
set RSdagVOTE = Conn.execute(SQLdagVOTE)
SQLmaanedVOTE = "SELECT * FROM maaned where id = " & RSprofilerVOTE("maaned") &""
set RSmaanedVOTE = Conn.execute(SQLmaanedVOTE)
SQLaarVOTE = "SELECT * FROM aar where id = " & RSprofilerVOTE("aar") &""
set RSaarVOTE = Conn.execute(SQLaarVOTE)
SQLpostnrbyVOTE = "SELECT * FROM postnrby where id = " & RSprofilerVOTE("postnrby") &""
set RSpostnrbyVOTE = Conn.execute(SQLpostnrbyVOTE)
SQLlandVOTE = "SELECT * FROM land where id = " & RSprofilerVOTE("land") &""
set RSlandVOTE = Conn.execute(SQLlandVOTE)
SQLgen1 = "SELECT SUM(point) FROM hotstemmer where hotbillederID = " & Request.QueryString("pictureID")&""
Set RSgen1 = Conn.Execute(SQLgen1)
SQLgen2 = "SELECT COUNT(*) AS count FROM hotstemmer where hotbillederID = " & Request.QueryString("pictureID")&""
Set RSgen2 = Conn.Execute(SQLgen2)
gennemsnit = RSgen1(0)/RSgen2("count")
%>
<span style="font-size: 12; color: #FFFFFF; font-weight: bold;">
<%=RShotstemmerVOTE("count")%> har stemt på dette billede
<br>
<%=RSprofilerVOTE("profilnavn")%>, <%Response.Write GetAge(""&RSdagVOTE("dag")&"-"&RSmaanedVOTE("maaned")&"-"&RSaarVOTE("aar")&"")%> år, <%=RSpostnrbyVOTE("byen")%>, <%=RSlandVOTE("land")%><br>
</span>
<br>
<span style="font-size: 18px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;">
<%Response.Write(FormatNumber(gennemsnit,2)) %>
</span> </td>
<td width="100" align="right" valign="top"><img src="/images/hotbilleder/thumb/<%=request.QueryString("pictureID")%>.jpg"></td>
<td width="59"> </td>
</tr>
</table></td>
</tr>
</table>
<%
else
bg = "images/hotbg_12.jpg"
end if
%>
<table width="464" height="300" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="473" align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="<%=bg%>" height="21" colspan="2" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="13%"> </td>
<td width="87%" align="center" valign="middle">
<%if not RShotbilleder.EOF then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center" valign="middle">
<td width="26%"><img src="images/hottopknap_22.jpg" width="64" height="13"></td>
<td width="35%"><img src="images/hottopknap_42.jpg" width="109" height="13"></td>
<td width="39%"><img src="images/hottopknap_62.jpg" width="114" height="13"></td>
</tr>
</table>
<%end if%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td width="62" align="left" valign="top" background="images/hotbg_13.jpg">
<%
if not RShotbilleder.EOF then
if not CInt(RShotbilleder("profilerID")) = CInt(session("id")) then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td colspan="2" align="left" valign="top"><%
response.Write("<img src='images/stemmebar1hot.jpg' width='21' height='14'><img src='images/stemmebar2hot.jpg' width='12' height='14'>")%></td>
</tr>
<tr>
<td width="8%"> </td>
<td width="46%" align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=10"><img src="images/stemmebar010.jpg" alt="10" width="21" height="31" border="0" onmouseover="document.getElementById('10').innerHTML = '<b>10</b>';" onmouseout="document.getElementById('10').innerHTML = '';"></a></td>
<td width="46%" align="left" valign="top"><span id="1" style="font-weight: bold; font-size: 14;"></span><span id="2" style="font-weight: bold; font-size: 14;"></span><span id="3" style="font-weight: bold; font-size: 14;"></span><span id="4" style="font-weight: bold; font-size: 14;"></span><span id="5" style="font-weight: bold; font-size: 14;"></span><span id="6" style="font-weight: bold; font-size: 14;"></span><span id="7" style="font-weight: bold; font-size: 14;"></span><span id="8" style="font-weight: bold; font-size: 14;"></span><span id="9" style="font-weight: bold; font-size: 14;"></span><span id="10" style="font-weight: bold; font-size: 14;"></span></td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=9"><img src="images/stemmebar009.jpg" alt="9" width="21" height="28" border="0" onmouseover="document.getElementById('9').innerHTML = '<b>9</b>';" onmouseout="document.getElementById('9').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=8"><img src="images/stemmebar008.jpg" alt="8" width="21" height="29" border="0" onmouseover="document.getElementById('8').innerHTML = '<b>8</b>';" onmouseout="document.getElementById('8').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=7"><img src="images/stemmebar007.jpg" alt="7" width="21" height="28" border="0" onmouseover="document.getElementById('7').innerHTML = '<b>7</b>';" onmouseout="document.getElementById('7').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=6"><img src="images/stemmebar006.jpg" alt="6" width="21" height="28" border="0" onmouseover="document.getElementById('6').innerHTML = '<b>6</b>';" onmouseout="document.getElementById('6').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=5"><img src="images/stemmebar005.jpg" alt="5" width="21" height="28" border="0" onmouseover="document.getElementById('5').innerHTML = '<b>5</b>';" onmouseout="document.getElementById('5').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=4"><img src="images/stemmebar004.jpg" alt="4" width="21" height="29" border="0" onmouseover="document.getElementById('4').innerHTML = '<b>4</b>';" onmouseout="document.getElementById('4').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=3"><img src="images/stemmebar003.jpg" alt="3" width="21" height="28" border="0" onmouseover="document.getElementById('3').innerHTML = '<b>3</b>';" onmouseout="document.getElementById('3').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=2"><img src="images/stemmebar002.jpg" alt="2" width="21" height="29" border="0" onmouseover="document.getElementById('2').innerHTML = '<b>2</b>';" onmouseout="document.getElementById('2').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top"><a href="/default.asp?mode=vote&pictureID=<%=Left(RShotbilleder("billede"), len(RShotbilleder("billede"))-4)%>&profileID=<%=RSprofiler("id")%>&voteID=<%=session("id")%>&point=1"><img src="images/stemmebar001.jpg" alt="1" width="21" height="30" border="0" onmouseover="document.getElementById('1').innerHTML = '<b>1</b>';" onmouseout="document.getElementById('1').innerHTML = '';"></a></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="left" valign="top"><%response.Write("<img src='images/stemmebar1not.jpg' width='21' height='13'><img src='images/stemmebar2not.jpg' width='12' height='13'>")%></td>
</tr>
</table>
<%end if
end if%>
</td>
<td width="402" align="center" valign="top" background="images/hotbg_24.jpg">
<%if RShotbilleder.EOF then%>
<img src="/images/hotbilleder/ingenbilleder.jpg">
<%else%>
<img src="/images/hotbilleder/watermark/<%=RShotbilleder("billede")%>">
<%end if%>
</td></tr>
<tr>
<td background="images/hotbg_14.jpg" colspan="2"><table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td width="14%"> </td>
<td width="54%">
<%if not RShotbilleder.EOF then%>
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="border">
<tr>
<td bgcolor="#FFFFFF">
<b><%if RSprofiler("kon") = "1" then%><img src="images/kvinde.jpg" width="14" height="14"><%else%><img src="images/mand.jpg" width="14" height="14"><%end if%><%=RSprofiler("profilnavn")%>, <%Response.Write GetAge(""&RSdag("dag")&"-"&RSmaaned("maaned")&"-"&RSaar("aar")&"")%> år <%if RSprofiler("partnerstatus") = "1" then%>er single<%end if%> og fra <%=RSpostnrby("byen")%>, <%=RSland("land")%></b><br>
<%Response.Write(Replace(RShotbilleder("beskrivelse"),vbCrLf,"<br>"))%></td>
</tr>
</table>
<%end if%>
</td>
<td width="32%" align="right" valign="top">
<%if not RShotbilleder.EOF then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" valign="top"><img src="images/hotbundknap_22.jpg" width="46" height="13"><img src="images/hotbundknap_32.jpg" width="78" height="13"> </td>
</tr>
<tr>
<td height="20" align="right" valign="bottom"><img src="images/hotbundknap_34.jpg" width="78" height="13"> </td>
</tr>
</table>
<%end if%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" valign="top"><img src="images/hotbg_15.jpg" width="464" height="8"></td>
</tr>
</table></td>
</tr>
</table></td><td width="103" align="right" valign="top"><!--#include virtual="/right.asp"--></td>
</tr>
</table>
<!--#include virtual="/bottom.asp"-->