哥们 经过测试 有点问题
只要设置中奖间隔,就会领不到号
问题是
assign_ane.class.php文件中的
- $lasttime = DB::result_first("SELECT dateline FROM ".DB::table('form_post')." WHERE tid='$_G[tid]' AND authorid='$_G[uid]' ORDER BY dateline DESC LIMIT 0,1");
复制代码
判断条件是- ($_G['timestamp'] - $lasttime < $assign['atimebet'])
复制代码
因为是成功发帖之后才会进行以上的查询和判断,
$_G['timestamp'] 是当前的系统时间,$lasttime是最后发帖的时间
因为刚刚发帖,最后发帖时间和当前时间是相等的,这个判断条件就等于是 0 < $assign['atimebet']),这个条件永远都会是true,
返回false才会继续往下执行程序,所以在取$lasttime 的时候,应该在第二条数据开始获取,所以应该是如下代码..
- $lasttime = DB::result_first("SELECT dateline FROM ".DB::table('form_post')." WHERE tid='$_G[tid]' AND authorid='$_G[uid]' ORDER BY dateline DESC LIMIT 1,1");
复制代码
|