BridgePortal Software Documentation

Directory Structure

The bps directory structure is as follows:

     /bps/                - Main directory.
       +-- css/           - Style definitions used by bps.
       +-- docs/          - Directory containing documention.
       +-- images/        - jpg and gif files used by bps.
       +-- private/       - Contains the php main programs.
            +-- common/   - Contains php libraries.
       

$_SESSION Variables Set in $ClubBasePath/index.php

The following $_SESSION variables are set in $ClubBasePath/index.php before control is redirected to $BpsBasePath/index.php:

    Debug                Sets the debug print level, like $_POST[“Debug”].
    ClubBasePath         Absolute path to the Club's root directory. This
                            is the directory containing the file clubHome.html and
                            the directories data and private.
    Club                 The name of the Club's root directory. This is the basename
                           of ClubBasePath.
    ClubScriptName       The name of the "top" script in the Club's home directory. It is
                           almost certainly set to "index.php", and therefore not very
                           useful.
    ClubScriptURI        The URI used to invoke ClubScriptName.
    ClubBaseURI          The URI of the Club's root directory. It's trailing "/", if any,
                           has been removed.
    BpsBasePath          Absolute path to the bps root directory.
    BpsBaseURI           The URI of the bps root directory.
    BpsBaseScript        The name of the "top" script in the bps root directory. This
                           is almost certainly set to "index.php".
    BpsStart             The value of $_SERVER["SCRIPT_URI"] when bps software is activated
                           for the very first time. If, for example, the bps software is
                           activated as the result of a redirection, this may not be the same
                           as BpsBaseURI.

And the following $_SESSION variables are subsequently set in $BpsBasePath/index.php:

    Sprache              0 = German, 1 = English.
    ClubTxt              The name of the selected club. It is obtained from the setup.txt file.
    AdminEmailAddress    An email address for reporting incidents to the
                           Club's administrator.
    AdminContactImage    An image file giving contact information for the Club's administrator.
                           This is to avoid having an easily readable version of
                           his email address in the Web pages.

Global Variables

There is a global variable for each of the $_SESSION variables listed in the previous section.


$_POST Variables

Note: In contrast to $_SESSION, the indices of $_POST are generally not capitalised.

    sprache           0 = German, 1 = English.
    debug             Sets the debug print level.
    en                Sets language to English.
    de                Sets language to German.
    goHome            Set to request a display of the home page.
    logout            Set if user has requested to be logged-out.
    showReg           Set to request a display of the registration status.
    showResults
    showMemberList
    showMemberProfile
    profil
    addUser
    AnyPlay
    CannotPlay
    Continue
    CouldPlay
    login
    newMember
    newUser
    PairSwap
    pwd1
    pwdChange
    pwdChange1
    pwdReset
    svPrfl2
    tryLoginAgain
    saveProfile
    setPwd
    SheetGen
    ShowLogFull
    ShowLogThisDate
    showStats
    showStats
    verifyPwd
    admin
    upload
    confirmNew
    submit
    help

Description of the Various Files in $ClubBasePath

Path

File-name

Description

./

index.php

This is a copy of a file in the bps distribution. It contains no club-specific code. It simply notes its location in some $_SESSION variables, searches for the base of the bps software, and transfers control to $BpsBaseURI/index.php. It should not be modified by the users.

./

clubHome.html

This is a home page html file for the club. It will not be displayed directly by a Web browser, but get read and processed by displayHome.php. It can have some keywords which will be recognised and expanded accordingly. These are:

    #bpsStyle#      - include a link to the bps css style-file.
    #formDefine#    - include the form definition.
    #clubBaseURI#   - will be replaced by value of $ClubBaseURI.
    #pageHeader#    - include a standard page header with action buttons.
    #Home#          - provide a button for switching to the home page.
    #LogInOut#      - provide a button for login/logout.
    #Registration#  - provide a button for showing registration status.
    #Results#       - provide a button for showing tournament results.
    #Statistics#    - provide a button for showing club statistics.
    #Members#       - provide a button for showing club membership
                        details. It will only be displayed if the user
                        has logged-in.
    #Help#          - provide a button for showing help information.
    #Language#      - provide a button for switching language.

Note that there are German equivalents of these keywords, if required.

./private/

setup.txt

This file defines some club-specific variables:

    $ClubTxt - a text string giving the name of the club.
    $Sprache - can be set to force the starting language to German
                 or English (0/1).

./private/

authorised

This is the membership database.

./css/

localStyle.css

Can be used to define HTML stylesettings, e.g. the background colour.

./data/

config

Specifies the date and time of club events.

./data/

anmeldungen

This is the database of event registrations.


Description of the Various Files in $BpsBasePath

Path

File-name

Description

./

index.php

This is the top-level bps php-file. Dependent upon settings in $_POST and $_SESSION variables, it will transfer control to one of the php files in ./bps/private/.

./private/

portal.php

??? .... to be written.

./private/

displayHome.php