/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 |
![]() |
change the looks of the user interface |
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 CKEditor and FCKeditor)
This is used to dispatch the file manager
This is used to dispatch the file manager in flash browser mode (used with CKEditor and FCKeditor)
This is used to dispatch the file manager in image browser mode (used with CKEditor and FCKeditor)
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 CKEditor/FCKeditor)
This adds a JavaScript-function to the currently generated output page which takes care of returning a URL from a file/image/flash browser to either the (older) FCKeditor or (newer) CKEditor. Since both editors use the same filebrowsers we need to discriminate betweek FCKeditor and CKEditor. This is done by looking at the parameters: the CKEditor provides the number of an anonymous function in the parameter 'CKEditorFuncNum'. If this parameter is set we use the (integer) value for the callback to CKEditor. If it is not set we assume the old interface with FCKeditor.
Note that our actual file browser is supposed to remember this parameter, otherwise the file browser will assume FCKeditor after navigating to another page within the file browser. See also filemanager.class.php We remember the parameter via a session variable which is easier than propagating this number by adding it to every link within the file browser. However, we do update this function number every time the parameter 'CKEditorFuncNum' is specified, ie. on the first call to a file browser from CKEditor, ie. whenerver the user starts browsing the server.
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
determine the default skin to use
This routine determines which skin to use in AdminOutput. It always returns a valid skin (using 'base' in case of error).
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.
tell non-admin-user access denied and exit
this routine shows a supersimple screen for an intranet user (ie. someone without admin privileges) who accidently hit admin.php to go and look elsewhere by presenting a link to index.php or to admin.php?login=1.
Documentation generated on Tue, 28 Jun 2016 19:10:19 +0200 by phpDocumentor 1.4.0