/program/main_admin.php - workhorse for site maintenance
This file deals with the administrator interface program for site maintenance. It is included and called from /admin.php.
The work is done in main_admin().
Class | Description |
---|---|
![]() |
conveniently collect output |
This is used to dispatch the account manager (users and groups)
This is used to dispatch the configuration manager
This is used to dispatch the file manager in file browser mode (used with FCK Editor)
This is used to dispatch the file manager
This is used to dispatch the file manager in flash browser mode (used with FCK Editor)
This is used to dispatch the file manager in image browser mode (used with FCK Editor)
This is used to dispatch the module manager
This is used to dispatch the page manager
This is used to dispatch the startcenter job
This is used to dispatch the statistics
This is used to dispatch the tool manager
This is used to dispatch the update manager
add javascript code that implements a popup to the header part of the page
add javascript code that implements a url selection (used in integration with FCKeditor)
continue the session from the previous call OR exit
This tries to resume the session that was initiated before (when the user logged in succesfully). If the session cannot be resumed, we logout the user, show the login screen and exit. In other words: this routine guarantees that a valid session exists if and when this routine returns. If the routine returns, it returns the user_id.
perform a step in the login procedure
This routine may not return at all. If it returns, the user is logged in successfully and the return value is the user_id (unique identification for the user, pkey in users table). The steps in the login procedure are defined in loginlib.php.
logout the user and exit
This logs out the user (ie kills the session) If there is an error (ie, there was no session in the first place) indicated by was_logout() returning, we unconditionally show a login dialog and exit. So, this routine never returns.
show login dialog and exit
construct URL for version check agains the project's website
this constructs the URL for checking the installed version against the current version on the project's website. The remote site will respond with a readable text and the user can decide to act on the information (or not). We don't want to force any upgrades etc.
generate the start centre page
This is the handler for the start centre. This is the only handler that is NOT included from another file. Basically it shows a screen with hints on how to proceed with this program.
main program for site maintenance
This is the main administrator program. First step is to deal with users logging in or out. If a user is not logged in, a login dialog is displayed. If a user is logged in but has no admin privileges, she is redirected to the public site (ie. index.php).
Once we have established that the user is an administrator, we setup an output collecting object and see what the user wants us to do by interpreting the parameter 'job'. If the user has access to the specified job, the corresponding code is included and the main routine of that handler is called. It is then the responsability of that handler to further decide what needs to be done. After the handler returns, the collected output is sent to the user. This includes the main navigation (i.e. links to the various 'managers') and also the menu and the content generated by the handler.
If the user has no privilege to access a particular manager, an error messate is displayed in both the message area and the content area. This makes it clear to the user that access is denied. Note that the inaccessible items are displayed in the main navigation via 'dimmed' (light-grey) links or black/white images. By showing these 'dimmed' links, the user will be aware that there is more that just what she is allowed to see. This is more transparent than suppressing items and keeping them secret.
Documentation generated on Wed, 11 May 2011 23:45:23 +0200 by phpDocumentor 1.4.0