maintenance.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Maintenance mode page shell
  4. *
  5. * @uses $vars['head'] Parameters for the <head> element
  6. * @uses $vars['body'] The main content of the page
  7. * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
  8. */
  9. // render content before head so that JavaScript and CSS can be loaded. See #4032
  10. $messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
  11. $content = $vars['body'];
  12. $title = elgg_extract('title', $vars, elgg_get_site_entity()->name);
  13. $html5shiv = elgg_normalize_url('vendors/html5shiv.js');
  14. $favicon = elgg_view('page/elements/shortcut_icon', $vars);
  15. $css = elgg_get_simplecache_url('css', 'css/maintenance');
  16. $head = <<<__HEAD
  17. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  18. <title>$title</title>
  19. $favicon
  20. <!--[if lt IE 9]>
  21. <script src="$html5shiv"></script>
  22. <![endif]-->
  23. <link href="$css" rel="stylesheet">
  24. __HEAD;
  25. $body = <<<__BODY
  26. <div class="elgg-page elgg-page-maintenance" id="elgg-maintenance-page-wrapper">
  27. <div class="elgg-page-messages">
  28. $messages
  29. </div>
  30. <div class="elgg-body-maintenance">
  31. $content
  32. </div>
  33. </div>
  34. __BODY;
  35. echo elgg_view("page/elements/html", array('head' => $head, 'body' => $body));