不能删除的解决方法:
打开文件(admin/admincp_farm.php)找到这几行
$_SGLOBAL['db']->query("DELETE FROM ".tname('happyfarm_config')." WHERE uid=".$id);
$_SGLOBAL['db']->query("DELETE FROM ".tname('happyfarm_nc')." WHERE uid=".$id);
$_SGLOBAL['db']->query("DELETE FROM ".tname('happyfarm_mc')." WHERE uid=".$id);
$_SGLOBAL['db']->query("DELETE FROM ".tname('happyfarm_mclogs')." WHERE uid=".$id);
showmessage('删除UID为'.$id.'的用户的农牧场成功', 'admincp.php?ac=farm');
将WHERE WHERE uid=".$uid);改为WHERE uid=".$id);
------------------------------------------------------------------------------------------------
不能显示用户名解决,
打开文 件happyfarm/happyfarm.php找到这行大概在44行左右
$_SGLOBAL['db']->query( "INSERT INTO ".tname( "happyfarm_config" )." (uid,Message,setting1,setting2,setting3,setting4,setting5,setting6,exchange,pf) VALUES(".$UID.",'".$Message."','".$setting1."','".$setting2."','".$setting3."','".$setting4."','".$setting5."','".$setting6."','".$exchange."',0)");
改成
$_SGLOBAL['db']->query( "INSERT INTO ".tname( "happyfarm_config" )." (uid,username,Message,setting1,setting2,setting3,setting4,setting5,setting6,exchange,pf) VALUES(".$UID.",'".$_SGLOBAL['supe_username']."','".$Message."','".$setting1."','".$setting2."','".$setting3."','".$setting4."','".$setting5."','".$setting6."','".$exchange."',0)");
注意,改完之后之前的用户也不会显示用户名,改完之后重新开农场的用户会显示。 |