onehempcat
11-14-2005, 11:47 PM
I have a question, that maybe someone can answer. Its a good one. I got a ranking top site. And it does not have the function to stop people from voting as many times as they want. What I want, is to be able to set how they can vote. Either every hour, every day or every week. If thats a huge thing, which I am certain it is. I am at least looking to stop people from voting for an hour at a clip only.
It sounds crazy to me, when I tryed, I failed.
Now, I have edited all the pages to my sites info, so I have included the original zip file. Most important things were left on my site anyway.
If anyone feels the urge to explain this to me, I would greatly appreciate it.
My thought is to check their Ip when they vote. So using the redirect page sounds correct. Here is that pages script, if it is that easy. I looked everywhere for the answer, but didnt find it.
redirect.asp:
<%@ Language="VBScript" %>
<% Option Explicit %>
<%
'## Author : Imran Hussain
'## Copyright : ©2004-2005,ASPScriptz.Com,All Rights
%>
<!--#INCLUDE FILE="DBCONN.ASP"-->
<!--#INCLUDE FILE="INC_LNG.ASP"-->
<%DIM SITEID,RTYPE,R****SOUTADD,R****SINADD
RTYPE = REQUEST.QUERYSTRING("TYPE")
SITEID = REQUEST.QUERYSTRING("SITEID")
IF RTYPE = "OUT" THEN
SET R****SOUTADD = SERVER.CREATEOBJECT("ADODB.RECORDSET")
R****SOUTADD.OPEN "TOPSITES_SITES WHERE TOPSITES_SITE_ID LIKE '" & SITEID & "'", DBCONN, 3, 3
IF NOT R****SOUTADD.EOF THEN
R****SOUTADD.UPDATE
R****SOUTADD("TOPSITES_SITE_HITS_OUT") = R****SOUTADD("TOPSITES_SITE_HITS_OUT") + 1
R****SOUTADD.UPDATE
RESPONSE.REDIRECT(R****SOUTADD("TOPSITES_SITE_URL"))
ELSE
RESPONSE.WRITE TS_MSG_NOSITEFOUND & "<A HREF=""DAFAULT.ASP"">"&TS_MSG_GOTOHOME&"</A>"
END IF
ELSEIF RTYPE = "IN" THEN
SET R****SINADD = SERVER.CREATEOBJECT("ADODB.RECORDSET")
R****SINADD.OPEN "TOPSITES_SITES WHERE TOPSITES_SITE_ID LIKE '" & SITEID & "'", DBCONN, 3, 3
IF NOT R****SINADD.EOF THEN
R****SINADD.UPDATE
R****SINADD("TOPSITES_SITE_HITS_IN") = R****SINADD("TOPSITES_SITE_HITS_IN") + 1
R****SINADD.UPDATE
RESPONSE.REDIRECT("DEFAULT.ASP")
ELSE
RESPONSE.WRITE TS_MSG_NOSITEFOUND & "<A HREF=""DAFAULT.ASP"">"&TS_MSG_GOTOHOME&"</A>"
END IF
END IF%>
Just code mumbled up if you dont have the INC_LNG.ASP file to look at. If someone nails this, we could probably get the creator of the script to add it in, and credit you.
It sounds crazy to me, when I tryed, I failed.
Now, I have edited all the pages to my sites info, so I have included the original zip file. Most important things were left on my site anyway.
If anyone feels the urge to explain this to me, I would greatly appreciate it.
My thought is to check their Ip when they vote. So using the redirect page sounds correct. Here is that pages script, if it is that easy. I looked everywhere for the answer, but didnt find it.
redirect.asp:
<%@ Language="VBScript" %>
<% Option Explicit %>
<%
'## Author : Imran Hussain
'## Copyright : ©2004-2005,ASPScriptz.Com,All Rights
%>
<!--#INCLUDE FILE="DBCONN.ASP"-->
<!--#INCLUDE FILE="INC_LNG.ASP"-->
<%DIM SITEID,RTYPE,R****SOUTADD,R****SINADD
RTYPE = REQUEST.QUERYSTRING("TYPE")
SITEID = REQUEST.QUERYSTRING("SITEID")
IF RTYPE = "OUT" THEN
SET R****SOUTADD = SERVER.CREATEOBJECT("ADODB.RECORDSET")
R****SOUTADD.OPEN "TOPSITES_SITES WHERE TOPSITES_SITE_ID LIKE '" & SITEID & "'", DBCONN, 3, 3
IF NOT R****SOUTADD.EOF THEN
R****SOUTADD.UPDATE
R****SOUTADD("TOPSITES_SITE_HITS_OUT") = R****SOUTADD("TOPSITES_SITE_HITS_OUT") + 1
R****SOUTADD.UPDATE
RESPONSE.REDIRECT(R****SOUTADD("TOPSITES_SITE_URL"))
ELSE
RESPONSE.WRITE TS_MSG_NOSITEFOUND & "<A HREF=""DAFAULT.ASP"">"&TS_MSG_GOTOHOME&"</A>"
END IF
ELSEIF RTYPE = "IN" THEN
SET R****SINADD = SERVER.CREATEOBJECT("ADODB.RECORDSET")
R****SINADD.OPEN "TOPSITES_SITES WHERE TOPSITES_SITE_ID LIKE '" & SITEID & "'", DBCONN, 3, 3
IF NOT R****SINADD.EOF THEN
R****SINADD.UPDATE
R****SINADD("TOPSITES_SITE_HITS_IN") = R****SINADD("TOPSITES_SITE_HITS_IN") + 1
R****SINADD.UPDATE
RESPONSE.REDIRECT("DEFAULT.ASP")
ELSE
RESPONSE.WRITE TS_MSG_NOSITEFOUND & "<A HREF=""DAFAULT.ASP"">"&TS_MSG_GOTOHOME&"</A>"
END IF
END IF%>
Just code mumbled up if you dont have the INC_LNG.ASP file to look at. If someone nails this, we could probably get the creator of the script to add it in, and credit you.