statistics_user_tracker

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/statistics/statistics.module, строка 228

Версии
5 – 6
statistics_user_tracker()

Код

<?php
function statistics_user_tracker() {
  if ($account = user_load(array('uid' => arg(1)))) {

    $header = array(
        array('data' => t('Timestamp'), 'field' => 'timestamp', 'sort' => 'desc'),
        array('data' => t('Page'), 'field' => 'path'),
        array('data' => t('Operations')));

    $result = pager_query('SELECT aid, timestamp, path, title FROM {accesslog} WHERE uid = %d' . tablesort_sql($header), 30, 0, NULL, $account->uid);
    while ($log = db_fetch_object($result)) {
      $rows[] = array(
        array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
        _statistics_format_item($log->title, $log->path),
        l(t('details'), "admin/logs/access/$log->aid"));
    }

    drupal_set_title(check_plain($account->name));
    $output = theme('table', $header, $rows);
    $output .= theme('pager', NULL, 30, 0);
    return $output;
  }
  else {
    drupal_not_found();
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему