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() | |
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/>.
| 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.
| in_server | A reference to an instance of c_comdef_server |
| $lang_enum = $t_server->GetServer()->GetLocalLang() |
Referenced by listprint_napdf::__construct(), booklet_napdf::__construct(), c_comdef_admin_bar(), DisplayFormatsForEdit(), DisplaySearchResultsCSV(), DisplayUserEditor(), listprint_napdf::DrawFormatPage(), booklet_napdf::DrawFormatPage(), listprint_napdf::DrawListPage(), booklet_napdf::DrawListPage(), c_comdef_server::GetLocalLang(), and c_comdef_server::GetLocalStrings().
| $t_server = c_comdef_server::MakeServer() |
1.7.4