login_dropdown.php 668 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Elgg drop-down login form
  4. */
  5. if (elgg_is_logged_in()) {
  6. return true;
  7. }
  8. $login_url = elgg_get_site_url();
  9. if (elgg_get_config('https_login')) {
  10. $login_url = str_replace("http:", "https:", elgg_get_site_url());
  11. }
  12. $body = elgg_view_form('login', array('action' => "{$login_url}action/login"), array('returntoreferer' => TRUE));
  13. ?>
  14. <div id="login-dropdown">
  15. <?php
  16. echo elgg_view('output/url', array(
  17. 'href' => 'login#login-dropdown-box',
  18. 'rel' => 'popup',
  19. 'class' => 'elgg-button elgg-button-dropdown',
  20. 'text' => elgg_echo('login'),
  21. ));
  22. echo elgg_view_module('dropdown', '', $body, array('id' => 'login-dropdown-box'));
  23. ?>
  24. </div>