欢迎来到工商注册核名查询系统!

phpwind

当前位置:主页 > CMS教程 > phpwind >

phpwind护身符道具不过期问题

来源:本站原创|时间:2022-11-25|栏目:phpwind|

关键字描述:问题 不过 道具   > uid " Showmsg & if

打开:hack/toolcenter/require/defend.php

整个文件内容替换为一下代码:

Copy code
<?php
!function_exists('readover') && exit('Forbidden');

/****

@name:护身符
@type:会员类
@effect:使用后,不能对该用户实现猪头术效果。

****/
InitGP(array('uid'));
if($tooldb['type']!=2){
Showmsg('tooluse_type_error'); // 判断道具类型是否设置错误
}
if(!$uid){
Showmsg('tooluse_nodefender');
}

$rt = $db->get_one("SELECT MAX(time) AS tooltime FROM pw_toollog WHERE touid='$uid' AND filename='defend'");
if($rt && $rt['tooltime']>$timestamp-3600*48){
Showmsg('tooluse_deused');
}
$db->update("UPDATE pw_usertool SET nums=nums-1 WHERE uid='$winduid' AND toolid='$toolid'");
$logdata=array(
'type' => 'use',
'filename' => 'defend',
'descrip' => 'tool_21_descrip',
'uid' => $winduid,
'username' => $windid,
'touid' => $uid,
'ip' => $onlineip,
'time' => $timestamp,
'toolname' => $tooldb['name'],
);
writetoollog($logdata);
Showmsg('toolmsg_success');
?>

更多phpwind

您可能感兴趣的文章

阅读排行

本栏相关

随机阅读

网页制作CMS教程网络编程软件编程脚本语言数据库服务器

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:835971066 | 邮箱:835971066#qq.com(#换成@)

Copyright © 2002-2020 工商注册核名查询系统 版权所有