index.php 632 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @package chamilo.plugin.vchamilo
  4. */
  5. api_protect_admin_script();
  6. global $virtualChamilo;
  7. $plugin = VChamiloPlugin::create();
  8. // See also the share_user_info plugin
  9. $_template['show_message'] = true;
  10. $_template['title'] = $plugin->get_lang('hostlist');
  11. $table = Database::get_main_table('vchamilo');
  12. $sql = "SELECT sitename, root_web FROM $table WHERE visible = 1";
  13. if ($virtualChamilo == '%') {
  14. $result = Database::query($sql);
  15. $_template['hosts'] = array();
  16. if ($result) {
  17. while ($vchamilo = Database::fetch_assoc($result)) {
  18. $_template['hosts'][] = $vchamilo;
  19. }
  20. }
  21. }