File: stats.php

package info (click to toggle)
chora2 2.0.1-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,208 kB
  • ctags: 302
  • sloc: php: 1,298; xml: 406; makefile: 66
file content (32 lines) | stat: -rw-r--r-- 969 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
 * $Horde: chora/stats.php,v 1.26.8.1 2005/01/03 12:25:30 jan Exp $
 *
 * Copyright 2000-2005 Anil Madhavapeddy <anil@recoil.org>
 *
 * See the enclosed file COPYING for license information (GPL).  If you
 * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
 */

@define('CHORA_BASE', dirname(__FILE__));
require_once CHORA_BASE . '/lib/base.php';

/* Spawn the file object. */
$fl = &$VC->getFileObject($where, $cache);
Chora::checkError($fl);

$extraLink = Chora::getFileViews();

$author_stats = array();
foreach ($fl->logs as $lg) {
    @$author_stats[$lg->queryAuthor()]++;
}
arsort($author_stats);

// Show the page.
$title = sprintf(_("Statistics for %s"), Text::htmlallspaces($where));
require CHORA_TEMPLATES . '/common-header.inc';
require CHORA_TEMPLATES . '/menu.inc';
require CHORA_TEMPLATES . '/headerbar.inc';
require CHORA_TEMPLATES . '/stats/stats.inc';
require $registry->get('templates', 'horde') . '/common-footer.inc';