A dissection of Robins Nest
- Purpose:
- prints to screen Welcome, please sign in or sign up to continue
- rncheckuser.php
- Uses:
- Purpose:
- Checks if username is available, prints the results to the webpage
- rnfriends.php
- Uses:
- Purpose:
- if user is not logged in
- Will send a "You must log in" web page
- fetch the users friends
- puts followers into an array
- puts mutual friends into an array
- puts friends into an array
- Purpose:
- provides functions for the SQL interface
- Functions:
- Create Table
- createTable($name, $query)
- echos table already exists, or creates table $name
- Table Exists
- tableExists($name)
- returns the number of rows as a result of the query: Show Tables Like '$name'
- Query MySQL
- queryMysql($query)
- Queries the database
- returns the result
- Destroy Session
- destroySession()
- destroys the current session
- Sanitize String
- sanitizeString($var)
- sanitizes tags, html entities, and slashes to prevent SQL injection attacks
- returns mysql_real_escape_string($var)
- show Profile
- showProfile($user)
- if picture had been uploaded, puts picture on screen
- displays user information saved in the database
- rnheader.php
- Uses:
- Purpose:
- calls session_start()
- if user is logged in,
- displays links for navigation
- Home
- Members
- Friends
- Messages
- Profile
- Log out
- if user is not logged in,
- rnlogin.php
- Uses:
- Purpose:
- gets $user and $pass
- sanitizes the strings
- gets checks username / pass against the database
- if correct prompts the user to click on link
- rnlogout.php
- Uses:
- Purpose
- calls destroySession()
- logs the user out
- rnmembers.php
- Uses:
- Purpose:
- if user is not logged in, users are denied access
- view users profile
- add a friend
- remove a friend
- displays other members and their friendship status
- rnmessages.php
- Purpose:
- if user is not logged in, users are denied access
- provides information on when information was viewed
- provides creation of messages
- erasing of messages
- editing of messages
- rnprofile.php
- Uses:
- Purpose:
- if user is not logged in, users are denied access
- provides the editing of profile
- provides uploading of images as the user profile
- rnsetup.php
- Uses:
- Purpose
- creates the tables needed in the database
- rnsignup_yui.php
- Uses:
- Purpose:
- javascript that checks username input
- logs out user if already logged in
- checks to see if both fields were entered
- checks if username already exists
- adds user to database
- rnsignup.php
- Uses:
- Purpose:
- javascript that validates user input
- creates a user based on input
Quite a bit to scroll through.
ReplyDeletenice post
ReplyDeletehttp://php4unow.blogspot.com/
How useful, I could always use a reference.
ReplyDeleteGood work, should help with the final project.
ReplyDeleteCheck out my blog if you have not already: http://pmickplace.blogspot.com
Nice!
ReplyDeleteA bit of scrolling, but pretty useful. Nice job Jordan.
ReplyDeletehttp://easyhtm.blogspot.com/