mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-21 04:59:49 +01:00
Merge ../http
This commit is contained in:
commit
228eeb07b4
@ -21,8 +21,10 @@ foreach ($boards as $i => $board) {
|
||||
$query = prepare(sprintf("
|
||||
SELECT MAX(id) max, (SELECT COUNT(*) FROM ``posts_%s`` WHERE FROM_UNIXTIME(time) > DATE_SUB(NOW(), INTERVAL 1 DAY)) ppd,
|
||||
(SELECT COUNT(*) FROM ``posts_%s`` WHERE FROM_UNIXTIME(time) > DATE_SUB(NOW(), INTERVAL 1 HOUR)) pph,
|
||||
(SELECT count(id) FROM ``posts_%s``) count FROM ``posts_%s``
|
||||
", $board['uri'], $board['uri'], $board['uri'], $board['uri']));
|
||||
(SELECT count(id) FROM ``posts_%s``) count,
|
||||
(SELECT COUNT(DISTINCT ip) FROM ``posts_%s``) uniq_ip
|
||||
FROM ``posts_%s``
|
||||
", $board['uri'], $board['uri'], $board['uri'], $board['uri'], $board['uri']));
|
||||
$query->execute() or error(db_error($query));
|
||||
$r = $query->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
@ -35,6 +37,7 @@ SELECT MAX(id) max, (SELECT COUNT(*) FROM ``posts_%s`` WHERE FROM_UNIXTIME(time)
|
||||
$boards[$i]['pph'] = $pph;
|
||||
$boards[$i]['ppd'] = $ppd;
|
||||
$boards[$i]['max'] = $r['max'];
|
||||
$boards[$i]['uniq_ip'] = $r['uniq_ip'];
|
||||
}
|
||||
|
||||
usort($boards,
|
||||
|
@ -12,7 +12,7 @@ include "inc/lib/recaptcha/recaptchalib.php";
|
||||
|
||||
|
||||
checkBan('*');
|
||||
$bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/', '/^pedo$/');
|
||||
$bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/', '/^pedo$/', '/^reports$/');
|
||||
|
||||
$ayah = (($config['ayah_enabled']) ? new AYAH() : false);
|
||||
|
||||
|
@ -23,7 +23,16 @@ th.headerSortDown {
|
||||
|
||||
<p style='text-align:center'>{% trans %}There are currently <strong>{{n_boards}}</strong> boards + <strong>{{hidden_boards_total}}</strong> unindexed boards = <strong>{{t_boards}}</strong> total boards. Site-wide, {{total_posts_hour}} posts have been made in the last hour, with {{total_posts}} being made on all active boards since October 23, 2013.{% endtrans %}</p>
|
||||
|
||||
<table class="modlog" style="width:auto"><thead><tr><th>L</th><th>{% trans %}Board{% endtrans %}</th><th>{% trans %}Board title{% endtrans %}</th><th>{% trans %}Posts in last hour{% endtrans %}</th><th>{% trans %}Total posts{% endtrans %}</th><th>{% trans %}Created{% endtrans %}</th></tr></thead><tbody>
|
||||
<table class="modlog" style="width:auto"><thead>
|
||||
<tr>
|
||||
<th>L</th>
|
||||
<th>{% trans %}Board{% endtrans %}</th>
|
||||
<th>{% trans %}Board title{% endtrans %}</th>
|
||||
<th>{% trans %}Posts in last hour{% endtrans %}</th>
|
||||
<th>{% trans %}Total posts{% endtrans %}</th>
|
||||
<th>{% trans %}Unique IPs{% endtrans %}</th>
|
||||
<th>{% trans %}Created{% endtrans %}</th>
|
||||
</tr></thead><tbody>
|
||||
{% for board in boards %}
|
||||
<tr>
|
||||
<td>{{ board.img|raw }}</td>
|
||||
@ -31,6 +40,7 @@ th.headerSortDown {
|
||||
<td>{{ board['title'] }}</td>
|
||||
<td style='text-align:right'>{{board['pph']}}</td>
|
||||
<td style='text-align:right'>{{board['max']}}</td>
|
||||
<td style='text-align:right'>{{board['uniq_ip']}}</td>
|
||||
<td>{{board['time']}} ({{board['ago']}} ago)</td></tr>
|
||||
{% endfor %}
|
||||
</tbody></table>
|
||||
|
@ -26,6 +26,7 @@ $start = microtime(true);
|
||||
// parse command line
|
||||
$opts = getopt('qfb:', Array('board:', 'quick', 'full', 'quiet'));
|
||||
$options = Array();
|
||||
$global_locale = $config['locale'];
|
||||
|
||||
$options['board'] = isset($opts['board']) ? $opts['board'] : (isset($opts['b']) ? $opts['b'] : false);
|
||||
$options['quiet'] = isset($opts['q']) || isset($opts['quiet']);
|
||||
@ -59,6 +60,8 @@ foreach($boards as &$board) {
|
||||
|
||||
if(!$options['quiet'])
|
||||
echo "Opening board /{$board['uri']}/...\n";
|
||||
// Reset locale to global locale
|
||||
$config['locale'] = $global_locale;
|
||||
openBoard($board['uri']);
|
||||
$config['try_smarter'] = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user