squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

login.php File Reference

Go to the source code of this file.

Namespaces

 squirrelmail
 

Variables

const PAGE_NAME 'login'
 
const SM_PATH '../'
 
 $sep = ''
 
 $sel = ''
 
if(!empty($_SESSION)) global $custom_session_handlers
 
 $loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : '')
 
 $header
 
 $custom_css = 'none'
 
 $username_form_name = 'login_username'
 
 $password_form_name = 'secretkey'
 
if(sqgetGlobalVar('mailtodata', $mailtodata)) else
 
 if (isset( $org_logo) &&$org_logo)
 

Variable Documentation

◆ $custom_css

$custom_css = 'none'

Definition at line 144 of file login.php.

◆ $custom_session_handlers

if (!empty( $_SESSION)) global $custom_session_handlers

in some rare instances, the session seems to stick around even after destroying it (!!), so if it does, we'll manually flatten the $_SESSION dataAllow administrators to define custom session handlers for SquirrelMail without needing to change anything in php.ini (application-level).

In config_local.php, admin needs to put:

$custom_session_handlers = array(
    'my_open_handler',
    'my_close_handler',
    'my_read_handler',
    'my_write_handler',
    'my_destroy_handler',
    'my_gc_handler',
);
session_module_name('user');
session_set_save_handler(
    $custom_session_handlers[0],
    $custom_session_handlers[1],
    $custom_session_handlers[2],
    $custom_session_handlers[3],
    $custom_session_handlers[4],
    $custom_session_handlers[5]
);

We need to replicate that code once here because PHP has long had a bug that resets the session handler mechanism when the session data is also destroyed. Because of this bug, even administrators who define custom session handlers via a PHP pre-load defined in php.ini (auto_prepend_file) will still need to define the $custom_session_handlers array in config_local.php.

Definition at line 56 of file login.php.

◆ $header

$header
Initial value:
= "<script language=\"JavaScript\" type=\"text/javascript\">\n" .
"<!--\n".
" var alreadyFocused = false;\n".
" function squirrelmail_loginpage_onload() {\n".
" document.login_form.js_autodetect_results.value = '" . SMPREF_JS_ON . "';\n".
" if (alreadyFocused) return;\n".
" var textElements = 0;\n".
" for (i = 0; i < document.login_form.elements.length; i++) {\n".
" if (document.login_form.elements[i].type == \"text\" || document.login_form.elements[i].type == \"password\") {\n".
" textElements++;\n".
" if (textElements == " . (isset($loginname) ? 2 : 1) . ") {\n".
" document.login_form.elements[i].focus();\n".
" break;\n".
" }\n".
" }\n".
" }\n".
" }\n".
"// -->\n".
"</script>\n"

Definition at line 125 of file login.php.

◆ $loginname_value

$loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : '')

Definition at line 121 of file login.php.

◆ $password_form_name

$password_form_name = 'secretkey'

Definition at line 167 of file login.php.

◆ $sel

$sel = ''

◆ $sep

$sep = ''

In case the last session was not terminated properly, make sure we get a new one, but make sure we preserve session_expired_*

Definition at line 43 of file login.php.

Referenced by get_paginator_str().

◆ $username_form_name

$username_form_name = 'login_username'

Definition at line 166 of file login.php.

◆ else

if (sqgetGlobalVar( 'mailtodata', $mailtodata)) else
Initial value:
{
$mailtofield = ''

Definition at line 173 of file login.php.

◆ if

if(isset($org_logo) && $org_logo)

Definition at line 178 of file login.php.

◆ PAGE_NAME

const PAGE_NAME 'login'

This is the login page

Definition at line 16 of file login.php.

◆ SM_PATH

const SM_PATH '../'

Path for SquirrelMail required files. @ignore

Definition at line 22 of file login.php.

SMPREF_JS_ON
const SMPREF_JS_ON
Definition: constants.php:53