set_maintenance_mode.php 979 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Form body for setting robots.txt
  4. */
  5. $site = elgg_get_site_entity();
  6. $mode = (int)elgg_get_config('elgg_maintenance_mode', null);
  7. $message = $site->getPrivateSetting('elgg_maintenance_message');
  8. if (!$message) {
  9. $message = elgg_echo('admin:maintenance_mode:default_message');
  10. }
  11. echo '<p>' . elgg_echo('admin:maintenance_mode:instructions') . '</p>';
  12. echo '<div><label>' . elgg_echo('admin:maintenance_mode:mode_label') . ': ';
  13. echo elgg_view('input/select', array(
  14. 'name' => 'mode',
  15. 'options_values' => array(
  16. '1' => elgg_echo('on'),
  17. '0' => elgg_echo('off'),
  18. ),
  19. 'value' => $mode,
  20. ));
  21. echo '</label></div>';
  22. echo '<div><label for="message">' . elgg_echo('admin:maintenance_mode:message_label') . ':</label><br>';
  23. echo elgg_view('input/longtext', array(
  24. 'name' => 'message',
  25. 'id' => 'message',
  26. 'value' => $message,
  27. ));
  28. echo '</div>';
  29. echo '<div class="elgg-foot">';
  30. echo elgg_view('input/submit', array('value' => elgg_echo('save')));
  31. echo '</div>';