新的2.7安装包中的农牧场管理不能删除用户的解决方法:
打开文件(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)");
这个解决方法是 ajaxer 朋友提供的。。
虽然删除用户农牧场不是很完美。但是已经验删除了 |