首页| 版块| 我的| 发帖| 消息
主题:2013年11月1日:帖子点亮插件上线测试
zhangjingyu 
帖子点亮插件在后台有一个设置是否扣除点亮者的积分,同时无论开启与否,被点亮者都增加相应的积分。不过,之前未开启过,但测试时注意到被点亮者的积分并没有增加。由于修改完成,于是今天开始测试积分扣除。然而,开启后进行测试,一直提示“您的积分不足,无法点亮本帖!”。更换积分类型,测试了好几次都不行,看来应该是文件有问题。还是令人头疼的php文件,不过这回还好,相应的代码不算复杂,能猜个八九。贴上完整代码:
function setflight($pid,$tid,$uid){
                global $winduid;
                if(!$winduid){
                        showmsg("对不起,点亮前请先登录!");
                }
                $this->checkflight($pid,$tid,$winduid,$uid);
                if($this->config[pay]){
                        if($this->config[ispay]){
                                $mycredit = $this->credit->get($winduid,$this->config['paytype']);
                                if($mycredit < $this->config['pay']){
                                        showmsg("您的积分不足,无法点亮本帖!");
                                }else{
                                        $this->credit->set($winduid,$this->config['paytype'],-$this->config['pay']);
                                }
                        }
                        $this->credit->set($uid,$this->config['paytype'],$this->config['pay']);
                }
                $this->db->update("update pw_posts set flight=flight+1 where tid='$tid' and pid='$pid'");
                if($this->config['maxflight']){
                    
zhangjingyu回帖于2016-03-15 11:24[查看电脑版]
下一页 (1/3)
下一楼»:非常感谢我们未来的首席先生,谢谢你的支持!
«上一楼:精神上支持你

查看全部回帖(55)
«返回主帖