Changing length of time between votes
Posted: Thu Feb 10, 2005 7:02 am
I apologize if this is a really simple question, but I've been Googling and trial-and-erroring for a week now with no results. Before I pull out my last hair, can somebody help me with this?
I have a voting script that allows only one vote per ip per day. I want to change this to one vote per week. I've been trial-and-erroring myself crazy, and still can't change this, nor do I even know where to look.
I'm pretty sure the answer is somewhere in the section pasted below. Can someone help?
I have a voting script that allows only one vote per ip per day. I want to change this to one vote per week. I've been trial-and-erroring myself crazy, and still can't change this, nor do I even know where to look.
I'm pretty sure the answer is somewhere in the section pasted below. Can someone help?
Code: Select all
function dbget_exec_SetUserOff($current_id){
if(!dbsec_no_injection("$current_id,0")) return false;
db_exec("UPDATE pv_sessions_simple SET offline='0',time_end=NOW() WHERE id='$current_id' OR TO_DAYS(NOW())-TO_DAYS(time_start)>1");
return 0;
}
return 1;