Show all the members | > Module written by Matt Mecham | > Date started: 20th February 2002 | | > Module Version Number: 1.0.0 +-------------------------------------------------------------------------- */ $idx = new Memberlist; class Memberlist { var $output = ""; var $page_title = ""; var $nav = array(); var $html = ""; var $base_url = ""; var $first = 0; var $max_results = 10; var $sort_key = 'name'; var $sort_order = 'asc'; var $filter = 'ALL'; var $mem_titles = array(); var $mem_groups = array(); function Memberlist() { global $ibforums, $DB, $std, $print; if ($ibforums->input['CODE'] == "") $ibforums->input['CODE'] = 'listall'; //-------------------------------------------- // Require the HTML and language modules //-------------------------------------------- $ibforums->lang = $std->load_words($ibforums->lang, 'lang_mlist', $ibforums->lang_id ); require "./Skin/".$ibforums->skin_id."/skin_mlist.php"; $this->html = new skin_mlist(); $this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}"; if ($ibforums->member['g_mem_info'] != 1) { $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); } //-------------------------------------------- // Get the member groups, member titles stuff //-------------------------------------------- $DB->query("SELECT g_title, g_id, g_icon from ibf_groups ORDER BY g_title"); while ($row = $DB->fetch_row() ) { $this->mem_groups[ $row['g_id'] ] = array( 'TITLE' => $row['g_title'], 'ICON' => $row['g_icon'], ); } unset($row); $DB->free_result(); $DB->query("SELECT title, id, posts, pips from ibf_titles ORDER BY posts DESC"); while ($row = $DB->fetch_row() ) { $this->mem_titles[ $row['id'] ] = array( 'TITLE' => $row['title'], 'POSTS' => $row['posts'], 'PIPS' => $row['pips'], ); } unset($row); $DB->free_result(); $the_filter = array( 'ALL' => $ibforums->lang['show_all'] ); foreach($this->mem_groups as $id => $data) { if ($id == $ibforums->vars['guest_group']) continue; if ($id == $ibforums->vars['auth_group']) continue; if ($id == $ibforums->vars['ban_group']) continue; $the_filter[$id] = $data['TITLE']; } if (isset($ibforums->input['st'])) $this->first = $ibforums->input['st']; if (isset($ibforums->input['max_results'])) $this->max_results = $ibforums->input['max_results']; if (isset($ibforums->input['sort_key'])) $this->sort_key = $ibforums->input['sort_key']; if (isset($ibforums->input['sort_order'])) $this->sort_order = $ibforums->input['sort_order']; if (isset($ibforums->input['filter'])) $this->filter = $ibforums->input['filter']; $the_sort_key = array( 'name' => 'sort_by_name', 'posts' => 'sort_by_posts', 'joined' => 'sort_by_joined', ); $the_max_results = array( 10 => '10', 20 => '20', 30 => '30', 40 => '40', 50 => '50', ); $the_sort_order = array( 'desc' => 'descending_order', 'asc' => 'ascending_order', ); $filter_html = "\n"; $max_results_html = "\n"; foreach ($the_sort_order as $k => $v) { $sort_order_html .= $k == $this->sort_order ? "