Ecshop secondary development, ecshop communication, ecshop Communication Group, ecshop online survey, ecshop technical exchange, PHP blog, qingfeng
EcshopThe IP address restrictions of online surveys make online surveys of ecshop very clumsy. ip_address = '$ ip_address' AND vote_id = '$ vote_id' is because of this condition, set an IP address to vote only once.
Most of the time, according to the nature of e-commerce, the survey needs to be flexible and diverse. how can we change this restriction so that the ecshop mall can adapt to the needs and change it to vote once a day.
In ecshop vote. php, there is a function called vote_already_submited (), which is used to determine whether the IP address is repeatedly voted, and its restriction is very dead.
If you modify this function
Function vote_already_submited ($ vote_id, $ ip_address)
{
$ Formt = $ db-> getOne ("select vote_time from ecs_vote_log where ip_address = '$ ip_address' and vote_id = '$ vote_id '");
Return date ("Y-m-d", $ formt) = date ("Y-m-d", gmtime ()); // if the voting time is equal to the time recorded in the database. then, the system returns the result that has already been voted.
}