function system_display_login_page

6.x system.module system_display_login_page()
4.x system.module system_display_login_page()
5.x system.module system_display_login_page()

Display the "login" page. This is the default page displayed to the user, at /login, if they have not logged in yet.

This page is meant to be displayed in conjunction with blocks, so the user can easily define their own messages and such.

Return value

unknown

File

modules/system/system.module, line 1494

Code

function system_display_login_page() {
  $rtn = "";

  fp_add_css(fp_get_module_path("system") . "/css/style.css");


  $top_blocks = blocks_render_blocks("system_login", "top");
  $bottom_blocks = blocks_render_blocks("system_login", "bottom");
  $left_col_blocks = blocks_render_blocks("system_login", "left_col");
  $right_col_blocks = blocks_render_blocks("system_login", "right_col");


  $rtn .= "<noscript>
            <div style='padding: 5px; background-color: red; color: white; font-size: 12pt; font-weight: bold;'>
            " . t("FlightPath requires JavaScript to be enabled in order to
            function correctly.  Please enable JavaScript on your browser
            before continuing.") . "</div>
          </noscript>";


  $w1 = 300;
  if (fp_screen_is_mobile()) {
    $w1 = "90%";
  }

  $login_box = fp_render_curved_line("Please login below...");
  $login_box .= fp_render_form("system_login_form");


  if (fp_screen_is_mobile()) {
    // the user is viewing this on a mobile device, so make it look
    // a bit nicer.
    $rtn .= $top_blocks . $left_col_blocks . $right_col_blocks . $bottom_blocks;
  }
  else {
    // This is NOT mobile, this is a regular desktop browser.
    $rtn .= "
        $top_blocks
      <table border='0'>
      <tr>
       <td valign='top' width='40%'>
        $left_col_blocks
       </td>
      <td valign='top' style='padding-left: 20px;'>
        $right_col_blocks  
       </td>
      </tr>
     </table>
     $bottom_blocks
     ";
  }


  return $rtn;
}