Exemplo n.º 1
0
            if (!$category['display']) {
                continue;
            }
            $navpath .= $category['categoryname'] . " » ";
        }
        while (list(, $board) = each($a_board[$category['categoryid']])) {
            if (isset($a_lastvisited[$board['boardid']]) && $board['boardlastpost'] > $a_lastvisited[$board['boardid']] && $a_lastvisited[$board['boardid']] != 0) {
                $imagepath = './templates/' . $style['styletemplate'] . '/images/board_new.png';
            } else {
                $imagepath = './templates/' . $style['styletemplate'] . '/images/board.png';
            }
            eval($Tboard->GetTemplate("INDEXROWS"));
        }
    }
}
$stats = "Das Forum hat <b>" . getusercount() . "</b> registrierte Benutzer, davon sind <b>" . getactiveusers() . "</b> aktiv.";
$r_post = thwb_query("SELECT count(postid) AS postcount FROM " . $pref . "post");
$posts = mysql_result($r_post, 0);
$r_thread = thwb_query("SELECT count(threadid) AS threadcount FROM " . $pref . "thread");
$threads = mysql_result($r_thread, 0);
$stats .= '<br><b>' . $threads . '</b> Threads | <b>' . $posts . '</b> Posts';
$newthreads = '<a href="' . build_link("search.php?startsearch=1&amp;searchfor=today") . '">Aktive Themen von Heute anzeigen</a> || ';
$servertime = 'Serverzeit: ' . form_date(time(), 0) . '.';
$r_pm = thwb_query("SELECT count(pmid) AS pmcount FROM " . $pref . "pm WHERE pmtoid={$g_user['userid']} AND pmflags=1");
$r_pms = thwb_query("SELECT COUNT(pmid) AS pmcount FROM {$pref}pm WHERE pmtoid={$g_user['userid']}");
$pms = mysql_result($r_pm, 0);
$allpms = mysql_result($r_pms, 0);
$pmquotawarning = '';
$javascript = '';
if (!isset($g_user['usernoding'])) {
    $g_user['usernoding'] = '0';
Exemplo n.º 2
0
            query("DELETE FROM\n                    {$pref}" . "thread\n                WHERE\n                    threadlink IN ({$ids})");
            // and finally get rid of the posts in those threads
            query("DELETE FROM\n                    {$pref}" . "post\n                WHERE\n                    threadid IN ({$ids})");
            // optimize tables afterwards
            // isn't always supported, that's why we put an @ in front
            @mysql_query("OPTIMIZE TABLE {$pref}" . "thread");
            @mysql_query("OPTIMIZE TABLE {$pref}" . "post");
            foreach ($a_boardids as $b) {
                updateboard($b);
            }
        }
        print "Deleting ... successful";
    }
} elseif ($action == "postcount") {
    if (!isset($do) || !$do) {
        print '    Do you want to continue correcting the postcount of ' . getusercount() . ' users?<BR>
            <a href="mysql.php?session=' . $session . '&action=postcount&do=1">Yes</a> || <a href="mysql.php?session=' . $session . '">No</a>';
        exit;
    }
    print "Postcount is being checked ... please wait ...<BR><BR>";
    $r_user = query("    SELECT user.userid, user.userposts, count(post.userid) AS postcount\n                FROM " . $pref . "user AS user\n                INNER JOIN " . $pref . "post AS post\n                ON post.userid = user.userid\n                GROUP BY user.userid");
    $a_user = array();
    $corrected = 0;
    $checked = 0;
    $wrong = 0;
    while ($a_user = mysql_fetch_array($r_user)) {
        if ($a_user['userposts'] != $a_user['postcount']) {
            query("UPDATE " . $pref . "user SET userposts = '" . $a_user['postcount'] . "' WHERE userid = '" . $a_user['userid'] . "'");
            $corrected++;
            if ($a_user['userposts'] > $a_user['postcount']) {
                $wrong += $a_user['userposts'] - $a_user['postcount'];