'p.poster_ip, MAX(p.posted) AS last_used, COUNT(p.id) AS used_times', 'FROM' => 'posts AS p', 'WHERE' => 'p.poster_id='.$ip_stats, 'GROUP BY' => 'p.poster_ip', 'ORDER BY' => 'last_used DESC' ); ($hook = get_hook('aus_ip_stats_qr_get_user_ips')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $forum_page['num_users'] = $forum_db->num_rows($result); // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) ); if ($forum_user['g_id'] == FORUM_ADMIN) $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = $lang_admin_users['User search results']; ($hook = get_hook('aus_ip_stats_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE_SECTION', 'users'); define('FORUM_PAGE', 'admin-iresults'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); // Set up table headers $forum_page['table_header'] = array(); $forum_page['table_header']['ip'] = ''.$lang_admin_users['IP address'].''; $forum_page['table_header']['lastused'] = ''.$lang_admin_users['Last used'].''; $forum_page['table_header']['timesfound'] = ''.$lang_admin_users['Times found'].''; $forum_page['table_header']['actions'] = ''.$lang_admin_users['Actions'].''; ($hook = get_hook('aus_ip_stats_output_start')) ? eval($hook) : null; ?>
'.implode(' ', $forum_page['main_head_options']).'

'; ?>

fetch_assoc($result)) { ++$forum_page['item_count']; $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? 'odd' : 'even'); if ($forum_page['item_count'] == 1) $forum_page['item_style'] .= ' row1'; ($hook = get_hook('aus_ip_stats_pre_row_generation')) ? eval($hook) : null; $forum_page['table_row'] = array(); $forum_page['table_row']['ip'] = ''; $forum_page['table_row']['lastused'] = ''; $forum_page['table_row']['timesfound'] = ''; $forum_page['table_row']['actions'] = ''; ($hook = get_hook('aus_ip_stats_pre_row_output')) ? eval($hook) : null; ?> '.$lang_admin_users['No posts by user'].''; $forum_page['table_row']['lastused'] = ''; $forum_page['table_row']['timesfound'] = ''; $forum_page['table_row']['actions'] = ''; ($hook = get_hook('aus_ip_stats_pre_no_results_row_output')) ? eval($hook) : null; ?>
'.$cur_ip['poster_ip'].''.format_time($cur_ip['last_used']).''.$cur_ip['used_times'].''.$lang_admin_users['Find more users'].'
- - -
'.implode(' ', $forum_page['main_foot_options']).'

'; ?>

', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - require FORUM_ROOT.'footer.php'; } // Show users that have at one time posted with the specified IP address else if (isset($_GET['show_users'])) { $ip = $_GET['show_users']; if (empty($ip) || (!preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $ip) && !preg_match('/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/', $ip))) message($lang_admin_users['Invalid IP address']); ($hook = get_hook('aus_show_users_selected')) ? eval($hook) : null; // Load the misc.php language file require FORUM_ROOT.'lang/'.$forum_user['language'].'/misc.php'; $query = array( 'SELECT' => 'DISTINCT p.poster_id, p.poster', 'FROM' => 'posts AS p', 'WHERE' => 'p.poster_ip=\''.$forum_db->escape($ip).'\'', 'ORDER BY' => 'p.poster DESC' ); ($hook = get_hook('aus_show_users_qr_get_users_matching_ip')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $forum_page['num_users'] = $forum_db->num_rows($result); // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) ); if ($forum_user['g_id'] == FORUM_ADMIN) $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = $lang_admin_users['User search results']; ($hook = get_hook('aus_show_users_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE_SECTION', 'users'); define('FORUM_PAGE', 'admin-uresults'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); // Set up table headers $forum_page['table_header'] = array(); $forum_page['table_header']['username'] = ''.$lang_admin_users['User information'].''; $forum_page['table_header']['title'] = ''.$lang_admin_users['Title column'].''; $forum_page['table_header']['posts'] = ''.$lang_admin_users['Posts'].''; $forum_page['table_header']['actions'] = ''.$lang_admin_users['Actions'].''; $forum_page['table_header']['select'] = ''.$lang_misc['Select'] .''; if ($forum_page['num_users'] > 0) $forum_page['main_head_options']['select'] = $forum_page['main_foot_options']['select'] = ''.$lang_admin_common['Select all'].''; ($hook = get_hook('aus_show_users_output_start')) ? eval($hook) : null; ?>
'.implode(' ', $forum_page['main_head_options']).'

'; ?>

0) { $forum_page['item_count'] = 0; // Loop through users and print out some info for ($i = 0; $i < $forum_page['num_users']; ++$i) { list($poster_id, $poster) = $forum_db->fetch_row($result); $query = array( 'SELECT' => 'u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title', 'FROM' => 'users AS u', 'JOINS' => array( array( 'INNER JOIN' => 'groups AS g', 'ON' => 'g.g_id=u.group_id' ) ), 'WHERE' => 'u.id>1 AND u.id='.$poster_id ); ($hook = get_hook('aus_show_users_qr_get_user_details')) ? eval($hook) : null; $result2 = $forum_db->query_build($query) or error(__FILE__, __LINE__); ++$forum_page['item_count']; $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? 'odd' : 'even'); if ($forum_page['item_count'] == 1) $forum_page['item_style'] .= ' row1'; ($hook = get_hook('aus_show_users_pre_row_generation')) ? eval($hook) : null; if ($user_data = $forum_db->fetch_assoc($result2)) { $forum_page['table_row'] = array(); $forum_page['table_row']['username'] = ''; $forum_page['table_row']['title'] = ''; $forum_page['table_row']['posts'] = ''; $forum_page['table_row']['actions'] = ''; $forum_page['table_row']['select'] = ''; } else { $forum_page['table_row'] = array(); $forum_page['table_row']['username'] = ''; $forum_page['table_row']['title'] = ''; $forum_page['table_row']['posts'] = ''; $forum_page['table_row']['actions'] = ''; $forum_page['table_row']['select'] = ''; } ($hook = get_hook('aus_show_users_pre_row_output')) ? eval($hook) : null; ?> '.$lang_admin_users['Cannot find IP'].''; $forum_page['table_row']['title'] = ''; $forum_page['table_row']['posts'] = ''; $forum_page['table_row']['actions'] = ''; $forum_page['table_row']['select'] = ''; ($hook = get_hook('aus_show_users_pre_no_results_row_output')) ? eval($hook) : null; ?>
'.$lang_admin_users['Username'].' '.forum_htmlencode($user_data['username']).' '.$lang_admin_users['E-mail'].' '.forum_htmlencode($user_data['email']).''.(($user_data['admin_note'] != '') ? ''.$lang_admin_users['Admin note'].' '.forum_htmlencode($user_data['admin_note']).'' : '').''.get_title($user_data).''.forum_number_format($user_data['num_posts']).''.$lang_admin_users['View IP stats'].' '.$lang_admin_users['Show posts'].''.forum_htmlencode($poster).''.$lang_admin_users['Guest'].' - - -
- - - -
0) { if ($forum_user['g_id'] == FORUM_ADMIN || ($forum_user['g_moderator'] == '1' && $forum_user['g_mod_ban_users'] == '1')) $forum_page['mod_options']['ban'] = ''; if ($forum_user['g_id'] == FORUM_ADMIN) { $forum_page['mod_options']['delete'] = ''; $forum_page['mod_options']['change_group'] = ''; } } ($hook = get_hook('aus_show_users_pre_moderation_buttons')) ? eval($hook) : null; if (!empty($forum_page['mod_options'])) { ?>

'.implode(' ', $forum_page['main_foot_options']).'

'; ?>

', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - require FORUM_ROOT.'footer.php'; } else if (isset($_POST['delete_users']) || isset($_POST['delete_users_comply']) || isset($_POST['delete_users_cancel'])) { // User pressed the cancel button if (isset($_POST['delete_users_cancel'])) redirect(forum_link($forum_url['admin_users']), $lang_admin_common['Cancel redirect']); if ($forum_user['g_id'] != FORUM_ADMIN) message($lang_common['No permission']); if (empty($_POST['users'])) message($lang_admin_users['No users selected']); ($hook = get_hook('aus_delete_users_selected')) ? eval($hook) : null; if (!is_array($_POST['users'])) $users = explode(',', $_POST['users']); else $users = array_keys($_POST['users']); $users = array_map('intval', $users); // We check to make sure there are no administrators in this list $query = array( 'SELECT' => '1', 'FROM' => 'users AS u', 'WHERE' => 'u.id IN ('.implode(',', $users).') AND u.group_id='.FORUM_ADMIN ); ($hook = get_hook('aus_delete_users_qr_check_for_admins')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); if ($forum_db->num_rows($result) > 0) message($lang_admin_users['Delete admin message']); if (isset($_POST['delete_users_comply'])) { ($hook = get_hook('aus_delete_users_form_submitted')) ? eval($hook) : null; foreach ($users as $id) { // We don't want to delete the Guest user if ($id > 1) delete_user($id, isset($_POST['delete_posts'])); } ($hook = get_hook('aus_delete_users_pre_redirect')) ? eval($hook) : null; redirect(forum_link($forum_url['admin_users']), $lang_admin_users['Users deleted'].' '.$lang_admin_common['Redirect']); } // Setup form $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])), $lang_admin_users['Delete users'] ); ($hook = get_hook('aus_delete_users_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE_SECTION', 'users'); define('FORUM_PAGE', 'admin-users'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); ($hook = get_hook('aus_delete_users_output_start')) ? eval($hook) : null; ?>

', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - require FORUM_ROOT.'footer.php'; } else if (isset($_POST['ban_users']) || isset($_POST['ban_users_comply'])) { if ($forum_user['g_id'] != FORUM_ADMIN && ($forum_user['g_moderator'] != '1' || $forum_user['g_mod_ban_users'] == '0')) message($lang_common['No permission']); if (empty($_POST['users'])) message($lang_admin_users['No users selected']); ($hook = get_hook('aus_ban_users_selected')) ? eval($hook) : null; if (!is_array($_POST['users'])) $users = explode(',', $_POST['users']); else $users = array_keys($_POST['users']); $users = array_map('intval', $users); // We check to make sure there are no administrators in this list $query = array( 'SELECT' => '1', 'FROM' => 'users AS u', 'WHERE' => 'u.id IN ('.implode(',', $users).') AND u.group_id='.FORUM_ADMIN ); ($hook = get_hook('aus_ban_users_qr_check_for_admins')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); if ($forum_db->num_rows($result) > 0) message($lang_admin_users['Ban admin message']); if (isset($_POST['ban_users_comply'])) { $ban_message = forum_trim($_POST['ban_message']); $ban_expire = forum_trim($_POST['ban_expire']); ($hook = get_hook('aus_ban_users_form_submitted')) ? eval($hook) : null; if ($ban_expire != '' && $ban_expire != 'Never') { $ban_expire = strtotime($ban_expire); if ($ban_expire == -1 || $ban_expire <= time()) message($lang_admin_bans['Invalid expire message']); } else $ban_expire = 'NULL'; $ban_message = ($ban_message != '') ? '\''.$forum_db->escape($ban_message).'\'' : 'NULL'; // Get the latest IPs for the posters and store them for a little later $query = array( 'SELECT' => 'p.poster_id, p.poster_ip', 'FROM' => 'posts AS p', 'WHERE' => 'p.poster_id IN ('.implode(',', $users).') AND p.poster_id>1', 'ORDER BY' => 'p.posted ASC' ); ($hook = get_hook('aus_ban_users_qr_get_latest_user_ips')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $ips = array(); while ($cur_post = $forum_db->fetch_assoc($result)) $ips[$cur_post['poster_id']] = $cur_post['poster_ip']; // Get the rest of the data for the posters, merge in the IP information, create a ban $query = array( 'SELECT' => 'u.id, u.username, u.email, u.registration_ip', 'FROM' => 'users AS u', 'WHERE' => 'id IN ('.implode(',', $users).') AND id>1' ); ($hook = get_hook('aus_ban_users_qr_get_users')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); while ($cur_user = $forum_db->fetch_assoc($result)) { $ban_ip = isset($ips[$cur_user['id']]) ? $ips[$cur_user['id']] : $cur_user['registration_ip']; $query = array( 'INSERT' => 'username, ip, email, message, expire, ban_creator', 'INTO' => 'bans', 'VALUES' => '\''.$forum_db->escape($cur_user['username']).'\', \''.$ban_ip.'\', \''.$forum_db->escape($cur_user['email']).'\', '.$ban_message.', '.$ban_expire.', '.$forum_user['id'] ); ($hook = get_hook('aus_ban_users_qr_add_ban')) ? eval($hook) : null; $forum_db->query_build($query) or error(__FILE__, __LINE__); } // Regenerate the bans cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require FORUM_ROOT.'include/cache.php'; generate_bans_cache(); ($hook = get_hook('aus_ban_users_pre_redirect')) ? eval($hook) : null; redirect(forum_link($forum_url['admin_users']), $lang_admin_users['Users banned'].' '.$lang_admin_common['Redirect']); } // Setup form $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) ); if ($forum_user['g_id'] == FORUM_ADMIN) $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = $lang_admin_users['Ban users']; ($hook = get_hook('aus_ban_users_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE_SECTION', 'users'); define('FORUM_PAGE', 'admin-users'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); ($hook = get_hook('aus_ban_users_output_start')) ? eval($hook) : null; ?>



', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - require FORUM_ROOT.'footer.php'; } else if (isset($_POST['change_group']) || isset($_POST['change_group_comply']) || isset($_POST['change_group_cancel'])) { if ($forum_user['g_id'] != FORUM_ADMIN) message($lang_common['No permission']); // User pressed the cancel button if (isset($_POST['change_group_cancel'])) redirect(forum_link($forum_url['admin_users']), $lang_admin_common['Cancel redirect']); if (empty($_POST['users'])) message($lang_admin_users['No users selected']); ($hook = get_hook('aus_change_group_selected')) ? eval($hook) : null; if (!is_array($_POST['users'])) $users = explode(',', $_POST['users']); else $users = array_keys($_POST['users']); $users = array_map('intval', $users); if (isset($_POST['change_group_comply'])) { $move_to_group = intval($_POST['move_to_group']); ($hook = get_hook('aus_change_group_form_submitted')) ? eval($hook) : null; // We need some information on the group $query = array( 'SELECT' => 'g.g_moderator', 'FROM' => 'groups AS g', 'WHERE' => 'g.g_id='.$move_to_group ); ($hook = get_hook('aus_change_group_qr_get_group_moderator_status')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); if ($move_to_group == FORUM_GUEST || !$forum_db->num_rows($result)) message($lang_common['Bad request']); $group_is_mod = $forum_db->result($result); // Move users $query = array( 'UPDATE' => 'users', 'SET' => 'group_id='.$move_to_group, 'WHERE' => 'id IN ('.implode(',', $users).') AND id>1' ); ($hook = get_hook('aus_change_group_qr_change_user_group')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); if ($move_to_group != FORUM_ADMIN && $group_is_mod == '0') clean_forum_moderators(); ($hook = get_hook('aus_change_group_pre_redirect')) ? eval($hook) : null; redirect(forum_link($forum_url['admin_users']), $lang_admin_users['User groups updated'].' '.$lang_admin_common['Redirect']); } // Setup form $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])), $lang_admin_users['Change group'] ); ($hook = get_hook('aus_change_group_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE_SECTION', 'users'); define('FORUM_PAGE', 'admin-users'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); ($hook = get_hook('aus_change_group_output_start')) ? eval($hook) : null; ?>


', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - require FORUM_ROOT.'footer.php'; } else if (isset($_POST['find_user'])) { $form = $_POST['form']; $form['username'] = $_POST['username']; //Check up for order_by and direction values $order_by = isset($_POST['order_by']) ? forum_trim($_POST['order_by']) : null; $direction = isset($_POST['direction']) ? forum_trim($_POST['direction']) : null; if ($order_by == null || $direction == null) message($lang_common['Bad request']); if (!in_array($order_by, array('username', 'email', 'num_posts', 'num_posts', 'registered')) || !in_array($direction, array('ASC', 'DESC'))) message($lang_common['Bad request']); ($hook = get_hook('aus_find_user_selected')) ? eval($hook) : null; // forum_trim() all elements in $form $form = array_map('trim', $form); $conditions = array(); $posts_greater = forum_trim($_POST['posts_greater']); $posts_less = forum_trim($_POST['posts_less']); $last_post_after = forum_trim($_POST['last_post_after']); $last_post_before = forum_trim($_POST['last_post_before']); $registered_after = forum_trim($_POST['registered_after']); $registered_before = forum_trim($_POST['registered_before']); $user_group = $_POST['user_group']; if ((!empty($posts_greater) || !empty($posts_less)) && !ctype_digit($posts_greater.$posts_less)) message($lang_admin_users['Non numeric value message']); // Try to convert date/time to timestamps if ($last_post_after != '') $last_post_after = strtotime($last_post_after); if ($last_post_before != '') $last_post_before = strtotime($last_post_before); if ($registered_after != '') $registered_after = strtotime($registered_after); if ($registered_before != '') $registered_before = strtotime($registered_before); if ($last_post_after == -1 || $last_post_before == -1 || $registered_after == -1 || $registered_before == -1) message($lang_admin_users['Invalid date/time message']); if ($last_post_after != '') $conditions[] = 'u.last_post>'.$last_post_after; if ($last_post_before != '') $conditions[] = 'u.last_post<'.$last_post_before; if ($registered_after != '') $conditions[] = 'u.registered>'.$registered_after; if ($registered_before != '') $conditions[] = 'u.registered<'.$registered_before; $like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE'; foreach ($form as $key => $input) { if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'jabber', 'icq', 'msn', 'aim', 'yahoo', 'location', 'signature', 'admin_note'))) $conditions[] = 'u.'.$forum_db->escape($key).' '.$like_command.' \''.$forum_db->escape(str_replace('*', '%', $input)).'\''; } if ($posts_greater != '') $conditions[] = 'u.num_posts>'.$posts_greater; if ($posts_less != '') $conditions[] = 'u.num_posts<'.$posts_less; if ($user_group != 'all') $conditions[] = 'u.group_id='.intval($user_group); if (empty($conditions)) message($lang_admin_users['No search terms message']); // Load the misc.php language file require FORUM_ROOT.'lang/'.$forum_user['language'].'/misc.php'; // Find any users matching the conditions $query = array( 'SELECT' => 'u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title', 'FROM' => 'users AS u', 'JOINS' => array( array( 'LEFT JOIN' => 'groups AS g', 'ON' => 'g.g_id=u.group_id' ) ), 'WHERE' => 'u.id>1 AND '.implode(' AND ', $conditions), 'ORDER BY' => $order_by.' '.$direction ); ($hook = get_hook('aus_find_user_qr_find_users')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $forum_page['num_users'] = $forum_db->num_rows($result); // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) ); if ($forum_user['g_id'] == FORUM_ADMIN) $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = $lang_admin_users['User search results']; ($hook = get_hook('aus_find_user_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE_SECTION', 'users'); define('FORUM_PAGE', 'admin-uresults'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); // Set up table headers $forum_page['table_header'] = array(); $forum_page['table_header']['username'] = ''.$lang_admin_users['User information'].''; $forum_page['table_header']['title'] = ''.$lang_admin_users['Title column'].''; $forum_page['table_header']['posts'] = ''.$lang_admin_users['Posts'].''; $forum_page['table_header']['actions'] = ''.$lang_admin_users['Actions'].''; $forum_page['table_header']['select'] = ''.$lang_misc['Select'] .''; if ($forum_page['num_users'] > 0) $forum_page['main_head_options']['select'] = $forum_page['main_foot_options']['select'] = ''.$lang_admin_common['Select all'].''; ($hook = get_hook('aus_find_user_output_start')) ? eval($hook) : null; ?>
'.implode(' ', $forum_page['main_head_options']).'

'; ?>

0) { $forum_page['item_count'] = 0; while ($user_data = $forum_db->fetch_assoc($result)) { ++$forum_page['item_count']; // This script is a special case in that we want to display "Not verified" for non-verified users if (($user_data['g_id'] == '' || $user_data['g_id'] == FORUM_UNVERIFIED) && $user_data['title'] != $lang_common['Banned']) $user_title = ''.$lang_admin_users['Not verified'].''; else $user_title = get_title($user_data); $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? 'odd' : 'even'); if ($forum_page['item_count'] == 1) $forum_page['item_style'] .= ' row1'; ($hook = get_hook('aus_find_user_pre_row_generation')) ? eval($hook) : null; $forum_page['table_row'] = array(); $forum_page['table_row']['username'] = ''; $forum_page['table_row']['title'] = ''; $forum_page['table_row']['posts'] = ''; $forum_page['table_row']['actions'] = ''; $forum_page['table_row']['select'] = ''; ($hook = get_hook('aus_find_user_pre_row_output')) ? eval($hook) : null; ?> '.$lang_admin_users['No match'].''; $forum_page['table_row']['title'] = ''; $forum_page['table_row']['posts'] = ''; $forum_page['table_row']['actions'] = ''; $forum_page['table_row']['select'] = ''; ($hook = get_hook('aus_find_user_pre_no_results_row_output')) ? eval($hook) : null; ?>
'.$lang_admin_users['Username'].' '.forum_htmlencode($user_data['username']).' '.$lang_admin_users['E-mail'].' '.forum_htmlencode($user_data['email']).''.(($user_data['admin_note'] != '') ? ''.$lang_admin_users['Admin note'].' '.forum_htmlencode($user_data['admin_note']).'' : '').''.$user_title.''.forum_number_format($user_data['num_posts']).''.$lang_admin_users['View IP stats'].' '.$lang_admin_users['Show posts'].'
- - - -
0) { if ($forum_user['g_id'] == FORUM_ADMIN || ($forum_user['g_moderator'] == '1' && $forum_user['g_mod_ban_users'] == '1')) $forum_page['mod_options']['ban'] = ''; if ($forum_user['g_id'] == FORUM_ADMIN) { $forum_page['mod_options']['delete'] = ''; $forum_page['mod_options']['change_group'] = ''; } } ($hook = get_hook('aus_find_user_pre_moderation_buttons')) ? eval($hook) : null; if (!empty($forum_page['mod_options'])) { ?>

'.implode(' ', $forum_page['main_foot_options']).'

'; ?>

', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - require FORUM_ROOT.'footer.php'; } ($hook = get_hook('aus_new_action')) ? eval($hook) : null; // Setup form $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) ); if ($forum_user['g_id'] == FORUM_ADMIN) $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); ($hook = get_hook('aus_search_form_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE_SECTION', 'users'); define('FORUM_PAGE', 'admin-users'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); ($hook = get_hook('aus_search_form_output_start')) ? eval($hook) : null; ?>
























', $tpl_temp, $tpl_main); ob_end_clean(); // END SUBST - require FORUM_ROOT.'footer.php';