Drupal

function HOOK_preprocess_page(&$vars) {
global $user;
  if (!in_array('administrator', $user->roles) && variable_get('maintenance_mode') == 1 && arg(0) != 'user') {
    $vars['theme_hook_suggestions'][] = 'maintenance_page';
  }
  else if (drupal_is_front_page()) {
    $vars['theme_hook_suggestions'][] = 'page__front';
  }
}