index.php 824 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * @package chamilo.plugin.vchamilo
  4. */
  5. require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
  6. require_once dirname(__FILE__).'/lib/vchamilo_plugin.class.php';
  7. api_protect_admin_script();
  8. global $VCHAMILO;
  9. $plugininstance = VChamiloPlugin::create();
  10. // See also the share_user_info plugin
  11. $_template['show_message'] = true;
  12. $_template['title'] = $plugininstance->get_lang('hostlist');
  13. $tablename = Database::get_main_table('vchamilo');
  14. $sql = "
  15. SELECT
  16. sitename,
  17. root_web
  18. FROM
  19. $tablename
  20. WHERE
  21. visible = 1
  22. ";
  23. if ($VCHAMILO == '%'){
  24. $result = Database::query($sql);
  25. $_template['hosts'] = array();
  26. if ($result){
  27. while($vchamilo = Database::fetch_assoc($result)){
  28. $_template['hosts'][] = $vchamilo;
  29. }
  30. }
  31. } else {
  32. }