index.php 966 B

123456789101112131415161718192021222324
  1. <?php
  2. // Show the CAS button to login using CAS
  3. require_once(api_get_path(SYS_PATH).'main/auth/cas/authcas.php');
  4. $_template['show_message'] = false;
  5. if (api_is_anonymous()) {
  6. $_template['cas_activated'] = api_is_cas_activated();
  7. $_template['cas_configured'] = cas_configured();
  8. $_template['show_message'] = true;
  9. // the default title
  10. $button_label = "Connexion via CAS";
  11. if (!empty($plugin_info['settings']['add_cas_login_button_cas_button_label'])) {
  12. $button_label = api_htmlentities($plugin_info['settings']['add_cas_login_button_cas_button_label']);
  13. }
  14. // the comm
  15. $comm_label = api_htmlentities($plugin_info['settings']['add_cas_login_button_cas_button_comment']);;
  16. // URL of the image
  17. $url_label = $plugin_info['settings']['add_cas_login_button_cas_image_url'];
  18. $_template['button_label'] = $button_label;
  19. $_template['comm_label'] = $comm_label;
  20. $_template['url_label'] = $url_label;
  21. }