American Fundraiser System Documentation

This is a web-based system coded in PHP and MySQL that allows end-users to input personal fund raising data (such as the names, addresses, phone, money raised, etc.). The data from each user is compiled into one main MySQL database. The raw data is stored for each individual sale in one table and totals are computed and stored into a separate table. Administrators can export the compiled data into .csv files which can be read by Microsoft Excel, OpenOffice.org, or even a simple text editor. The system authentication consists of a user name and password for each end-user. The password is securely relayed to the server by means of a one-way hash function using a randomly generated ten digit key.

Version Information

Released September 24, 2007
Current Version May 15, 2008
Copyright All Rights Reserved, 2008
Scripts HTML, CSS, PHP, MySQL

Contents

Tip: to search for a word or phrase press CTRL + F

  1. Main system features (what does this thing does...)
  2. Main system features explained & instructions on how to use them
  3. Secure login features & explanation
  4. File structure explanation (what does each file in the "americanFund" directory actually do?)
  5. Screenshots of the system in use.

Main System Features

Administrative Privileges

End-User Privileges

File Structure

This is the basic file structure within the "americanFund" directory. To read the explanation for each file please follow its link.

File Explanations/ Interpretation

This section contains an explanation or summery of what each file does and it's significance in the operation of the fundraising system.

addToDatabase.php

This file processes the information sent through a POST request coming from
the newSale.php html form. All the information recieved from the form is processed and inserted into the MySQL database.

db_connect.php

This file is imported to the top of every page that needs to read/write to/from the MySQL database. It opens a connection to the database using the username and password the administrator has setup when the database was originally created.

emptyDatabase.php

Deletes all the sales of each and every user from the system. This will not delete any users.

emptyRoster.php

Erases all data. Erases/clears the entire system of users and sales. This is used when you want to start entirely over at the start of a new fundraiser or year.

header.php

Imported to the top of each page in the /admin directory and contians:

index.php

This is the homepage for the /admin directory which is the control panel page.

loadRoster.php

Opens and reads the names of new users from studentRoster.txt, converts the list to HTML code, and then writes theconverted file to studentRosterHTML.txt. If there are any new names in the studentRoster.txt file they are inserted into the database as new users.

memberInfo.php

Lists all the usernames and passwords of all the users, including the administrator.

memberInfo_export.php

Exports all the usernames and passwords into a .csv file and makes it available for download. This file can be opened with common applacations such as Microsoft Excel, OpenOffice.org, or any simple text editor.

newSaleAdmin.php

Enables the administrator to create new sales under the name of any end-user in the system.

sale.php

Displays all the information about any individual sale.

salesComplete_export.php

Exports all the sales currently entered into the database and their information to a .csv file and makes it available for download. This file can be opened with common applacations such as Microsoft Excel, OpenOffice.org, or any simple text editor.

salesIndividual.php

Displays all the sales of any individual user in a scrolling list style layout.

salesindividual_export.php

Exports all the information from salesIndividual.php. This includes date of sale, customer, fruit sold, nuts sold, total items sold, donations, and total money raised by that user.

salesSummary.php

Displays all sales currently in the database in a scrolling list style layout.

salesSummary_export.php

Exports all the information from salesSummary.php.

studentRoster.txt

Add one or multiple names to this file in order to add them to the system as a new user. Follow the steps outlined here: add a new user to the system.

studentRosterHTML.txt

This contains the HTML version of studentRoster.txt. See loadRoster.php for more info.

user.php

Displays all the information for any individual user enrolled in the system.

docs.css

Contains the style information for this page. See the definition of Cascading Style Sheets.

index.php

This is the page you are currently looking at. The documentation page.

authenticate.php

Validates the end-user by checking whether or not they have logged in. This file is imported to the header of every page that must be secure. Checks if the user is already logged in by using PHP Sessions. Wikipedia.org can explain what a basic session is in computer science. Here is the documentation on how to use sessions in PHP.

common.php

Contains common functions that are used from several places in the file structure.

encrypt.php

This code simplifies the MD5 encryption algorithm into two PHP simple functions. This code is originally from Experts Round Table. Here is a screenshot of the original code from Experts Round Table.

Here is a brief explanation of the code:

easy_crypt()

easy_decrypt()

header.php

index.php

logout.php

md5.js

Contains the MD5 (Message-Digest algorithm 5) encryption algorithm.

secret.php

addToDatabase.php

index.php

newSale.php

salesIndividual.php

salesIndividual_export.php

copyright.php

error.php

Displays any error message sent to it via a GET request.

footer.php

header.php

index.php

main.css

Contains the style information for all the pages in the system. See the definition of Cascading Style Sheets.

Screenshots

back to top | back to control panel