Пример #1
0
            !$fidcommend[$key] && ($delSQL[$key] = $key);
        }
    }
    $addSQL && $db->update("REPLACE INTO pw_searchforum (fid,vieworder) VALUES " . pwSqlMulti($addSQL));
    if ($updateArr) {
        foreach ($updateArr as $key => $value) {
            $value && $db->update("UPDATE pw_searchforum SET " . pwSqlSingle($value) . " WHERE fid=" . pwEscape($key, false));
        }
    }
    $delSQL && $db->update("DELETE FROM pw_searchforum WHERE fid IN(" . pwImplode($delSQL) . ")");
    //if ($addSQL || $updateArr || $delSQL) {
    updatecache_search();
    //}
    adminmsg('operate_success', "{$basename}&action=forum");
} elseif ($action == 'statistic') {
    s::gp(array('keyword', 'createtime_s', 'createtime_e'));
    $createtime_s = $createtime_s ? $createtime_s : get_date($timestamp - 7 * 24 * 3600, 'Y-m-d');
    $createtime_e = $createtime_e ? $createtime_e : get_date($timestamp, 'Y-m-d');
    $addsql = '';
    if ($keyword) {
        $keyword = trim($keyword);
        $keywordarray = explode(",", $keyword);
        foreach ($keywordarray as $value) {
            $value = str_replace('*', '%', $value);
            $keywhere .= " OR keyword LIKE " . S::sqlEscape("%{$value}%");
        }
        $keywhere = substr_replace($keywhere, "", 0, 3);
        $addsql .= " AND ({$keywhere}) ";
    }
    if ($createtime_s) {
        $addsql .= " AND created_time >= " . s::sqlEscape(PwStrtoTime($createtime_s));
Пример #2
0
            $firstactmid = $value;
            break;
        }
    }
    $N_allowtypeopen = true;
}
$msg_guide = $pwforum->headguide($guidename);
//$msg_guide = headguide($guidename);
unset($fourm, $guidename);
//评价功能开启
$rateSets = unserialize($db_ratepower);
if (!$forumset['rate'] && $rateSets[1] && isset($db_hackdb['rate'])) {
    list($noAjax, $objectid, $typeid, $elementid) = array(TRUE, $tid, 1, 'vote_box');
    require_once R_P . 'hack/rate/index.php';
}
s::gp(array('pingpage'));
!$pingpage && ($pingpage = 1);
if (Perf::checkMemcache()) {
    $_cacheService = Perf::gatherCache('pw_ping');
    $ping_logs = $_cacheService->getPingsByThreadId($tid, $ping_logs, $pingpage);
} else {
    if ($ping_logs) {
        $pingService = L::loadClass('ping', 'forum');
        $ping_logs = $pingService->getPingLogs($tid, $ping_logs, $pingpage);
    } else {
        $ping_logs = array();
    }
}
$isAuthStatus = $isGM || (!$forumset['auth_allowrp'] || $pwforum->authStatus($winddb['userstatus'], $forumset['auth_logicalmethod']) === true);
//!$isAuthStatus && $N_allowtypeopen = false;
//快速回复