Technical Documentation
========================

**about.php** - Simple HTML page that displays information about the Bears & Bulls app.

**AppInfo.php** - Class that provides static methods tht return pieces of data specific to our app.

**createhfund.php** - Contains the front-end code for creating a hedge fund.

**CreateLeague.php** - Page that contains the form that allows the user to create a league. Also contains code that conducts error checking.

**createmfund.php** - Contains the front-end code for creating a mutual fund.

**detailsfund.php** - Displays fund information to the user.

**detailsleague.php** - Displays league information to the user.

**funds.php** - Basic HTML page that aids the user in creating the type of fund that they want to.

**HFundCreate.php** - Creates the code for inserting a hedge fund in the database.

**history.php** - Displays the history of all trades that a user has conducted in a nice, readable format.

**index.php** - The main landing page for our application. If a user has not added our app on Facebook, they will be redirected to authorize the app. Otherwise, this page will list all of the user's league and fund portfolios and show a snapshot of the market.

**invites.php** - Redirects to the Facebook UI for inviting friends, and upon completion, redirects to the index.php page which handles the rest of the invite process. 

**join.php** - Sets up a portfolio for the user in the database if they choose to accept an invite. If they decline, it gets rid of the invite. 

**joinleague.php** - Shows a user all the outstanding invites that they haven't responded to yet and provides them with the options to join, decline, or view more details about each league.

**leagues.php** - Basic HTML page that informs the user about leagues and directs them to the page that will help them create one.

**managefund.php** - The page that allows the user to change the settings for an existing fund and updates the database accordingly.

**manageleague.php** - The page that allows the user to change the settings for an existing league and updates the database accordingly.

**MFundCreate.php** - Creates the code for inserting a hedge fund in the database.

**order.php** - Displays the order page for the user to submit a ticket. Also contains code for error checking.

**pending.php** - Page that displays all the outstanding tickets created by the user that haven't been processed yet.

**portfolio.php** - Displays the contents of the selected portfolio, including information about each stock such as gains/losses, value, etc.

**process.php** - Process the order placed by the user and performs error checking and validation (sufficient funds, accurate stock symbol, etc.)

**ProcessCreate.php** - Sets up a new league in the database using the parameters provided by the user.

**research.php** - The page that gets displayed for the research page

**researchpage.php** - Creates HTML that gets injected into research.php that dynamically updates the input fields based on options selected on the research page.

**researchstart.php** - Creates HTML that gets injected into research.php that includes all 

**style.css** - Contains screen styles to make Bears & Bulls look pretty.

**stockquery.php** - Uses our Stock Info Provider to display relevant information 

**transaction.php** - Goes through all pending tickets in the database for all users and determines if they can be executed. If so, it does so.

**utils.php** - Contains some helper functions that were provided by Facebook

**autosuggest_v2.1.3/** - Contains the AutoSuggest jQuery plugin that makes adding the auto-suggest feature used for finding stock symbols possible.

**headerfiles/** - Contains php files that are included by other php pages

**headerfiles/begin.php** - Contains the top header portion of the HTML template that is used on every page that the user interacts with.

**headerfiles/datalogin.php** - Contains all the code needed to connect to the database.

**headerfiles/end.php** - Contains the bottom footer portion of the HTML template that is used on every page that the user interacts with.

**headerfiles/stockinfoprovider.php** - Fetches stock info from Yahoo! Finance. Contains code for both interacting with the Yahoo! Finance API as well as scraping Yahoo! Finance. Currently it always scrapes as using the API was more unreliable.

**html_boxes/*** - Contains files with HTML that is injected into the order form page dynamically to update the selectable values.

**sdk/*** - Contains the Facebook PHP SDK provided by Facebook at https://github.com/facebook/php-sdk

**styles/reset.css** - Resets browser default CSS styles to have a more uniform web experience across browsers.