Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Mexican Restaurant Prepared by Sandy Nichols November 21, 2006.

Similar presentations


Presentation on theme: "1 Mexican Restaurant Prepared by Sandy Nichols November 21, 2006."— Presentation transcript:

1 1 Mexican Restaurant Prepared by Sandy Nichols November 21, 2006

2 2 Table of Contents Executive Summary3 Site Map4 Database Structure5 Menu Page Flowchart6 Pseudo Code7 Admin Page Flowchart8 Pseudo Code9 Edit Records Flowchart10 Pseudo Code11 Delete Records Flow Chart12 Pseudo Code13

3 3 Executive Summary El Azteca Mexican Restaurant needs a website that showcases their menu, provides directions, and gives a general presence on the web. This will be achieved by storing the menu in a MySQL database and having PHP dynamically write to the Menu page. The restaurant also needs a way to periodically post specials themselves. Advertised specials are by way of coupons circulated throughout the community. By building a photo gallery, they will be able to frequently upload an image of the coupon directly to their Home page. This approach preserves the restaurant’s current marketing strategy while providing another means of coupon distribution through a web presence. The Definitions page will define what is in popular Mexican dishes. If a person does not know what a Chalupa is, they can go to the page and read “flat tortilla with beans sprinkled with cheese and topped with guacamole salad.” Definitions will be taken from the current printed menu. If restaurant is willing to have the food photographed, this page could have an accompanying photo with the definitions. The about page will be a static page with some light history about the company, coupled with photos of beautiful people dining and drinking on the outdoor patio and listening to the Mariachi band. This page will be designed to give an overall feel of the atmosphere. This page may include pictures of long-term servers willing to be photographed. Currently the proposed site is five pages, but should be considered scaleable if future needs arise. Additions could be a feature on the many brands of tequilla sold at the bar or a feature on Mexican specialty drinks. Another enhancement could be the ability to take online secured orders for carry-out. Flash components could add another level of interactivity, like make your own virtual tacos game. Current Coupon

4 4 Specials Coupons Dynamic Static History Patio pics Staff pics Site Map Static DatabasePhoto Gallery Directions Contact Definitions of Mexican food

5 5 Database Structure M E N U P H O T O G A L L E R Y (for coupons)

6 6 Visit Menu page Connect to MySQL Select db to work with Query DB by Category Store in variable Store # of records in variable Is # records >0 ? Fetch record Echo Record “No records” stop Flowchart for Menu Page

7 7 Visit Menu page Connect to MySQL Select db to work with Query DB by Category Store in variable Store # of records in variable Is # records >0 ? Fetch record Echo Record “No records” stop Pseudo Code for Menu Page OPEN DB ElAzteca READ DB SET results to a variable SET # of results to variable DOWHILE # >0 READ results from variable WRITE results to page CLOSE file

8 8 Flowchart for Admin Page Visit Admin url Successful login NO YES Admin Page Add/Edit/Delete Photo Gallery Stop Add/Edit/Delete Menu Database

9 9 Pseudo Code for Admin Page DO login verification Visit Admin url Successful login NO YES Admin Page Add/Edit/Delete Photo Gallery Stop Add/Edit/Delete Menu Database

10 10 Flowchart for Editing Records start Is record id set? “Record does not exist” stop NO YES Has form Been submitted? Show form stop NO YES Update Record DB Where id =$_GET[‘id’] Errors? NO YES “Query Error” Output SQL & Mysql_error() stop Start Session Redirect To admin page showForm() Connect to DB Select DB Query DB For record Output form With data In elements End showForm() Store success Message in Session Var

11 11 Pseudo Code for Editing Records start Is record id set? “Record does not exist” stop NO YES Has form Been submitted? Show form stop NO YES Update Record DB Where id =$_GET[‘id’] Errors? NO YES “Query Error” Output SQL & Mysql_error() stop Start Session Redirect To admin page showForm() Connect to DB Select DB Query DB For record Output form With data In elements End showForm() Store success Message in Session Var OPEN record id READ record id IF id not set THEN WRITE error IF id set THEN continue READ record id IF id not submitted THEN show form IF id submitted THEN WRITE DB END-IF IF errors THEN WRITE error IF no errors THEN WRITE success END-IF OPEN Admin page CLOSE

12 12 Flowchart for Deleting Records start Is record id set? Delete Var Set? NOYES NOYES NO YES Query DB For Record “Are you sure?” Show Record Delete? Redirect To admin page stop Delete Record From DB Table Where id= $_GET[‘id’] Errors? NO YES “Query Error” Output SQL & Mysql_error() stop Start Session Redirect To admin page Store success Message in Session Var “No such record” stop

13 13 Pseudo Code for Deleting Records start Is record id set? Delete Var Set? NOYES NOYES NO YES Query DB For Record “Are you sure?” Show Record Delete? Redirect To admin page stop Delete Record From DB Table Where id= $_GET[‘id’] Errors? NO YES “Query Error” Output SQL & Mysql_error() stop Start Session Redirect To admin page Store success Message in Session Var “No such record” stop READ record id IF id not set THEN WRITE error IF id set THEN continue END-IF IF delete not confirmed, THEN confirm IF delete confirmed THEN delete END-IF IF errors THEN WRITE error IF no errors THEN WRITE success OPEN Admin page END-IF CLOSE

14 14


Download ppt "1 Mexican Restaurant Prepared by Sandy Nichols November 21, 2006."

Similar presentations


Ads by Google