constructor MRF [line 111]
MRF Class Constructor
The Constructor will instantiate the $sql Database object, the $tpl Template object, and the $auth Authentication object.
method addStyleSheet [line 187]
void addStyleSheet(
string
$style, [string
$media = "screen"])
|
|
Add a Style Sheet
Used to add a style sheet to the MRF template. If you have a file named add.screen.css, you would call:
Tags:
Parameters:
method checkGet [line 224]
Check the GET variable for data
This will primarily be used to determine if the user is trying to log in or log out, and will call the appropriate authentication method.
Tags:
method displayPage [line 150]
void displayPage(
string
$section, [string
$subsection = "home"])
|
|
Display a Page using the Templating Engine
This will cause Smarty to display a page based on the paramaters sent to the function. This will be a public funtion but in the future we hope to use this as a way of calling pages from other methods, possibly rendering this private, but we'll see.
NOTE: Once the template is loaded, this will kill the script, so nothing else can run afterwards.
Parameters:
method displayProgress [line 203]
void displayProgress(
array
$progress)
|
|
Display the Progress Page
Takes an array of progress data and turns it into the progress page.
Tags:
Parameters:
method forceAdminLevel [line 386]
null forceAdminLevel(
int
$adminLevel, [boolean
$exactLevelOnly = false])
|
|
Require a Specific Admin Level
This will allow us to control what level of user is required to access a certain page, so people can't just browse the history of a browser and find a page.
If the optional variable, $exactLevelOnly is set to true, then only the level of administrator chosen can view the page. Otherwise that level or higher will be able to view the page.
This will either load an access denied page and stop the loading of the page, or do nothing.
Tags:
Parameters:
method generateMenu [line 418]
Generate the top navigation Menu
generateMenu() will check whether or not the user is logged in, and if the user is an administrator or not, then will display a menu accordingly.
Tags:
method getAdminStatus [line 330]
Get the Admin status of the current user
If the current user is not logged in, or if the current user is not an administrator, they will be assigned a zero. Otherwise, they will be assigned the level as it recorded in the database.
Tags:
method getPathVars [line 246]
Get the Path Variables
The default implementation of this requires the use of apache's mod rewrite to change complicated URL strings into an easy to read one. This function simply takes the GET variable "path" and strips it out into an array for ease of use.
This sets the pathVars array with information received from $_GET['path']
Tags:
method getProgress [line 488]
array|false getProgress(
)
|
|
Gather the progress report for the coding
This is used for tracking the progress of the development of this project. It is a very simple and elementary way of doing things, but that's good because more time should be spent on developing the application anyway.
Tags:
method pre [line 509]
Simple page for printing out an array dump on a web page
Tags:
Parameters:
method processRequestSubmission [line 312]
true|false; processRequestSubmission(
array
$data)
|
|
Process MRF Request Submission
Must be passed an array of data in the following format: [code] $foo=array( "sub_user_username01" => "username01::username01@example.com", "sub_user_username02" => "username02::username02@example.com", "peer_user_username03" => "username03::username03@example.com", "sup_user_usernaem04" => "username04::username04@example.com" ); [/code] The reason for this is ease of submitting via a form. they keys are comprised of the type of user, the constant string "_user_" and the username (with no spaces). The following groups are acceptable:
- sub: Suboordinate
- peer: Peer or Co-Worker
- sup: Supervisor
The value is the username and the user's email address separated by double colons (::).
This function will validate the data and then insert it into a database. These functions may be separated later, but for now, we're on a limited timetable.
Tags:
Parameters:
method requestMRF [line 541]
true|false requestMRF(
array
$participants)
|
|
Request an MRF
Primary function for requesting an MRF. This will simply add the data to the proper tables and place the requested MRF in a list awaiting approval from MRF admins.
The Participants array must be formatted where the 1st key is the user's netid (username), the value of that key is an array, and that array contains email, name, and type
Tags:
Parameters: