title = get_string('modlos_menu', 'block_modlos'); //$this->version = 2010063010; //$this->version = 2010070422; //$this->version = 2010083024; //$this->version = 2010090100; //$this->version = 2010092200; //$this->version = 2010092303; //$this->version = 2010120215; //$this->version = 2010120917; //$this->version = 2011020717; //$this->version = 2011030114; $this->version = 2012042118; $this->release = '1.5.5'; $this->grid_name = $CFG->modlos_grid_name; $this->grid_status = false; $this->now_online = '0'; $this->lastmonth_online = '0'; $this->user_count = '0'; $this->region_count = '0'; $this->cron = '1'; } function get_content() { global $CFG, $USER; if ($this->content!=NULL) { return $this->content; } $id = optional_param('id', 0, PARAM_INT); $db_ver = opensim_get_db_version(); $this->content = new stdClass; $this->content->text = ''. get_string('modlos_show_home','block_modlos').'
'; $this->content->text.= ''. get_string('modlos_world_map','block_modlos').'
'; $this->content->text.= ''.get_string('modlos_regions_list','block_modlos').'
'; if (!isguest()) { $this->content->text.= ''.get_string('modlos_avatars_list','block_modlos').'
'; $isAvatarMax = false; if ($db_ver!=null) { $avatars_num = modlos_get_avatars_num($USER->id); $max_avatars = $CFG->modlos_max_own_avatars; if (!hasModlosPermit($id) and $max_avatars>=0 and $avatars_num>=$max_avatars) $isAvatarMax = true; } if (!$isAvatarMax) { $this->content->text.= ''.get_string('modlos_avatar_create','block_modlos').'
'; } if ($CFG->modlos_use_events) { $this->content->text.= ''.get_string('modlos_events_list','block_modlos').'
'; } if (hasModlosPermit($id)) { $this->content->text.= ''.get_string('modlos_manage_menu','block_modlos').'
'; } } $this->content->text.= "
"; if ($db_ver!=null) { $db_state = opensim_check_db(); $this->grid_status = $db_state['grid_status']; $this->now_online = $db_state['now_online']; $this->lastmonth_online = $db_state['lastmonth_online']; $this->user_count = $db_state['user_count']; $this->region_count = $db_state['region_count']; } else { $this->grid_status = false; $this->now_online = 0; $this->lastmonth_online = 0; $this->user_count = 0; $this->region_count = 0; } $this->content->text.= "
".$this->grid_name."
"; $this->content->text.= get_string('modlos_db_status','block_modlos').": "; if ($this->grid_status) $this->content->text.= "ONLINE
"; else $this->content->text.= "OFFLINE
"; $this->content->text.= get_string('modlos_total_users','block_modlos').": ".$this->user_count."
"; $this->content->text.= get_string('modlos_total_regions','block_modlos').": ".$this->region_count."
"; $this->content->text.= get_string('modlos_visitors_last30days','block_modlos').": ".$this->lastmonth_online."
"; $this->content->text.= get_string('modlos_online_now','block_modlos').": ".$this->now_online."
"; $this->content->footer = '
Modlos '.$this->release.''; return $this->content; } // setting of instance block. need config_instance.html function instance_allow_config() { return false; } // setting block. need settings.php function has_config() { return true; } // hide block header? function hide_header() { return false; } // exec parser function cron(){ global $CFG; require($CFG->dirroot.'/blocks/modlos/include/cron.php'); } } ?>