Можно добавить лог попыток входа в Админку (последних 10 штук)
Добавить сводку последних 10 подключений в индекс ACPОткрыть
/adm/style/acp_main.html
Поиск:
- Код: выделить все
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
Добавить перед:
- Код: выделить все
<h2>{L_ACP_CONNECTIONS_LOGS}</h2>
<p>{L_CONNECTIONS_LOGS_EXPLAIN}</p>
<div style="text-align: right;"><a href="{U_LOG_CONNECTIONS}">» {L_VIEW_LOG_CONNECTIONS}</a></div>
<table cellspacing="1">
<thead>
<tr>
<th>{L_USERNAME}</th>
<th>{L_IP}</th>
<th>{L_TIME}</th>
<th>{L_ACTION}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN connections -->
<!-- IF connections.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td>
{connections.USERNAME}
</td>
<td style="text-align: center;">{connections.IP}</td>
<td style="text-align: center;">{connections.DATE}</td>
<td>{connections.ACTION}<!-- IF connections.DATA --><br /><span>{connections.DATA}</span><!-- ENDIF --></td>
</tr>
<!-- BEGINELSE -->
<tr>
<td colspan="5" style="text-align: center;">{L_NO_ENTRIES}</td>
</tr>
<!-- END connections -->
</tbody>
</table>
Открыть
/includes/acp/acp_main.php
Поиск:
- Код: выделить все
'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&mode=list'),
Добавить после:
- Код: выделить все
'U_LOG_CONNECTIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=lc&mode=connections'),
Поиск:
- Код: выделить все
if ($config['email_enable'])
{
$option_ary += array('remind' => 'REMIND');
}
$template->assign_vars(array(
'S_INACTIVE_USERS' => true,
'S_INACTIVE_OPTIONS' => build_select($option_ary))
);
Добавить после:
- Код: выделить все
$connections = array();
$connections_count = 0;
view_log('connections', $connections, $connections_count, 10, 0);
foreach ($connections as $row)
{
$data = array();
$log_number = ($row['number'] != 1) ? sprintf($user->lang['LOG_LC_INTERVAL'], $row['number'], $config['lc_interval']) : '';
$log_action = (!preg_match("#" . $user->lang['ACP_LOGS_FAIL'] . "#", $row['action']) ? '<div class="log-success">' . $row['action'] . '</div>' : '<div class="log-fail">' . $row['action'] . ' ' . $log_number . '</div>');
$template->assign_block_vars('connections', array(
'USERNAME' => $row['username_full'],
'IP' => $row['ip'],
'DATE' => $user->format_date($row['time']),
'ACTION' => $log_action,
'DATA' => (sizeof($data)) ? implode(' | ', $data) : '',
'ID' => $row['id'],
));
}
Открыть
/language/en/mods/info_acp_lc.php
Поиск:
- Код: выделить все
'LC_EXCLUDE_IP_UPDATE_SUCCESSFUL' => 'The exclude-list has been updated successfully.',
Добавить после:
- Код: выделить все
'CONNECTIONS_LOGS_EXPLAIN' => 'This is a list of the last 10 log connections.',
'VIEW_LOG_CONNECTIONS' => 'View connections log',
Аналогично и для русского...