IP address limit of ecshop online entry survey

Source: Internet
Author: User
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.

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.