Show online users | > Module written by Matt Mecham | > Date started: 12th March 2002 | | > Module Version Number: 1.0.0 +-------------------------------------------------------------------------- */ $idx = new Online; class Online { var $output = ""; var $page_title = ""; var $nav = array(); var $html = ""; var $first = 0; var $perpage = 25; var $forums = array(); var $cats = array(); var $sessions = array(); var $where = array(); var $seen_name = array(); function Online() { global $ibforums, $DB, $std, $print; // Are we allowed to see the online list? $ibforums->input['st'] = intval($ibforums->input['st']); if ( $ibforums->vars['allow_online_list'] != 1 ) { $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') ); } if ($ibforums->input['CODE'] == "") $ibforums->input['CODE'] = 'listall'; //-------------------------------------------- // Require the HTML and language modules //-------------------------------------------- $ibforums->lang = $std->load_words($ibforums->lang, 'lang_online', $ibforums->lang_id); $this->html = $std->load_template('skin_online'); $this->base_url = $ibforums->base_url; //-------------------------------------------- // Build up our language hash //-------------------------------------------- foreach ($ibforums->lang as $k => $v) { if ( preg_match( "/^WHERE_(\w+)$/", $k, $match ) ) { $this->where[ $match[1] ] = $ibforums->lang[$k]; } } unset($match); //-------------------------------------------- // What to do? //-------------------------------------------- switch($ibforums->input['CODE']) { case 'listall': $this->list_all(); break; case '02': $this->list_forum(); break; default: $this->list_all(); break; } // If we have any HTML to print, do so... $print->add_output("$this->output"); $print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) ); } /*****************************************************/ // list_all // ------------------ // List all online users /*****************************************************/ function list_all() { global $ibforums, $DB, $std; $this->first = 0; if (!empty($ibforums->input['st'])) { $this->first = $ibforums->input['st']; } $show_mem = array( 'reg', 'guest', 'all' ); $sort_order = array( 'desc', 'asc' ); $sort_key = array( 'click', 'name' ); $show_mem_value = $ibforums->input['show_mem'] ? $ibforums->input['show_mem'] : 'all'; $sort_order_value = $ibforums->input['sort_order'] ? $ibforums->input['sort_order'] : 'desc'; $sort_key_value = $ibforums->input['sort_key'] ? $ibforums->input['sort_key'] : 'click'; $show_mem_html = ""; $sort_order_html = ""; $sort_key_html = ""; $oo = "