/asp/freeapps/topsitementor/rankem.asp
<%
OPTION EXPLICIT
Response.Buffer = True
%>
<!--#include file="inctopsite.asp"-->
<%
Function Canrank( sSiteId )
'Check if user already have voted last 24 hours
If Request.Cookies( "2111cookie" & sSiteId ) <> "" Then
Canrank = false
Else
Canrank = true
End If
Response.Cookies( "2111cookie" & sSiteId ) = "1"
Response.Cookies( "2111cookie" & sSiteId ).Expires = Date()+1
End Function
Dim sSiteId
sSiteId = Request("id")
If sSiteId = "" Then
Response.Redirect "showsite.asp"
Response.Flush
Response.End
End If
'This is the click-through page...
If g_fUseGateway = True Then
If Request.Form("rank") <> "" Then
If Request.Form("TheButton") <> "Yes!" Then
Response.Redirect "showlist.asp"
Response.Flush
Response.End
End If
If Canrank( sSiteId ) Then
'Ok, just rank it...
Dim oConn
Set oConn = IncTopsite_GetDatabaseConn()
oConn.Execute("update " & IncTopsite_GetTablePrefix() & "site set incount=incount+1 where id=" & sSiteId )
oConn.Close
Set oConn = Nothing
End If
Response.Redirect "showlist.asp"
Response.Flush
Response.End
End If
End If
If g_fUseGateway = True Then
%>
<html>
<head>
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>LinkMentor demo</title>
<style type="text/css">
<!--
body { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
td { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
th { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
A:hover {text-decoration: underline;}
-->
</style>
</head>
<body bgcolor="<%=g_strBodyColor%>">
<table border="0" width="100%">
<tr>
<td width="100%" align="center">
<%=FAQ_GetAd( 1 )%> <hr>
</td>
</tr>
<tr>
<td width="100%" align="center"><font color="#660000" face="Tahoma,Verdana,Arial" size="+3"><b>Do
you want to vote for the site?</b></font><BR>
<br>
<form method="POST" action="rankem.asp">
<input name="id" type="hidden" value="<%=sSiteId%>">
<input name="rank" type="hidden" value="yes">
<p><input type="submit" value="Yes!" name="TheButton"> <input type="submit" value="No" name="TheButton"></p>
</form>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td valign="top" align="center">
<hr>
<p> <%=FAQ_GetAd( 2 )%><br><%=FAQ_GetAd( 3 )%>
</p>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="100%" align="center"><FONT face="Arial,sans serif" size=2>� </FONT> <font size="1" face="Arial,sans serif">2000
<a href="http://www.aspcode.net">ASPCode.net</a></font></td>
</tr>
<br>
<br>
</table>
<p align="center"> </p>
</body>
</html>
<%
Else
'Ok, just rank it...
If Canrank( sSiteId ) Then
Set oConn = IncTopsite_GetDatabaseConn()
oConn.Execute("update " & IncTopsite_GetTablePrefix() & "site set incount=incount+1 where id=" & sSiteId )
oConn.Close
Set oConn = Nothing
End if
Response.Redirect "showlist.asp"
Response.Flush
Response.End
End If
%>