Functions | Variables
c_comdef_login.php File Reference

This presents a login dialog to the user, vets the login, and establishes a session. More...

Functions

 c_comdef_LoginForm (&$in_server)
 Returns HTML for the login form. If the user is not logged in, then they get the form. Otherwise, the login is processed, or the user is vetted.

Variables

 $t_server = c_comdef_server::MakeServer()
 $lang_enum = $t_server->GetServer()->GetLocalLang()

Detailed Description

This presents a login dialog to the user, vets the login, and establishes a session.

We track admin logins through the use of PHP sessions. This allows the login data to remain on the server. It also allows the login data to be carried into AJAX calls.

We're pretty anal about checking user credentials. We don't allow any changes to happen to the DB unless the user has been vetted at the time the DB access is made, but we do a lot of checking along the way.

If you include this file at the top of any file that does admin, it will check the session. If the session is not there, it will replace the output with a login form, and will continue along the way, once the user has logged in. If the session is set, it simply makes sure that the session reflects a user that has a system login (it does not check the user level), and stays out of the way.

If the user authentication fails, then it does a PHP die(), and scrags the whole thing. This prevents execution of any code beyond the bare minimum necessary to authenticate.

Cookies and JavaScript (and AJAX) are required to administer the server (but not to use it as a regular site visitor). This form checks to see if JavaScript is enabled, and if cookies are enabled.

You should link to the c_comdef_login.css file for this form.

This file is part of the Basic Meeting List Toolbox (BMLT).

Find out more at: http://magshare.org/bmlt

BMLT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

BMLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this code. If not, see <http://www.gnu.org/licenses/>.


Function Documentation

c_comdef_LoginForm ( &$  in_server)

Returns HTML for the login form. If the user is not logged in, then they get the form. Otherwise, the login is processed, or the user is vetted.

Returns:
a string, containing the form HTML.
Parameters:
in_serverA reference to an instance of c_comdef_server

Variable Documentation

$lang_enum = $t_server->GetServer()->GetLocalLang()
$t_server = c_comdef_server::MakeServer()
 All Classes Files Functions Variables Enumerations