当前位置: 首页>>代码示例>>PHP>>正文


PHP UpdateBoardStats函数代码示例

本文整理汇总了PHP中UpdateBoardStats函数的典型用法代码示例。如果您正苦于以下问题:PHP UpdateBoardStats函数的具体用法?PHP UpdateBoardStats怎么用?PHP UpdateBoardStats使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UpdateBoardStats函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

                $row = $cache[$id];
                $rev[] = array('name' => $row['uname'], 'date' => $row['date'], 'reason' => $lang->phrase('admin_merge_edit_add'), 'ip' => $row['ip']);
            }
            $rev[] = array('name' => $my->name, 'date' => time(), 'reason' => $lang->phrase('admin_merge_edit_reason'), 'ip' => $my->ip);
            usort($rev, "cmp_edit_date");
            $edit = '';
            foreach ($rev as $row) {
                $edit .= "{$row['name']}\t{$row['date']}\t{$row['reason']}\t{$row['ip']}\n";
            }
            $edit = trim($edit, "\n");
            $db->query("UPDATE {$db->pre}postratings SET tid = '{$base['id']}' WHERE tid IN ({$iold})", __LINE__, __FILE__);
            $db->query("UPDATE {$db->pre}uploads SET tid = '{$base['id']}' WHERE tid IN ({$iold})", __LINE__, __FILE__);
            $db->query("UPDATE {$db->pre}vote SET tid = '{$base['id']}' WHERE tid IN ({$iold})", __LINE__, __FILE__);
            $db->query("UPDATE {$db->pre}replies SET topic = '{$topic}', name = '{$name}', comment = '{$_POST['comment']}', dosmileys = '{$_POST['dosmileys']}', dowords = '{$_POST['dowords']}', email = '{$email}', ip = '{$ip}', edit = '{$edit}', guest = '{$guest}' WHERE id = '{$base['id']}'", __LINE__, __FILE__);
            $db->query("DELETE FROM {$db->pre}replies WHERE id IN ({$iold})", __LINE__, __FILE__);
            ($code = $plugins->load('managetopic_pmerge_end')) ? eval($code) : null;
            UpdateTopicStats($info['id']);
            UpdateBoardStats($info['board']);
            $anz = count($ids);
            ok($lang->phrase('x_entries_merged'), "showtopic.php?topic_id=" . $base['id'] . "&action=jumpto&id=" . $base['topic_id'] . SID2URL_x);
        }
    }
    ($code = $plugins->load('managetopic_end')) ? eval($code) : null;
} else {
    errorLogin($lang->phrase('not_allowed'));
}
$slog->updatelogged();
$zeitmessung = t2();
echo $tpl->parse("footer");
$phpdoc->Out();
$db->close();
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:managetopic.php

示例2: ok

        $delobj = $scache->load('fgroups');
        $delobj->delete();
        $delobj = $scache->load('forumtree');
        $delobj->delete();
        $delobj = $scache->load('parent_forums');
        $delobj->delete();
        ok('admin.php?action=forums&job=manage', 'Forum successfully added!');
    }
} elseif ($job == 'forum_recount') {
    echo head();
    $id = $gpc->get('id', int);
    if (!is_id($id)) {
        echo head();
        error('admin.php?action=forums&job=manage', 'Forum or Category was not found on account of an invalid ID.');
    }
    UpdateBoardStats($id);
    ok('admin.php?action=forums&job=manage', 'Statistics successfully recounted!');
} elseif ($job == 'cat_move' || $job == 'forum_move') {
    $id = $gpc->get('id', int);
    $move = $gpc->get('move', int);
    if (!is_id($id)) {
        echo head();
        error('admin.php?action=forums&job=manage', 'Forum or Category was not found on account of an invalid ID.');
    }
    $table = iif($job == 'cat_move', "{$db->pre}categories", "{$db->pre}forums");
    $cache = iif($job == 'cat_move', "categories", "cat_bid");
    $op = iif($move == 1, "+", "-");
    $db->query("UPDATE {$table} SET position = position{$op}1 WHERE id = '{$id}' LIMIT 1", __LINE__, __FILE__);
    $delobj = $scache->load('forumtree');
    $delobj->delete();
    $delobj = $scache->load($cache);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:forums.php

示例3: IN

        $db->query("DELETE FROM {$db->pre}abos WHERE tid IN({$ids})", __LINE__, __FILE__);
        $anz += $db->affected_rows();
        $db->query("DELETE FROM {$db->pre}topics WHERE id IN({$ids})", __LINE__, __FILE__);
        $anz += $db->affected_rows();
        $votes = $db->query("SELECT id FROM {$db->pre}vote WHERE tid IN({$ids})", __LINE__, __FILE__);
        $voteaids = array();
        while ($row = $db->fetch_num($votes)) {
            $voteaids[] = $row[0];
        }
        if (count($voteaids) > 0) {
            $db->query("DELETE FROM {$db->pre}votes WHERE id IN (" . implode(',', $voteaids) . ")", __LINE__, __FILE__);
            $anz += $db->affected_rows();
        }
        $db->query("DELETE FROM {$db->pre}vote WHERE tid IN({$ids})", __LINE__, __FILE__);
        $anz += $db->affected_rows();
        ($code = $plugins->load('manageforum_delete_end')) ? eval($code) : null;
        UpdateBoardStats($board);
        ok($lang->phrase('x_entries_deleted'), "showforum.php?id=" . $board . SID2URL_x);
    } elseif ($_GET['action'] == "stat") {
        UpdateBoardStats($info['id']);
        ok($lang->phrase('data_success'), 'showforum.php?id=' . $board . SID2URL_x);
    }
    ($code = $plugins->load('manageforum_end')) ? eval($code) : null;
} else {
    errorLogin($lang->phrase('not_allowed'));
}
$slog->updatelogged();
$zeitmessung = t2();
echo $tpl->parse("footer");
$phpdoc->Out();
$db->close();
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:manageforum.php

示例4: convertBB

                $email = $config['forenmail'];
            }
            if ($r[5] == 'N') {
                $dosmileys = 0;
            } else {
                $dosmileys = 1;
            }
            $comment = convertBB($r[7]);
            $comment = $db->escape_string($comment);
            $db->query("\r\nINSERT INTO `v_replies` (`board` , `topic` , `topic_id` , `name` , `comment` , `dosmileys` , `email` , `date` , `tstart` ) \r\nVALUES (\r\n{$board}, '{$prefix}{$t[2]}', '{$id}', '{$user}', '{$comment}', '{$dosmileys}', '{$email}', '{$r[3]}', '{$tstart}'\r\n)") or print $db->error();
            $p_i++;
        }
    }
    $bids = array_unique(array_keys($bd));
    foreach ($bd as $biid) {
        UpdateBoardStats($biid);
    }
    echo 'Antworten eingefügt: ' . $p_i . '!  Themen eingefügt: ' . $t_i . '!<br><a href="?action=votes">Weiter (Votes)</a>';
} elseif ($_GET['action'] == 'votes') {
    $ii = 0;
    $db->query('TRUNCATE TABLE `v_votes`');
    $db->query('TRUNCATE TABLE `v_vote`');
    $result = $db->query('SELECT id, name FROM v_user') or print $db->error();
    $memberdata = array();
    while ($row = $db->fetch_assoc()) {
        $memberdata[$row['id']] = $row['name'];
    }
    chdir('OLD/data/');
    foreach (glob("*.vote") as $f) {
        $id = basename($f);
        $id = str_replace('.vote', '', $id);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:convert.php

示例5: ForumSubs

	</tr>
	<?php 
    $forumtree = $scache->load('forumtree');
    $tree = $forumtree->get();
    $categories_obj = $scache->load('categories');
    $categories = $categories_obj->get();
    $catbid = $scache->load('cat_bid');
    $boards = $catbid->get();
    ForumSubs($tree, $categories, $boards);
    ?>
	</table>
	<?php 
    echo foot();
} elseif ($job == 'updatestats') {
    echo head();
    UpdateBoardStats($gpc->get('id', int));
    ok('admin.php?action=forums&job=manage', 'Statistics successfully recounted!');
} elseif ($job == 'move') {
    $id = $gpc->get('temp1', str);
    if (!is_id($id)) {
        error('admin.php?action=forums&job=manage', 'Forum or Category was not found on account of an invalid ID.');
    }
    list($type, $gid) = explode('_', $id);
    $gid = $gpc->save_int($gid);
    $move = $gpc->get('int1', int);
    if ($move == -1 && $type == 'c') {
        $db->query('UPDATE ' . $db->pre . 'categories SET c_order = c_order-1 WHERE id = ' . $gid);
    } elseif ($move == 1 && $type == 'c') {
        $db->query('UPDATE ' . $db->pre . 'categories SET c_order = c_order+1 WHERE id = ' . $gid);
    } elseif ($move == -1 && $type == 'f') {
        $db->query('UPDATE ' . $db->pre . 'cat SET c_order = c_order-1 WHERE id = ' . $gid);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:forums.php


注:本文中的UpdateBoardStats函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。