function pwGetShortcut() { static $shortcutforum = array(); if (empty($shortcutforum)) { global $winddb, $forum, $winduid, $db_shortcutforum; if (trim($winddb['shortcut'], ',')) { isset($forum) || (require D_P . 'data/bbscache/forum_cache.php'); $tempshortcut = explode(',', $winddb['shortcut']); foreach ($tempshortcut as $value) { if ($value && isset($forum[$value])) { $shortcutforum[$value] = strip_tags($forum[$value]['name']); } } } if (empty($shortcutforum)) { if (!$db_shortcutforum && $winduid) { require_once R_P . 'require/updateforum.php'; $shortcutforum = updateshortcut(); } else { $shortcutforum = $db_shortcutforum; } } } return $shortcutforum; }
Cookie('online', $online); include_once S::escapePath(R_P . "require/online_{$db_online}.php"); } } if ($online == 'no') { Cookie('online', 'no'); } } $showgroup = $db_showgroup ? explode(',', $db_showgroup) : array(); // Share union if ($db_indexmqshare && $sharelink[1]) { $sharelink[1] = "<marquee scrolldelay=\"100\" scrollamount=\"4\" onmouseout=\"if (document.all!=null){this.start()}\" onmouseover=\"if (document.all!=null){this.stop()}\" behavior=\"alternate\">{$sharelink['1']}</marquee>"; } if ($db_hostweb == 1 && $updateDaily && $tdtcontrol < $tdtime && !defined('M_P')) { require_once R_P . 'require/updateforum.php'; updateshortcut(); pwQuery::update('pw_bbsinfo', 'id=:id', array(1), array('yposts' => $tposts, 'tdtcontrol' => $tdtime, 'o_tpost' => 0)); pwQuery::update('pw_forumdata', 'tpost<>:tpost', array(0), array('tpost' => 0)); } // update posts hits if ($c_htm || $db_hits_store == 2) { $db_hithour == 0 && ($db_hithour = 4); $hit_wtime = $hit_control * $db_hithour; $hit_wtime > 24 && ($hit_wtime = 0); $hitsize = @filesize(D_P . 'data/bbscache/hits.txt'); if ($hitsize && ($hitsize > 1024 || $timestamp - $hit_tdtime > $hit_wtime * 3600) && procLock('hitupdate')) { require_once R_P . 'require/hitupdate.php'; procUnLock('hitupdate'); } } if ($higholnum < $usertotal) {
/** * 获取版块短名 * * @global array $winddb * @global array $forum * @global string $winduid * @global string $db_shortcutforum * @return array */ function pwGetShortcut() { static $sForumsShortcut = array(); if (empty($sForumsShortcut)) { global $winduid, $db_shortcutforum; $sForumsShortcut = pwGetMyShortcut(); if (empty($sForumsShortcut)) { if (!$db_shortcutforum && $winduid) { require_once R_P . 'require/updateforum.php'; updateshortcut(); //$sForumsShortcut = updateshortcut(); } } } /*侧栏 等处因删除无权查看的隐藏板块*/ global $winddb, $forum, $groupid, $windid; extract(pwCache::getData(D_P . 'data/bbscache/forum_cache.php', false)); foreach ($sForumsShortcut as $k => $v) { if ($forum[$k]['f_type'] == 'hidden' && (!allowcheck($forum['allowvisit'], $groupid, $winddb['groups'], $forum['fid'], $winddb['visit']) && !S::inArray($windid, $manager))) { unset($sForumsShortcut[$k]); } } return $sForumsShortcut; }