Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flash Board MX PHP Files CISC 254. Fix for Global Variables foreach($HTTP_GET_VARS as $name => $value) { $$name = $value;} foreach($HTTP_POST_VARS as.

Similar presentations


Presentation on theme: "Flash Board MX PHP Files CISC 254. Fix for Global Variables foreach($HTTP_GET_VARS as $name => $value) { $$name = $value;} foreach($HTTP_POST_VARS as."— Presentation transcript:

1 Flash Board MX PHP Files CISC 254

2 Fix for Global Variables foreach($HTTP_GET_VARS as $name => $value) { $$name = $value;} foreach($HTTP_POST_VARS as $name => $value) { $$name = $value;} foreach($HTTP_COOKIE_VARS as $name => $value) { $$name = $value;}

3 Common PHP Controls common functions such as database connection and password maintenance. Contains Text Filters and Code Parsing Allows for e-mail notification.

4 Important Functions in Common PHP dbConnect –Connection information for the database dbQuery –Initial Query to check database fail( –Returns error codes to Flash auth –Controls Username and Password Validation

5 Important Functions in Common PHP (Cont.) newAuth –Authorizes new user checkEmail –Checks e-mail account validity $regexp = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$"; setUserCookie –Sets last visit time for user setLanguageFilter –Sets $badWords Array for filtering.

6 Important Functions in Common PHP (Cont.) ParseText –Parses text to prevent loading code snippets into text mailNotify –Notifies User of new posts

7 db.php Contains code for connecting to database Creates PHP functions for many MySQL commands –Acts as a shortcut Appears to duplicate functions in connect.php

8 index.php Initial Entrance to site Contains EMBED code for the.swf file Not needed in our application

9 login.php Contains code to control the login process Uses common.php to encrypt password and connect to database

10 movethread.php Stand alone page that allows the administrator to move threads in the forums Moves threads and updates forum stats accordingly Not needed for our application

11 postedit.php Contains the code to edit posts Checks for authorization to modify Checks if post is first post and so deletes thread Checks to see if post is to be deleted Updates edited post Updates forum statistics Sends success data to flash

12 postnew.php Contains the code to create new posts Checks for authorization Calculates time functions for database Inserts new post Updates forum statistics Sends success data to Flash

13 postreply.php Contains the code to reply to posts Mirrors code for post new Includes code to notify other users by e-mail of new post

14 printable.php Believe is a future growth item as it is not called in the AS or PHP

15 profileedit.php Contains code to edit profiles Allows Admin to edit profiles

16 register.php Contains the code for registration Looks for duplicates Adds new user to the database –Sets user title code

17 search.php Contains the code for searching boards $query = "SELECT DISTINCT threadID FROM forumPosts WHERE MATCH(topic,message) AGAINST('$searchQuery') LIMIT $offset, $threadsPerPage";

18 viewboard.php Contains the code to display the message board Gets number of categories Runs a If cycle for each of the categories filling in the forums.

19 viewforum.php Contains the code to view the forums. Gets threads and displays description Uses code from db.php

20 viewpost.php Contains the code to view individual posts. Mostly control statements and a SELECT statement

21 viewprofile.php Contains the code to view profiles Mostly control statements and a SELECT statement

22 viewthread.php Contains the code to view threads Starts the process of creating post information Runs the text parsing function on the posts.


Download ppt "Flash Board MX PHP Files CISC 254. Fix for Global Variables foreach($HTTP_GET_VARS as $name => $value) { $$name = $value;} foreach($HTTP_POST_VARS as."

Similar presentations


Ads by Google