Line 63 | Line 63 |
---|
$this->tpl_name = 'mcp_logs'; $this->page_title = 'MCP_LOGS';
|
$this->tpl_name = 'mcp_logs'; $this->page_title = 'MCP_LOGS';
|
$forum_list = get_forum_list('m_');
| $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
|
$forum_list[] = 0;
$forum_id = $topic_id = 0;
| $forum_list[] = 0;
$forum_id = $topic_id = 0;
|
Line 163 | Line 163 |
---|
// Define where and sort sql for use in displaying logs $sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0; $sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
// Define where and sort sql for use in displaying logs $sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0; $sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
| $keywords = utf8_normalize_nfc(request_var('keywords', '', true)); $keywords_param = !empty($keywords) ? '&keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
|
// Grab log data $log_data = array(); $log_count = 0;
|
// Grab log data $log_data = array(); $log_count = 0;
|
view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort);
| $start = view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
|
$template->assign_vars(array( 'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start), 'TOTAL' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count),
|
$template->assign_vars(array( 'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start), 'TOTAL' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count),
|
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $log_count, $config['topics_per_page'], $start),
| 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start),
|
'L_TITLE' => $user->lang['MCP_LOGS'],
|
'L_TITLE' => $user->lang['MCP_LOGS'],
|
'U_POST_ACTION' => $this->u_action,
| 'U_POST_ACTION' => $this->u_action . "&$u_sort_param$keywords_param&start=$start",
|
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_LOGS' => ($log_count > 0),
|
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_LOGS' => ($log_count > 0),
|
| 'S_KEYWORDS' => $keywords,
|
) );
| ) );
|