- if ($game) {
- if (!(@include DISCUZ_ROOT.'./forumdata/cache/nkflash_'.$game.'.php')) {update_gamecache($game);}
- if ($discuz_uid && $nkflashvar['posts_count']) if ($db->result($db->query("SELECT count(*) FROM {$tablepre}posts WHERE authorid=$discuz_uid and dateline>$timestamp-604800"),0)<$nkflashvar['posts_count']) showmessage("你在本周的发帖数量不足,不能玩小游戏!", "plugins.php?p=nkflash", "NOPERM");
- if (preg_match("/^".$groupid."$|,".$groupid.",|^".$groupid.",|,".$groupid."$/",trim($nkflashvar['cant_play_groups']))) showmessage("您所属的组别,无权参与FLASH游戏。", "plugins.php?p=nkflash", "NOPERM");
- if (($gamelist[game_type]==0 || $type == "0") && $adminid != 1) showmessage("您无权访问未开放类别的游戏。", "plugins.php?p=nkflash", "NOPERM");
- }else{
- if (!(@include DISCUZ_ROOT.'./forumdata/cache/nkflash__allgames.php')) update_allgames();
- }
复制代码
这里有问题,都应该include nkflash__allgames.php
否则下面的
- $discuz_action = $allgames[$game][medal_id]+1000;
复制代码
会读不出来
建议改为
- if ($game) {
- if (!(@include DISCUZ_ROOT.'./forumdata/cache/nkflash_'.$game.'.php')) {update_gamecache($game);}
- if ($discuz_uid && $nkflashvar['posts_count']) if ($db->result($db->query("SELECT count(*) FROM {$tablepre}posts WHERE authorid=$discuz_uid and dateline>$timestamp-604800"),0)<$nkflashvar['posts_count']) showmessage("你在本周的发帖数量不足,不能玩小游戏!", "plugins.php?p=nkflash", "NOPERM");
- if (preg_match("/^".$groupid."$|,".$groupid.",|^".$groupid.",|,".$groupid."$/",trim($nkflashvar['cant_play_groups']))) showmessage("您所属的组别,无权参与FLASH游戏。", "plugins.php?p=nkflash", "NOPERM");
- if (($gamelist[game_type]==0 || $type == "0") && $adminid != 1) showmessage("您无权访问未开放类别的游戏。", "plugins.php?p=nkflash", "NOPERM");
- }
- if (!(@include DISCUZ_ROOT.'./forumdata/cache/nkflash__allgames.php')) update_allgames();
复制代码 |