我有一个问题要问这个网站上的脚本 [英] I have a question regardig a script on this site

查看:83
本文介绍了我有一个问题要问这个网站上的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

脚本位于此处: [
它工作正常,但我想记录所有投票,因为我们有一个忠诚的奖赏系统,因此,如果会员每天投票3或4天,我们将给他一些东西.

问题是脚本的工作方式是这样的:如果我今天投票,它会记录我的user_id,比如说55和今天的日期.如果我明天也投票,而不是在addresses.xml(用于存储所有user_id和日期的文件)中创建一个新条目,它将保留旧条目并更新日期.

我想使用相同的user_id(55)和明天的日期创建一个新条目.
我真的希望您能了解我想要的内容并能够为我提供帮助,因为它使我发疯,因为我不了解DOMDocuments.

The script is located here : [A Simple PHP Polling/Voting System].

The question is a little complicated.

If you follow the script it logs in IP addresses to be sure everyone votes 1 time per 24 hours.
All I did is changed $_SERVER["REMOTE_ADDR"] (this logs the ip) with $_SESSION["user_id"] I have a login feature on my site and I want to restrict votes per registered member.

It works perfectly but I want to log all the votes because we have a prize system for fidelity so if a member votes every day for 3 or 4 days we will give him something.

The problem is that the script works like this: if I vote today it logs my user_id, let''s say 55 and the date of today. If I vote tomorrow too, instead of creating a new entry in the addresses.xml (the file where it stores all the user_id''s and dates) it just keeps the old entry and just updates the date.

I want to create a new entry with the same user_id (55) and the date of tomorrow.
I really hope you will understand what I want and be able to help me because it is driving me crazy as I don''t know DOMDocuments.

Please someone help and thanks in advance for all possible answers!

推荐答案

_SERVER ["REMOTE_ADDR"](此记录ip),
_SERVER["REMOTE_ADDR"] (this logs the ip) with


_SESSION ["user_id"]我的网站上具有登录功能,我想限制每个注册成员的投票.

它工作正常,但我想记录所有投票,因为我们有一个忠诚的奖赏系统,因此,如果会员每天投票3或4天,我们将给他一些东西.

问题是脚本的工作方式是这样的:如果我今天投票,它会记录我的user_id,比如说55和今天的日期.如果我明天也投票,而不是在addresses.xml(用于存储所有user_id和日期的文件)中创建一个新条目,它将保留旧条目并更新日期.

我想使用相同的user_id(55)和明天的日期创建一个新条目.
我真的希望您能了解我想要的内容并能够为我提供帮助,因为它使我发疯,因为我不了解DOMDocuments.

请有人帮助,并提前感谢您提供所有可能的答案!
_SESSION["user_id"] I have a login feature on my site and I want to restrict votes per registered member.

It works perfectly but I want to log all the votes because we have a prize system for fidelity so if a member votes every day for 3 or 4 days we will give him something.

The problem is that the script works like this: if I vote today it logs my user_id, let''s say 55 and the date of today. If I vote tomorrow too, instead of creating a new entry in the addresses.xml (the file where it stores all the user_id''s and dates) it just keeps the old entry and just updates the date.

I want to create a new entry with the same user_id (55) and the date of tomorrow.
I really hope you will understand what I want and be able to help me because it is driving me crazy as I don''t know DOMDocuments.

Please someone help and thanks in advance for all possible answers!


请勿将此问题发布在问题与解决方案"下答案-如果您从某篇文章中获取了代码,那么该文章的底部会出现一个新消息"按钮,该按钮会导致向作者发送电子邮件.然后会通知他们您希望与他们交谈.
将其发布到此处依赖于他们的下落"并意识到它是针对他们的.
Don''t post this under Questions & Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.


这篇关于我有一个问题要问这个网站上的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆