Пример #1
0
    $msg = '';
    if (isset($_POST['forum_all'])) {
        $fList[] = 'all';
    } else {
        foreach (array_keys($_POST['forumlist']) as $k) {
            $fList[] = $k;
        }
    }
    foreach ($fList as $fid) {
        if (isset($_POST['counts'])) {
            $for->forumUpdateCounts($fid, $_POST['counts_threads']);
            $msg .= FORLAN_167 . ": {$fid} <br />";
        }
        if (isset($_POST['lastpost'])) {
            $with_threads = isset($_POST['lastpost_nothread']) ? FALSE : TRUE;
            $for->forumUpdateLastpost('forum', $fid, $with_threads);
            $msg .= FORLAN_168 . ": {$fid} <br />";
        }
    }
    if (isset($_POST['userpostcounts'])) {
        require_once e_HANDLER . 'user_extended_class.php';
        $ue = new e107_user_extended();
        $list = $for->getUserCounts();
        foreach ($list as $uid => $cnt) {
            $ue->user_extended_setvalue($uid, 'user_plugin_forum_posts', $cnt, 'int');
        }
        $msg .= FORLAN_169 . ' <br />';
    }
    $forum->show_message($msg);
}
if (isset($_POST['create_sub'])) {