- var $L; // GPvar: If "L" is "OUT", then any logged in used is logged out. If redirect_url is given, we redirect to it

- var $loginRefresh; // Login-refresh boolean; The backend will call this script with this value set when the login is close to being expired and the form needs to be redrawn.

- var $commandLI; // Value of forms submit button for login.

-

- // Internal, static:

- var $redirectToURL; // Set to the redirect URL of the form (may be redirect_url or "backend.php")

-

- // Internal, dynamic:

- var $content; // Content accumulation

-

- var $interfaceSelector; // A selector box for selecting value for "interface" may be rendered into this variable

- var $interfaceSelector_jump; // A selector box for selecting value for "interface" may be rendered into this variable - this will have an onchange action which will redirect the user to the selected interface right away

- var $interfaceSelector_hidden; // A hidden field, if the interface is not set.

- var $addFields_hidden = ''; // Additional hidden fields to be placed at the login form

- * Checking, if we should perform some sort of redirection OR closing of windows.

- *

- * @return void

- */

- function checkRedirect() {

- global $BE_USER,$TBE_TEMPLATE;

-

- // Do redirect:

- // If a user is logged in AND a) if either the login is just done (commandLI) or b) a loginRefresh is done or c) the interface-selector is NOT enabled (If it is on the other hand, it should not just load an interface, because people has to choose then...)