PHPLIB contains a set of core classes and functions that offer
session tracking, per-session and per-user persistent variables,
user authentication and permission checking. Building upon this
core functionality, PHPLIB offers a set of commonly needed
"background" classes and a set of "HTML widgets", classes that
allow you to quickly generate HTML based user interfaces.
All PHPLIB definitions are designed that you don't need to
change any of these files. Your customization of PHPLIB can be
contained in two or three files, depending on the setup:
local.inc, setup.inc and, in some cases,
prepend.php3. You NEVER
need to change any other file with PHPlib. Details are outlined below.
The following three files are the only files from PHPLIB that
require changes in normal PHPLIB applications.
Application configuration in local.inc:
Your application will almost certainly not work with the
default values supplied by the above classes. You are supposed
to extend the classes described below as you see fit.
In your subclasses, you only have to specify what is different
in your application. These are things like database host names,
database names, table names and username/password
combinations. You need to provide login screen definitions
(HTML) and user validation functions (SQL) to make the
example work.
The distribution provides a local.inc to illustrate
a typical setup. These definitions are also needed to get
the administration and testing scripts provided with the
distribution to run.
The file is required and you must change it for your setup.
Application setup in setup.inc:
The Session class provides the ability to execute
initialization code at session setup. See the class
description for instructions on how to set this up.
Per convention, we store such code in setup.inc
in the include directory. The code is being executed
whenever a new user connection to out application and
a new session is started.
The file is optional. No default is provided.
Selection of automatically loaded classes in prepend.php3:
The file prepend.php3 determines which code is being
loaded for all PHP interpreted pages. Normally, we include
the class definitions for all core classes in this file:
db_mysql.inc, session.inc, auth.inc,
perm.inc, user.inc, then your local customizations
from local.inc and the page management functions from
page.inc.
You must change prepend.php3 to reflect the database
interface that you are using: Change the require
statement for db_mysql.inc appropriately.
If you are not using some core features from PHPLIB in your
application or if you want some other features to be present
on all your pages, you can delete or add require
statements for their respective include files here.
The file is required. You must change it for your setup,
unless you are using MySQL.