非奴隶主可以操作其他人进行任务、释放、打折的BUG,导致地主泛滥成灾,金钱贬值....
打开:com_slave.php ,红色为添加判断,是否是你的奴隶,打开你的文件,添加红色代码即可
找到:
if($op=="confirmdiscount"){
$sidebar = 1; //打开右侧栏
comSlaveCheckIsSlave($uid) != 1 && showmessage("无法对该奴隶操作");
$userinfo = comSlaveGetUserInfo($uid);
$mastername = comSlaveUserLink($space[uid], $space[username]);
$username = comSlaveUserLink($userinfo[uid], $userinfo[username]);
//检查奴隶一天內被卖了几次
$discountPerDay = comSlaveCheckSlaveDiscountPerDay($userinfo[uid]);
if($discountPerDay >= $SConfig[slave_discount_limit]){
showmessage(comlang('maxslave_discount_limit', array($SConfig[slave_discount_limit], $username)));
}
。。。。代码省略若干。。。。。。
//-------------------执行奴隶动作----------------
if($_POST['op']=="submitaction"){
$taskid = $_POST['taskid'];
$authoruid = $_POST['authoruid'];
$uid = $_POST['uid'];
comSlaveCheckIsSlave($uid) != 1 && showmessage("无法对该奴隶操作");
$status = comSlaveDoTask($uid, $taskid);
if($status[limit]){
showmessage(comlang('daily_limit_error', array($status[limit])));
} elseif($status[actionlimit]) {
showmessage(comlang('action_limit_error', array($SConfig[action_hour],$SConfig[action_period])));
} else {
$statusmsg = $status[msg];
}
}
。。。。代码省略若干。。。。。。
//-------------------给奴隶起花名----------------
if($op=="changenick"){
$sidebar = 1;
if($_POST[submitnick]){
$uid = $_POST[uid];
$nickname = $_POST[nickname];
comSlaveCheckIsSlave($uid) != 1 && showmessage("无法对该奴隶操作");
$query = "UPDATE ".tname('com_slave_main')." SET nickname='$nickname' WHERE uid=".$uid;
$_SGLOBAL['db']->query($query);
showmessage(comlang('changenick_successful'), "component.php?com=slave&uid=$uid", 3);
}
$user = comSlaveGetUserInfo($uid);
$username = comSlaveUserLink($user[uid], $user[username]);
if($user[uplineuid]!=$space[uid]){
showmessage(comlang('changenick_error', array($username)));
}
}
。。。。代码省略若干。。。。。。
//-------------------確定释放奴隶----------------
if($op=="confirmrelease"){
$sidebar = 1;
comSlaveCheckIsSlave($uid) != 1 && showmessage("无法对该奴隶操作");
$user = comSlaveGetUserInfo($uid);
$mastername = comSlaveUserLink($space[uid], $space[username]);
$username = comSlaveUserLink($user[uid], $user[username]);
if($user[uplineuid]!=$space[uid]){
showmessage(comlang("release_error", array($username)));
}
$user[grandtotal] = round($user[pvalue]/3);
。。。。代码省略若干。。。。。。
//-------------------確定收藏奴隶----------------
if($op=="confirmcollect"){
$sidebar = 1;
comSlaveCheckIsSlave($uid) != 1 && showmessage("无法对该奴隶操作");
$SConfig = comSlaveGetUserInfo($uid);
$master = comSlaveGetUserInfo($space[uid]);
$mastername = comSlaveUserLink($space[uid], $space[username]);
$username = comSlaveUserLink($SConfig[uid], $SConfig[username]);
$collectionarr = explode(",",$master[collection]);
if(in_array($uid,$collectionarr)){
showmessage(comlang('collect_error', array($username)));
}
if(!empty($master[collection])){
$master[collection] = $master[collection] . ",".$SConfig[uid];
} else {
$master[collection] = $uid;
}
。。。。代码省略若干。。。。。。 |