Sunteți pe pagina 1din 48

Conference Meal

Planner
CpSc 427 Final Project

Conference Meal Planner

Contents
Wireframe Mockup .................................................................................................................................................2
Design Decisions......................................................................................................................................................4
Software Instructions ..............................................................................................................................................6
Customer Specifications .........................................................................................................................................8
Interface Issues .......................................................................................................................................................11
Literature Review ..................................................................................................................................................13
Literature Review Documents List .....................................................................................................................17
HTML Source Code ...............................................................................................................................................19
PHP Source Code...................................................................................................................................................25
Python Scripts ........................................................................................................................................................33
Sienna Sulla Piazza ............................................................................................................................................34
Seviche.................................................................................................................................................................36
Nola on the Square ............................................................................................................................................38
Meat & Potatoes .................................................................................................................................................40
Grit & Grace .......................................................................................................................................................42
The Capital Grille ..............................................................................................................................................44
Student Contributions...........................................................................................................................................46

Wireframe Mockup 1

Conference Meal Planner

Wireframe Mockup

Wireframe Mockup 2

Conference Meal Planner

This is the original mockup of our website. This is for both the web based web site and the
mobile website. Both were intended to look as similar as possible. Through testing, we have learned
that the original site intended for the desktop version also worked just as well for the mobile version.

Wireframe Mockup 3

Conference Meal Planner

Design Decisions

Design Decisions 4

Conference Meal Planner

This document is intended to describe the design decisions made and their rationale for the
Conference Meal Planner. Starting from the top, I wanted to create a somewhat large block header
that clearly states the name of the project, and the organization/location it is supposed to be
affiliated with. As far as color choices go, I tried to model them after the University of Pittsburghs
colors, as we are supposed to be representing Pittsburgh with this project (especially for
conference attendees who may have never been here before) and the first thing I think of when I
think Pittsburgh colors is the Universitys navy and tannish-gold colors (or black and gold in
reference to our sports teams, but in this case I feel the Universitys colors were more aesthetically
pleasing for use in this web design).
Directly underneath this header I wanted to showcase the intent of this project (the
restaurants) in a neatly organized and clean looking manner, so naturally I gravitated towards
placing them into a table. The table itself is stylized using CSS to add to the aesthetic factor and tie
it into the color theme of the webpage. It was also important that the table had built in functionality
that made sense and tied it into the rest of the project, which is why I implemented a background
color changing function that highlights the specific restaurant the user is looking at. This helps give
it a sense of locational/recognizable familiarity and ties it into the interactive SVG map below.
Because the SVG map was such an important aspect of this project, I wanted to make sure
it was large and detailed enough to be a good/accurate depiction of Pittsburgh, while at the same
time not being too large as to obstruct the users view of the table above. Originally the location
markers on the map were fully interactable, but this began to create problems near the completion
of the project as the markers would constantly move from their intended place between different
computers/viewing resolutions. Once I got it looking perfect on one computer, I would switch to
another (from my laptop to the computer lab at school, for instance) and the markers would be in
the wrong spot. In order to resolve this I ended up embedding them directly into the map file (which
itself is over 2000+ lines of code, and that is why it is linked to instead of simply built into the page)
so that they would always be in the correct position no matter what. While this did solve the
aforementioned problem, I was now faced with the challenge of restoring the original functionality
of the map. Thus, the map legend was born (placed on the left side). When hovered over, the
legend activates the highlight function for the table, and when clicked on, a new window opens with
directions to the respective restaurant. It was important to include the directions feature for people
who have never been to Pittsburgh before and/or for people who have never been to that specific
place before.
The restaurants themselves were carefully selected after a long session perusing websites
like Yelp and Urbanspoon, and of course Google Maps. I wanted to search for the highest/most
positively rated restaurants in Pittsburgh in order to offer up the best possible culinary
representation of our city. I also tried to come up with a diverse palette of restaurants, making sure
to create an offering that represented many different types of cuisine. At the same time, I needed
to make sure that they were within an acceptable walking distance from the Fairmont Hotel, and so
the list was narrowed down to the final six you see presented on the webpage.

Design Decisions 5

Conference Meal Planner

Software Instructions

Software Instructions 6

Conference Meal Planner

To use the map, simply hover over the legend (either the marker or the text itself) to
highlight the corresponding table element. Each location marker on the map is color
coordinated with its respective marker in the map legend.
To obtain directions to a specific restaurant, simply click on either the circular marker or the
text element itself and a window will open to a preconfigured Google Maps page with
walking directions to the restaurant.
To browse the menu for a specific restaurant, simply click on the View Website link
included in each table cell. They have been preconfigured to directly link to the restaurants
menu where possible, if not the link will open the home page where the menu can be found
from there.
The hours displayed for each restaurant in the table are completely automated and updated
dynamically depending on the day, and require no action from the user.
When the scripts are implemented to the webpage, it will grab the users information about
their names and phone numbers necessary to make a reservation, and automatically
behind the scenes get the online reservation upon select.

Software Instructions 7

Conference Meal Planner

Customer
Specifications

Customer Specifications 8

Conference Meal Planner

What exactly will be accomplished?


o Need to study the surrounding area around Fairmont to find possible venues.
o Restaurant data needs to be gathered and organized/analyzed.
Note needs to be taken of how they handle reservations, if they accept email
or not, only phone calls, etc.
Fast food should be noted but not prioritized
o Basic interface of webpage needs to be mapped/figured out, preliminary design
choices need be made (colors, spacing, organization, etc.). Nothing here will be set
in stone and may be changed later, but just to get a working template initialized for
testing/work.
o Interactive SVG map needs to be created and implemented into design
o Restaurant data needs to be linked to interactive map, some type of output area
needs to be created to test connectivity, function, etc.
o Directions/walking distance map data needs to be gathered and implemented into
the interactive map (maybe from Google maps?)
This data also needs to be added to the output in some way
o We need to decide on how we are going to script/automate all the processes of the
planner, such as data retrieval and output to the page, emailing the restaurants, etc.
o Any form elements/actions need to be decided upon, how they will work and interact
with the planner, what purposes they serve/how they will work behind the scenes
so to speak, and how they will fit aesthetically into the design
o Any required/necessary server side or client side processes need to be decided
upon (what function, to what end?, etc.), organized, and implemented into the
design.
o Finishing touches/refinement of the design will probably be close to one of the last
things we do, after we have made sure that every aspect is working as intended, and
we feel we are mostly complete with the project. This is where we will work to make
sure the project aesthetically pleasing, and insure that the design is intuitive and
understandable.
o Documentation of everything done, and by who needs to be maintained and
submitted at the end.

What is the time frame for completion of each step of the project?
o Interface template - Mid to End of March
o Scripts and such - Mid to End of April
o Interactive SVG map - Mid to End of April
o Documentation - End of April
o Polished Interface/Webpage - End of April
o Complete Project - Due Date

How will authentication be handled?


o Authentication for users will be dealt by giving a username and password followed
by an email address to send the user form the conference a confirmation email
signifying that they are recognized in the system and once they make their order for
reservation they will receive another confirmation email sending back the details of
their reservation went through.

When will testing begin?

Customer Specifications 9

Conference Meal Planner

ASAP

By what date will you know if training materials are needed?


o I do not think we have any need for training materials. This should not be a
complicated application, not to the point of it requiring training prior to use.
o This program may actually need some training on the side of the restaurants since
they will need to somehow respond with how many available reservations are left,
approving reservations that they will receive, etc.

What are your needs for graphics? When will those be done?
o I am not sure what kind of graphics we will need, if we do decide we want some. If
we do decide to add graphics it will probably be done by one of us, in
Photoshop/Illustrator? I dont foresee it taking very long if so, they would be done
quickly.
o For Graphics we will have to implement SVG and also an interactive map for the
customers.

Are there copyright or citations issues? How will those be handled?


o We may have to look into asking permission to use some of the images of the
venues (inside and/or outside)
o Make sure interactive SVG map does not infringe on Google Maps in anyway, must
be different enough
o Citations? TBD

How will data analysis, be it statistical or real-time, be handled?


o As attendees of the conference request reservations, emails will be sent to the
restaurants alerting them of the requested reservations asking if the restaurant can
accommodate the requested amount.

Who will do all these things? What will be done on the server-side, in what language(s), by
what date, and by whom?
o See document Conference Meal Planner Schedule

Is there any interests from the food vendors in working together with us in terms of an online
booking API or something of the sorts?
o After the program has been finished, it would not be difficult to adjust the program in
such a way to accommodate individual restaurants as opposed to working for
several restaurants at one time.

Could we interface with any food vendors existing websites to show menus on the fly via
scraping their website?
o We might be able to if their website has a plain text form of the menu. If there are
PDF versions, we may be able to devise an OCR system that can grab the text from
the menus, although this could become extremely messy.

Customer Specifications 10

Conference Meal Planner

Interface Issues

Interface Issues 11

Conference Meal Planner

PC vs. mobile interface issues- making sure the website looks the same (or not? maybe a
separate mobile version if needed), making sure all elements of the webpage are working
correctly such as forms, inputs/selections, dynamically generated content/output between
PC and mobile.
Cross platform/browser potential issues- making sure the website looks right and functions
correctly between different browsers and operating systems, for the same reasons as
detailed in the first bullet point.
Design issues- referring to the actual design and layout of the webpage. Making sure to
use web safe colors to ensure a consistent look between browsers (if thats what we are
going for), making sure that the layout is not rendered drastically different between
browsers (different spacing, elements not loading/rendering correctly, etc.), and testing
between browsers/OSs to correct any other unforeseen circumstances that may cause
unwanted aesthetic differences.
Audience issues- basically making sure that the structure and functionality of the webpage
is intuitive and easy to understand, especially because this is the first time something like
this is being implemented for a conference. At the same time we want to make sure the
interface is aesthetically pleasing and not overly-complicated, i.e. easy to figure out and
use.
Language to be coded in - Since this is the graphical web, and I know Dailey and everyone
in attendance is very big on SVG, would he want the front end of it to be coded in SVG? He
already said he is fine with PHP for the server side and backend stuff, as would most clients
be i presume since they would not see any PHP.
Usability Issues - Some restaurants dont take reservations. Some restaurants are not
technology friendly and only do in person reservations (very few in this day in age)*, some
restaurants only take reservations through phone call(most restaurants we will target I think
are more in this boat)* if that is the case we have a couple of options on what to do: We
could a.) Figure out a way to send an automated phone call (least plausible) b.) Talk to the
restaurants and fill them in on that specific weekend and send an automated email (more
plausible)* c.) Have them use the app for that weekend and possibly for future use.
Accessibility issues - This plays off the last one, because we might have to use different
options for different restaurants. We don't want the participants going to the conference
thinking they are limited to only the restaurants who take reservations over email, we want
to at least give them all the options and just emphasize that not all have reservations or
someway accommodate those places in the app. We will not find this out until we figure out
the details with each individual restaurants and talk to them and see what they offer, or are
willing to accommodate.

Interface Issues 12

Conference Meal Planner

Literature Review

Literature Review 13

Conference Meal Planner

Completing a meal planner would have its own challenges through the types of languages
that would be used, options to be allowed, and various other things. Some of the problems could
be mitigated by looking at similar pieces of software that were created. Some pieces of literature
will allow insight to other ideas and thoughts that we may not have come up with on our own.
Automating a system may make it seem like it would never need to be touched again, but The
reason people are still around working is because they need to be a knowledge worker engaging in
adaptive problem solving.[Vicente] Though having someone work on a project maintaining it after it
has been implemented may not be a full time thing, checking on it occasionally would be enforced.
Challenges in creating a project of this scope with relatively no experience in a task may had scope
creep come up on us at the end. Different teams have approached problems with their interface
design in different ways; the major one that has affected our group was the ability to give enough
time towards aspects of the program to make sure all of the functionality was working properly.
Once a piece of software has been created, maintenance will be required for the product
because of other technologies advancing such as web browsers and mobile devices. If
maintenance isnt happening the software will have a chance at not working or having security
holes in the future. The Conference Meal Planner would have to be constantly updated over time
to be sure that restaurants that update their system are still correct and work as intended in the
software. Some businesses may also stop serving customers by going out of business, making it
important to keep the program updated for the audience. Otherwise the misinformation may cause
customer complaints and problems making it harder to regain the audience after a headache such
like that, they may search the market to find one that has more support even if it means a more
poor performance.
A good interface allows a user to use a page effectively and efficiently without hassle.
Creating an interface forces the developer to think in terms more logical than what works for them,
they must think what works for the intended user. The user interface is an important part of a
computer, being a graphic interface or command line, they allow a user to interact with the
computer. The user interface is the part of a computer and its software that people can see, hear,
touch, talk to, or otherwise understand or direct.[Galitz] Benefits and features of an interface can
sway the opinion of people toward your product, while one with less benefits and features may
have less popularity and support. A good design allows for training costs to be lower, Support line
costs are lowered, employee satisfaction is increased, and the customers benefit from the
improved service they receive.[Galitz] The critical part is satisfying the customer, if a problem could
be resolved without having the customer call for help, that allows for more focus on critical issues
instead of mundane ones.
In creating the program/webpage, one idea that we had to optimize the user experience
was to have them enter in their own information so that it transitions from the main site, to the
reservation site. The main thing is that the user wouldnt have to enter their information twice, the
user would enter their information on both sites. Users shouldn't have to enter the same
information more than once. After all, computers are pretty good at remembering data. The only
reason users have to repeat themselves is because programmers get lazy and don't transfer the
answers from one part of the app to another.[Nielsen], this explains the reasoning behind our
decision because if a computer can do that functionality on its own, just use it and then the
audience would become more pleased.
An area that was focused on with our design was the idea to make sure that the user had
the ability to see where they wanted to go live, by selecting the restaurant, and then being able to
get directions to there. The ability to overlay a google map api onto the bottom of the webpage
would seem to be a lazy excuse to have it there although that functionality has been proved to
work in that application fine. The idea we had was to get an SVG map so that the user would be
able to zoom without the fear of pixelization and to try and expose more SVG out to others proving
Literature Review 14

Conference Meal Planner

its usefulness in different areas of web based graphics. Having SVG on the website allows us to
prevent scripting attacks due to the lack of scripting that can be involved with SVG, some graphics
are able to be animated through the language itself. This allows us to prevent Cross-Site Scripting
somewhat. XCC occurs when an attacker is capable of injecting a script, often Javascript, into the
output of a web application in such a way that it is executed in the client browser. This ordinarily
happens by locating a means of breaking out of a data context in HTML into a scripting context usually by injecting new HTML, Javascript strings or CSS markup.[Brady] This is an issue that is
hard to bypass because for a meal scheduling program there needs to be some automatization in
the program to make a better end user experience overall. The meal planner is using python,
HTML, Javascript, SVG, SQL, and php, meaning that there are exploits that can be found but
should be covered up through bug testing and having previous experience with that matter.
Developing a web application for mobile has its own challenges compared to a normal
page. The mobile version would have to be able to work in various operating systems and the
different versions of them, it would have to be optimized so that they do not encounter problems
with the SVG map or python scripting, and it would also not have a website that is minimized
making text unable to be read. Sometimes this means having to code in a different language to
accommodate the user. Developing a mobile version on such a short notice is a difficult task due to
the amount of bugs it may hold compared to the normal site, such as the map being
disproportionate or the page simply not being formatted correctly for a mobile device.
Creating a meal planner was a difficult task incorporating all the ideas that were in the group
into feasible tasks was tough. Developing a plan of action and giving the appropriate amount of
time to figure out the solutions to any problems that happened while creating the meal planner is
difficult. Looking into the different ways to research the project by eliminating basic user interface
problems allows for less problems to be fixed near completion. Executing a multi-step plan without
someone having previous experience in the matter allows for more of a learning experience such
as finding simple bugs or other problems that would streamline the process much more.

Literature Review 15

Conference Meal Planner

Bibliography
Vicente, Kim. "Ecological Interface Design: Progress and Challenges." Ecological Interface Design:
Progress and Challenges. Web. 1 May 2015.
<http://hfs.sagepub.com/content/44/1/62.short>.
Galitz, Wilbert. "The Essential Guide to User Interface Design." Google Books. Web. 1 May 2015.
<https://books.google.com/books?hl=en&lr=&id=Q3Xp_Awu49sC&oi=fnd&pg=PR5&dq=inte
rface design problems&ots=I_42GZdi00&sig=XQaslsNq1m0Ty4rkCzmm2wL3Xc#v=onepage&q=interface design problems&f=false>
Nielsen, Jakob. "Nielsen Norman Group." Top 10 Application-Design Mistakes. Web. 1 May 2015.
<http://www.nngroup.com/articles/top-10-application-design-mistakes/>..
Brady, Padriac. "Cross-Site Scripting (XSS)." Cross-Site Scripting (XSS) Survive The Deep
End: PHP Security. Web. 3 May 2015. <http://phpsecurity.readthedocs.org/en/latest/CrossSite-Scripting-(XSS).html>.

Literature Review 16

Conference Meal Planner

Literature Review
Documents List

Literature Review Documents List 17

Conference Meal Planner

Ecological Interface Design: Progress and Challenges


Vencente, Kim. "Ecological Interface Design: Progress and Challenges." Ecological Interface
Design: Progress and Challenges. Web. 4 May 2015.
<http://hfs.sagepub.com/content/44/1/62.short>.
The Essential Guide to User Interface Design
Galitz, Wilbert. "The Essential Guide to User Interface Design." Google Books. Web. 1 May 2015.
<https://books.google.com/books?hl=en&lr=&id=Q3Xp_Awu49sC&oi=fnd&pg=PR5&dq=interface
design problems&ots=I_42GZdi00&sig=XQaslsNq1m0Ty4rkCzmm2wL3Xc#v=onepage&q=interface design problems&f=false>.
User Interface Issues
"User Interface Issues." User Interface Issues. Web. 1 May 2015. <https://msdn.microsoft.com/enus/library/aa291877(v=vs.71).aspx>.
Top 10 Application design mistakes
Nielsen, Jakob. "Nielsen Norman Group." Top 10 Application-Design Mistakes. Web. 1 May 2015.
<http://www.nngroup.com/articles/top-10-application-design-mistakes/>.
Essential Mobile Interaction Design: Perfecting Interface Design in Mobile Apps
Banga, Cameron, and Josh Weinhold. "Essential Mobile Interaction Design: Perfecting Interface
Design in Mobile Apps." Web. 1 May 2015.
<http://proquest.safaribooksonline.com/book/programming/mobile/9780133563443/firstchapter>.
Understanding Mobile Human-Computer Interaction
Love, Steve. "Understanding Mobile Human Computer Interaction." KLN PASS User Login. Web. 1
May 2015. <http://site.ebrary.com/lib/sru/reader.action?docID=10138711&ppg=150>.
XCC Attacks
Brady, Padriac. "Cross-Site Scripting (XSS)." Cross-Site Scripting (XSS) Survive The Deep
End: PHP Security. Web. 4 May 2015. <http://phpsecurity.readthedocs.org/en/latest/Cross-SiteScripting-(XSS).html>.

Literature Review Documents List 18

Conference Meal Planner

HTML Source Code

HTML Source Code 19

Conference Meal Planner

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.

<!DOCTYPE html>
<html>
<head>
<title>427 final</title>
<style>
#h {
background-color:#000033;
color:papayawhip;
text-align:center;
text-shadow:2px 2px #000000;
padding:5px;
font-family:Arial;
font-size:30px;
}
#h2 {
background-color:#000033;
color:papayawhip;
text-align:center;
padding:20px;
font-family:Arial;
}
#t {
width:100%;
text-align:center;
padding:5px;
border:1px solid black;
}
p {
text-transform:uppercase;
font-family:Arial;
font-size:15px;
font-weight:bold;
}
svg {
margin-left:auto;
margin-right:auto;
display:block;
}
</style>
<script>
function highlight(x) {
var bgc=document.getElementById(x);
bgc.style.backgroundColor="salmon";
//alert(x);
}
function changeback(x) {
var bgc=document.getElementById(x);
bgc.style.backgroundColor="papayawhip";
}
function changeback2(x) {
var bgc=document.getElementById(x);
bgc.style.backgroundColor="white";
}
function directions(x) {
var bgc=document.getElementById(x);
if (bgc==r1){
window.open("http://goo.gl/RSm8eV");
}
else if (bgc==r2){
window.open("http://goo.gl/TNdVXf");
}

HTML Source Code 20

Conference Meal Planner

62.
else if (bgc==r3){
63.
window.open("http://goo.gl/sJSc21");
64.
}
65.
else if (bgc==r4){
66.
window.open("http://goo.gl/JjKt5B");
67.
}
68.
else if (bgc==r5){
69.
window.open("http://goo.gl/Kvmrel");
70.
}
71.
else if(bgc==r6){
72.
window.open("http://goo.gl/Fyvbxa");
73.
}
74. }
75. </script>
76. <script type="text/javascript">
77.
78. //****************Change the hours of the Restaurants depending on the day****************
79.
80.
var d = new Date() //Date
81.
var dday = d.getDate()
//Day
82.
83.
84.
//Capital Grille
85.
86.
87.
//Nola on the square
88.
89.
90.
//Seviche
91.
92.
93.
//Grit and Grace
94.
95.
96.
//Meat & Potatoes
97.
98.
99. </script>
100.
</head>
101.
<body>
102.
<div id="h"> Conference Meal Planner <br>
103.
<p>Fairmont Pittsburgh<br>
104.
510 Market St.<br>
105.
(412) 773-8800<br>September 23-26, 2015</p>
106.
</div><br>
107.
108.
<form name="f" method="POST" action="">
109.
<center><tspan style="font-style:italic;fontsize:20px;">Top rated local restaurants:</tspan></center>
110.
<table id="t"><tr>
111.
<!-- Sienna Sulla -->
112.
<td id="r1" bgcolor="papayawhip" width="20%"><p>Sienna Sulla Piazza</p>22 Market Square
<br>(412) 2816363<br>Cuisine: Italian<br><a href="http://siennapgh.com/sulla/menu/">View Website</a><br>Onl
ine Reservation Limit: 4<br>Hours: <label id="lblSiennaSulla">hey</label><br><input type="butt
on" value="Select" id="btn_SiennaSulla" onclick="./Automate_GWC.py"></td>
113.
114.
<!-- Change the Time -->
115.
<script type="text/javascript">
116.
var ss_times = document.getElementById("lblSiennaSulla");
117.
if(day == 23 || day == 24){

HTML Source Code 21

Conference Meal Planner

118.
ss_times.innerHTML="11:00am - 10:00pm"
119.
} else if(day == 25){
120.
ss_times.innerHTML="11:00am - 11:00pm"
121.
}else {
122.
ss_times.innerHTML="12:00pm - 11:00pm"
123.
}
124.
</script>
125.
126.
<!-- THe Capital Grille -->
127.
<td id="r2" width="20%"><p>The Capital Grille</p>301 Fifth Avenue<br>(412) 3389100<br>Cuisine: Steakhouse/American<br><a href="https://www.thecapitalgrille.com/menu/lunch/p
a/pittsburgh/8031">View Website</a><br>Online Reservation Limit: 12<br>Hours: <label id="lblCa
pGrille">hey</label><br><input type="button" value="Select" id="btn_CapGrille"></td>
128.
129.
<!-- Change the Time -->
130.
<script type="text/javascript">
131.
var cg_times = document.getElementById("lblCapGrille");
132.
if(day == 23 || day == 24){
133.
cg_times.innerHTML="11:00am - 10:00pm"
134.
} else if(day == 25){
135.
cg_times.innerHTML="11:00am - 11:00pm"
136.
}else {
137.
cg_times.innerHTML="5:00pm - 11:00pm"
138.
}
139.
</script>
140.
141.
<!-- Nola on the Square -->
142.
<td id="r3" bgcolor="papayawhip" width="20%"><p>NOLA on the Square</p>24 Market Square<
br>(412) 4719100<br>Cuisine: Cajun/Creole<br><a href="http://www.nolaonthesquare.com/">View Website</a><br
>Online Reservation Limit: 4<br>Hours: <label id="lblNola">hey</label><br><input type="button"
value="Select" id="btn_Nola"></td>
143.
144.
<!-- Change the Time -->
145.
<script type="text/javascript">
146.
var nola_times = document.getElementById("lblNola");
147.
if(day == 23 || day == 24){
148.
nola_times.innerHTML="11:00am - 11:00pm"
149.
} else if(day == 25){
150.
nola_times.innerHTML="11:00am - 11:00pm"
151.
}else {
152.
nola_times.innerHTML="11:00am - 11:00pm"
153.
}
154.
</script>
155.
156.
<!-- New Row -->
157.
</tr><tr>
158.
<!--->
159.
160.
<!-- Seviche -->
161.
<td id="r4" width="20%"><p>Seviche</p>930 Penn Avenue<br>(412) 6973120<br>Cuisine: Latin American/Cuban<br><a href="http://www.seviche.com/">View Website</a><br
>Online Reservation Limit: 6<br>Hours: <label id="lblSeviche">hey</label><br><input type="butt
on" value="Select" id="btn_Seviche"></td>
162.
163.
<!-- Change the Time -->
164.
<script type="text/javascript">
165.
var seviche_times = document.getElementById("lblSeviche");
166.
if(day == 23 || day == 24){
167.
seviche_times.innerHTML="5:00pm - 12:00am"
168.
} else if(day == 25){

HTML Source Code 22

Conference Meal Planner

169.
seviche_times.innerHTML="5:00pm - 12:00am"
170.
}else {
171.
seviche_times.innerHTML="5:00pm - 12:00am"
172.
}
173.
</script>
174.
175.
<!-- Grit and Grace -->
176.
<td id="r5" bgcolor="papayawhip" width="20%"><p>Grit & Grace</p>535 Liberty Avenue<br>(
412) 2814748<br>Cuisine: Asian/International<br><a href="http://gritandgracepgh.com/menu/">View Websit
e</a><br>Online Reservation Limit: 6<br>Hours: <label id="lblGG">hey</label><br><input type="b
utton" value="Select" id="btn_GritGrace"></td>
177.
178.
<!-- Change the Time -->
179.
<script type="text/javascript">
180.
var gg_times = document.getElementById("lblGG");
181.
if(day == 23 || day == 24){
182.
gg_times.innerHTML="11:30am - 11:00pm"
183.
} else if(day == 25){
184.
gg_times.innerHTML="11:30am - 12:00am"
185.
}else {
186.
gg_times.innerHTML="4:00pm - 12:00am"
187.
}
188.
</script>
189.
190.
191.
<!-- Meat & Potatoes -->
192.
<td id="r6" width="20%"><p>Meat & Potatoes</p>649 Penn Avenue<br>(412) 3257007<br>Cuisine: Gastropub<br><a href="http://meatandpotatoespgh.com/">View Website</a><br>Onl
ine Reservation Limit: 6<br>Hours(Lunch): <label id="lblMPlunch">hey</label>(Dinner)<label id=
"lblMPdinner">0</label> <br><input type="button" value="Select" id="btn_MandP"></td>
193.
194.
<!-- Change the Time -->
195.
<script type="text/javascript">
196.
197.
//LUNCH
198.
var mp_times = document.getElementById("lblMPlunch");
199.
if(day == 23 || day == 24){
200.
mp_times.innerHTML="11:30am - 2:00pm "
201.
} else if(day == 25){
202.
mp_times.innerHTML="11:30am - 2:00pm "
203.
}else {
204.
mp_times.innerHTML="10:30am - 2:00pm "
205.
}
206.
207.
//DINNER
208.
var mp_din_times = document.getElementById("lblMPdinner");
209.
if(day == 23 || day == 24){
210.
mp_din_times.innerHTML="5:00pm - 11:00pm "
211.
} else if(day == 25){
212.
mp_din_times.innerHTML="5:00pm - 12:00am "
213.
}else {
214.
mp_din_times.innerHTML="5:00pm - 12:00am "
215.
}
216.
217.
</script>
218.
219.
</tr>
220.
</table><br>
221.
222.
<svg height="605" width="100%">

HTML Source Code 23

Conference Meal Planner

223.
224.
<image xlink:href="http://obsidian.sru.edu/~jlb2592/pittsburghmap2.svg" x="20%" y="0" h
eight="600px" width="800px"/>
225.
226.
<circle cx="4%" cy="10%" r="6" stroke="black" strokewidth="1" fill="red" id="fairmont" onclick="window.open('http://www.fairmont.com/pittsburgh/')
;"/><text x="5%" y="11%" onclick="window.open('http://www.fairmont.com/pittsburgh/');">Fairmon
t</text>
227.
<circle cx="4%" cy="15%" r="5" stroke="black" strokewidth="1" fill="orange" id="sienna" onmouseover="highlight('r1');" onmouseout="changeback('r1'
);" onclick="directions('r1');"/><text x="5%" y="16%" onmouseover="highlight('r1');" onmouseou
t="changeback('r1');" onclick="directions('r1');">Sienna Sulla Piazza</text>
228.
<circle cx="4%" cy="20%" r="5" stroke="black" strokewidth="1" fill="yellow" id="capital" onmouseover="highlight('r2');" onmouseout="changeback2('r
2');" onclick="directions('r2');"/><text x="5%" y="21%" onmouseover="highlight('r2');" onmouse
out="changeback2('r2');" onclick="directions('r2');">The Capital Grille</text>
229.
<circle cx="4%" cy="25%" r="5" stroke="black" strokewidth="1" fill="green" id="nola" onmouseover="highlight('r3');" onmouseout="changeback('r3');"
onclick="directions('r3');"/><text x="5%" y="26%" onmouseover="highlight('r3');" onmouseout="
changeback('r3');" onclick="directions('r3');">Nola on the Square</text>
230.
<circle cx="4%" cy="30%" r="5" stroke="black" strokewidth="1" fill="blue" id="seviche" onmouseover="highlight('r4');" onmouseout="changeback2('r4'
);" onclick="directions('r4');"/><text x="5%" y="31%" onmouseover="highlight('r4');" onmouseou
t="changeback2('r4');" onclick="directions('r4');">Seviche</text>
231.
<circle cx="4%" cy="35%" r="5" stroke="black" strokewidth="1" fill="indigo" id="grit" onmouseover="highlight('r5');" onmouseout="changeback('r5');
" onclick="directions('r5');"/><text x="5%" y="36%" onmouseover="highlight('r5');" onmouseout=
"changeback('r5');" onclick="directions('r5');">Grit & Grace</text>
232.
<circle cx="4%" cy="40%" r="5" stroke="black" strokewidth="1" fill="violet" id="meat" onmouseover="highlight('r6');" onmouseout="changeback2('r6')
;" onclick="directions('r6');"/><text x="5%" y="41%" onmouseover="highlight('r6');" onmouseout
="changeback2('r6');" onclick="directions('r6');">Meat & Potatoes</text>
233.
234.
</svg>
235.
236.
<br><div id="h2"></div>
237.
238.
</form>
239.
240.
</body>
241.
</html>

HTML Source Code 24

Conference Meal Planner

PHP Source Code

PHP Source Code 25

Conference Meal Planner

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.

<!DOCTYPE html>
<?php
$servername = "localhost";
$username = "kdm1004";
$password = "srurocks";
$DB = "427final";
$cxn = new mysqli($servername, $username, $password, $DB);
// Check connection
if ($cxn->connect_error) {
die("Connection failed: " . $cxn->connect_error);
}
$sql = "SELECT name, reservations FROM restaurants";
$result = mysqli_query($cxn, $sql);
$i=0;
while($row = mysqli_fetch_assoc($result)) {
$RName[$i] = $row["name"];
$RReserv[$i] = $row["reservations"];
$i++;
}
$cxn->close();
?>
<html>
<head>
<title>427 final</title>
<style>
#h {
background-color:#000033;
color:papayawhip;
text-align:center;
text-shadow:2px 2px #000000;
padding:5px;
font-family:Arial;
font-size:30px;
}
#h2 {
background-color:#000033;
color:papayawhip;
text-align:center;
padding:15px;
font-family:Arial;
}
#t {
width:100%;
text-align:center;
padding:5px;
border:1px solid black;
}
p {
text-transform:uppercase;
font-family:Arial;
font-size:15px;
font-weight:bold;
}
svg {
margin-left:auto;

PHP Source Code 26

Conference Meal Planner

62.
margin-right:auto;
63.
display:block;
64. }
65. </style>
66. <script>
67. function highlight(x) {
68.
var bgc=document.getElementById(x);
69.
bgc.style.backgroundColor="salmon";
70.
//alert(x);
71. }
72. function changeback(x) {
73.
var bgc=document.getElementById(x);
74.
bgc.style.backgroundColor="papayawhip";
75. }
76. function changeback2(x) {
77.
var bgc=document.getElementById(x);
78.
bgc.style.backgroundColor="white";
79. }
80. function directions(x) {
81.
var bgc=document.getElementById(x);
82.
if (bgc==r1){
83.
window.open("http://goo.gl/RSm8eV");
84.
}
85.
else if (bgc==r2){
86.
window.open("http://goo.gl/TNdVXf");
87.
}
88.
else if (bgc==r3){
89.
window.open("http://goo.gl/sJSc21");
90.
}
91.
else if (bgc==r4){
92.
window.open("http://goo.gl/JjKt5B");
93.
}
94.
else if (bgc==r5){
95.
window.open("http://goo.gl/Kvmrel");
96.
}
97.
else if(bgc==r6){
98.
window.open("http://goo.gl/Fyvbxa");
99.
}
100.
}
101.
</script>
102.
<script type="text/javascript">
103.
104.
//****************Change the hours of the Restaurants depending on the day*************
***
105.
106.
var d = new Date() //Date
107.
var day = d.getDate()
//Day
108.
109.
110.
//Capital Grille
111.
112.
113.
//Nola on the square
114.
115.
116.
//Seviche
117.
118.
119.
//Grit and Grace
120.
121.

PHP Source Code 27

Conference Meal Planner

122.
//Meat & Potatoes
123.
124.
125.
</script>
126.
</head>
127.
<body>
128.
<div id="h"> Conference Meal Planner <br>
129.
<p>Fairmont Pittsburgh<br>
130.
510 Market St.<br>
131.
(412) 773-8800<br>September 23-26, 2015</p>
132.
</div><br>
133.
134.
<form name="f" method="POST" action="">
135.
<center><tspan style="font-style:italic;fontsize:20px;">Top rated local restaurants:</tspan></center>
136.
<table id="t"><tr>
137.
<!-- Sienna Sulla -->
138.
<td id="r1" bgcolor="papayawhip" width="20%"><p>Sienna Sulla Piazza</p>22 Market Square
<br>(412) 2816363<br>Cuisine: Italian<br><a href="http://siennapgh.com/sulla/menu/">View Website</a><br>Onl
ine Reservation Limit: 4<br>Number of Reservations: <?php echo $RReserv[0]; ?><br>Hours: <labe
l id="lblSiennaSulla">hey</label><br><input type="button" value="Select" id="btn_SiennaSulla"
onclick="formcreateSienna()"></td>
139.
140.
<!-- Change the Time -->
141.
<script type="text/javascript">
142.
var ss_times = document.getElementById("lblSiennaSulla");
143.
if(day == 23 || day == 24){
144.
ss_times.innerHTML="11:00am - 10:00pm"
145.
} else if(day == 25){
146.
ss_times.innerHTML="11:00am - 11:00pm"
147.
}else {
148.
ss_times.innerHTML="12:00pm - 11:00pm"
149.
}
150.
//kyle code start
151.
function formcreateSienna(){
152.
var r=document.getElementById("btn_SiennaSulla")
153.
r.style.visibility= 'hidden';
154.
ss_times.innerHTML+="<br><form id='ssform'>"
155.
ss_times.innerHTML+="Number of Reservations: "
156.
ss_times.innerHTML+="<select id='reservations'><option value='1'>1</option><opt
ion value='2'>2</option><option value='3'>3</option><option value='4'>4</option></select>"
157.
ss_times.innerHTML+="<br>Time: <input type=text id='time'>"
158.
ss_times.innerHTML+="<br>Name: <input type=text id='fullname'>"
159.
ss_times.innerHTML+="<br>Phone: <input type=text id='phone'>"
160.
ss_times.innerHTML+="<br><input type='submit' value='Submit'>"
161.
ss_times.innerHTML+="</form>"
162.
}
163.
//kyle code end
164.
</script>
165.
166.
<!-- THe Capital Grille -->
167.
<td id="r2" width="20%"><p>The Capital Grille</p>301 Fifth Avenue<br>(412) 3389100<br>Cuisine: Steakhouse/American<br><a href="https://www.thecapitalgrille.com/menu/lunch/p
a/pittsburgh/8031">View Website</a><br>Online Reservation Limit: 12<br>Number of Reservations:
<?php echo $RReserv[1]; ?><br>Hours: <label id="lblCapGrille">hey</label><br><input type="but
ton" value="Select" id="btn_CapGrille" onclick="formcreateCap()"></td>
168.
169.
<!-- Change the Time -->
170.
<script type="text/javascript">
171.
var cg_times = document.getElementById("lblCapGrille");

PHP Source Code 28

Conference Meal Planner

172.
if(day == 23 || day == 24){
173.
cg_times.innerHTML="11:00am - 10:00pm"
174.
} else if(day == 25){
175.
cg_times.innerHTML="11:00am - 11:00pm"
176.
}else {
177.
cg_times.innerHTML="5:00pm - 11:00pm"
178.
}
179.
//kyle code start
180.
function formcreateCap(){
181.
var r=document.getElementById("btn_CapGrille")
182.
r.style.visibility= 'hidden';
183.
cg_times.innerHTML+="<br><form id='grilleform'>"
184.
cg_times.innerHTML+="Number of Reservations: "
185.
cg_times.innerHTML+="<select id='reservations'><option value='1'>1</option><opt
ion value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value=
'5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</opt
ion><option value='9'>9</option><option value='10'>10</option><option value='11'>11</option><o
ption value='12'>12</option></select>"
186.
cg_times.innerHTML+="<br>Time: <input type=text id='time'>"
187.
cg_times.innerHTML+="<br>Name: <input type=text id='fullname'>"
188.
cg_times.innerHTML+="<br>Phone: <input type=text id='phone'>"
189.
cg_times.innerHTML+="<br><input type='submit' value='Submit'>"
190.
cg_times.innerHTML+="</form>"
191.
}
192.
//kyle code end
193.
</script>
194.
195.
<!-- Nola on the Square -->
196.
<td id="r3" bgcolor="papayawhip" width="20%"><p>NOLA on the Square</p>24 Market Square<
br>(412) 4719100<br>Cuisine: Cajun/Creole<br><a href="http://www.nolaonthesquare.com/">View Website</a><br
>Online Reservation Limit: 4<br>Number of Reservations: <?php echo $RReserv[2]; ?><br>Hours: <
label id="lblNola">hey</label><br><input type="button" value="Select" id="btn_Nola" onclick="f
ormcreateNola()"></td>
197.
198.
<!-- Change the Time -->
199.
<script type="text/javascript">
200.
var nola_times = document.getElementById("lblNola");
201.
if(day == 23 || day == 24){
202.
nola_times.innerHTML="11:00am - 11:00pm"
203.
} else if(day == 25){
204.
nola_times.innerHTML="11:00am - 11:00pm"
205.
}else {
206.
nola_times.innerHTML="11:00am - 11:00pm"
207.
}
208.
//kyle code start
209.
function formcreateNola(){
210.
var r=document.getElementById("btn_Nola")
211.
r.style.visibility= 'hidden';
212.
nola_times.innerHTML+="<br><form id='nolaform'>"
213.
nola_times.innerHTML+="Number of Reservations: "
214.
nola_times.innerHTML+="<select id='reservations'><option value='1'>1</option><o
ption value='2'>2</option><option value='3'>3</option><option value='4'>4</option></select>"
215.
nola_times.innerHTML+="<br>Time: <input type=text id='time'>"
216.
nola_times.innerHTML+="<br>Name: <input type=text id='fullname'>"
217.
nola_times.innerHTML+="<br>Phone: <input type=text id='phone'>"
218.
nola_times.innerHTML+="<br><input type='submit' value='Submit'>"
219.
nola_times.innerHTML+="</form>"
220.
}
221.
//kyle code end
222.
</script>

PHP Source Code 29

Conference Meal Planner

223.
224.
<!-- New Row -->
225.
</tr><tr>
226.
<!--->
227.
228.
<!-- Seviche -->
229.
<td id="r4" width="20%"><p>Seviche</p>930 Penn Avenue<br>(412) 6973120<br>Cuisine: Latin American/Cuban<br><a href="http://www.seviche.com/">View Website</a><br
>Online Reservation Limit: 6<br>Number of Reservations: <?php echo $RReserv[3]; ?><br>Hours: <
label id="lblSeviche">hey</label><br><input type="button" value="Select" id="btn_Seviche" oncl
ick="formcreateSeviche()"></td>
230.
231.
<!-- Change the Time -->
232.
<script type="text/javascript">
233.
var seviche_times = document.getElementById("lblSeviche");
234.
if(day == 23 || day == 24){
235.
seviche_times.innerHTML="5:00pm - 12:00am"
236.
} else if(day == 25){
237.
seviche_times.innerHTML="5:00pm - 12:00am"
238.
}else {
239.
seviche_times.innerHTML="5:00pm - 12:00am"
240.
}
241.
//kyle code start
242.
function formcreateSeviche(){
243.
var r=document.getElementById("btn_Seviche")
244.
r.style.visibility= 'hidden';
245.
seviche_times.innerHTML+="<br><form id='sevicheform'>"
246.
seviche_times.innerHTML+="Number of Reservations: "
247.
seviche_times.innerHTML+="<select id='reservations'><option value='1'>1</option
><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option v
alue='5'>5</option><option value='6'>6</option></select>"
248.
seviche_times.innerHTML+="<br>Time: <input type=text id='time'>"
249.
seviche_times.innerHTML+="<br>Name: <input type=text id='fullname'>"
250.
seviche_times.innerHTML+="<br>Phone: <input type=text id='phone'>"
251.
seviche_times.innerHTML+="<br><input type='submit' value='Submit'>"
252.
seviche_times.innerHTML+="</form>"
253.
}
254.
//kyle code end
255.
</script>
256.
257.
<!-- Grit and Grace -->
258.
<td id="r5" bgcolor="papayawhip" width="20%"><p>Grit & Grace</p>535 Liberty Avenue<br>(
412) 2814748<br>Cuisine: Asian/International<br><a href="http://gritandgracepgh.com/menu/">View Websit
e</a><br>Online Reservation Limit: 6<br>Number of Reservations: <?php echo $RReserv[4]; ?><br>
Hours: <label id="lblGG">hey</label><br><input type="button" value="Select" id="btn_GritGrace"
onclick="formcreateGG()"></td>
259.
260.
<!-- Change the Time -->
261.
<script type="text/javascript">
262.
var gg_times = document.getElementById("lblGG");
263.
if(day == 23 || day == 24){
264.
gg_times.innerHTML="11:30am - 11:00pm"
265.
} else if(day == 25){
266.
gg_times.innerHTML="11:30am - 12:00am"
267.
}else {
268.
gg_times.innerHTML="4:00pm - 12:00am"
269.
}
270.
//kyle code start
271.
function formcreateGG(){
272.
var r=document.getElementById("btn_GritGrace")

PHP Source Code 30

Conference Meal Planner

273.
r.style.visibility= 'hidden';
274.
gg_times.innerHTML+="<br><form id='ggform'>"
275.
gg_times.innerHTML+="Number of Reservations: "
276.
gg_times.innerHTML+="<select id='reservations'><option value='1'>1</option><opt
ion value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value=
'5'>5</option><option value='6'>6</option></select>"
277.
gg_times.innerHTML+="<br>Time: <input type=text id='time'>"
278.
gg_times.innerHTML+="<br>Name: <input type=text id='fullname'>"
279.
gg_times.innerHTML+="<br>Phone: <input type=text id='phone'>"
280.
gg_times.innerHTML+="<br><input type='submit' value='Submit'>"
281.
gg_times.innerHTML+="</form>"
282.
}
283.
//kyle code end
284.
</script>
285.
286.
287.
<!-- Meat & Potatoes -->
288.
<td id="r6" width="20%"><p>Meat & Potatoes</p>649 Penn Avenue<br>(412) 3257007<br>Cuisine: Gastropub<br><a href="http://meatandpotatoespgh.com/">View Website</a><br>Onl
ine Reservation Limit: 6<br>Number of Reservations: <?php echo $RReserv[5]; ?><br>Hours(Lunch)
: <label id="lblMPlunch">hey</label>(Dinner)<label id="lblMPdinner">0</label> <br><input type=
"button" value="Select" id="btn_MandP" onclick="formcreateMP()"></td>
289.
290.
<!-- Change the Time -->
291.
<script type="text/javascript">
292.
293.
//LUNCH
294.
var mp_times = document.getElementById("lblMPlunch");
295.
if(day == 23 || day == 24){
296.
mp_times.innerHTML="11:30am - 2:00pm "
297.
} else if(day == 25){
298.
mp_times.innerHTML="11:30am - 2:00pm "
299.
}else {
300.
mp_times.innerHTML="10:30am - 2:00pm "
301.
}
302.
303.
//DINNER
304.
var mp_din_times = document.getElementById("lblMPdinner");
305.
if(day == 23 || day == 24){
306.
mp_din_times.innerHTML="5:00pm - 11:00pm "
307.
} else if(day == 25){
308.
mp_din_times.innerHTML="5:00pm - 12:00am "
309.
}else {
310.
mp_din_times.innerHTML="5:00pm - 12:00am "
311.
}
312.
//kyle code start
313.
function formcreateMP(){
314.
var r=document.getElementById("btn_MandP")
315.
r.style.visibility= 'hidden';
316.
mp_din_times.innerHTML+="<br><form id='mpform'>"
317.
mp_din_times.innerHTML+="Number of Reservations: "
318.
mp_din_times.innerHTML+="<select id='reservations'><option value='1'>1</option>
<option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option va
lue='5'>5</option><option value='6'>6</option></select>"
319.
mp_din_times.innerHTML+="<br>Time: <input type=text id='time'>"
320.
mp_din_times.innerHTML+="<br>Name: <input type=text id='fullname'>"
321.
mp_din_times.innerHTML+="<br>Phone: <input type=text id='phone'>"
322.
mp_din_times.innerHTML+="<br><input type='submit' value='Submit'>"
323.
mp_din_times.innerHTML+="</form>"
324.
}
325.
//kyle code end

PHP Source Code 31

Conference Meal Planner

326.
</script>
327.
328.
</tr>
329.
</table><br>
330.
331.
<svg height="605" width="100%">
332.
333.
<image xlink:href="http://obsidian.sru.edu/~jlb2592/pittsburghmap2.svg" x="20%" y="0" h
eight="600px" width="800px"/>
334.
335.
<circle cx="4%" cy="10%" r="6" stroke="black" strokewidth="1" fill="red" id="fairmont" onclick="window.open('http://www.fairmont.com/pittsburgh/')
;"/><text x="5%" y="11%" onclick="window.open('http://www.fairmont.com/pittsburgh/');">Fairmon
t</text>
336.
<circle cx="4%" cy="15%" r="5" stroke="black" strokewidth="1" fill="orange" id="sienna" onmouseover="highlight('r1');" onmouseout="changeback('r1'
);" onclick="directions('r1');"/><text x="5%" y="16%" onmouseover="highlight('r1');" onmouseou
t="changeback('r1');" onclick="directions('r1');">Sienna Sulla Piazza</text>
337.
<circle cx="4%" cy="20%" r="5" stroke="black" strokewidth="1" fill="yellow" id="capital" onmouseover="highlight('r2');" onmouseout="changeback2('r
2');" onclick="directions('r2');"/><text x="5%" y="21%" onmouseover="highlight('r2');" onmouse
out="changeback2('r2');" onclick="directions('r2');">The Capital Grille</text>
338.
<circle cx="4%" cy="25%" r="5" stroke="black" strokewidth="1" fill="green" id="nola" onmouseover="highlight('r3');" onmouseout="changeback('r3');"
onclick="directions('r3');"/><text x="5%" y="26%" onmouseover="highlight('r3');" onmouseout="
changeback('r3');" onclick="directions('r3');">Nola on the Square</text>
339.
<circle cx="4%" cy="30%" r="5" stroke="black" strokewidth="1" fill="blue" id="seviche" onmouseover="highlight('r4');" onmouseout="changeback2('r4'
);" onclick="directions('r4');"/><text x="5%" y="31%" onmouseover="highlight('r4');" onmouseou
t="changeback2('r4');" onclick="directions('r4');">Seviche</text>
340.
<circle cx="4%" cy="35%" r="5" stroke="black" strokewidth="1" fill="indigo" id="grit" onmouseover="highlight('r5');" onmouseout="changeback('r5');
" onclick="directions('r5');"/><text x="5%" y="36%" onmouseover="highlight('r5');" onmouseout=
"changeback('r5');" onclick="directions('r5');">Grit & Grace</text>
341.
<circle cx="4%" cy="40%" r="5" stroke="black" strokewidth="1" fill="violet" id="meat" onmouseover="highlight('r6');" onmouseout="changeback2('r6')
;" onclick="directions('r6');"/><text x="5%" y="41%" onmouseover="highlight('r6');" onmouseout
="changeback2('r6');" onclick="directions('r6');">Meat & Potatoes</text>
342.
343.
</svg>
344.
345.
<div id="h2"><input type="submit">
346.
</div>
347.
348.
</form>
349.
350.
</body>
351.
</html>

PHP Source Code 32

Conference Meal Planner

Python Scripts

Python Scripts 33

Conference Meal Planner

Sienna Sulla Piazza


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.

# -*- coding: utf-8 -*from selenium import webdriver


from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class Sienna(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://www.opentable.com/"
self.verificationErrors = []
self.accept_next_alert = True

def test_the_capital_grille(self):
driver = self.driver
driver.get(self.base_url + "sienna-pittsburgh?DateTime=2015-0501 14%3A00&Covers=4&OnlyOffers=false&RestaurantIDs=69259&MetroId=62")
21.
Select(driver.find_element_by_name("Select_1")).select_by_visible_text("4 people")
22.
driver.find_element_by_name("datepicker").click()
23.
time.sleep(2)
24.
Select(driver.find_element_by_name("Select_0")).select_by_visible_text("9:00 PM")
25.
26.
#driver.find_element_by_id("autocompleteWithPlaces").send_keys("The Capital Grille Pittsburgh") --> Search Bar
27.
28.
driver.find_element_by_css_selector("input.button.dtp-picker-button").click()
29.
driver.find_element_by_xpath("(//a[contains(text(),'9:00 PM')])[2]").click()
30.
time.sleep(5)
31.
driver.find_element_by_id("firstName").clear()
32.
driver.find_element_by_id("firstName").send_keys("first")
33.
driver.find_element_by_id("lastName").clear()
34.
driver.find_element_by_id("lastName").send_keys("Last")
35.
time.sleep(2)
36.
driver.find_element_by_id("phoneNumber").clear()
37.
driver.find_element_by_id("phoneNumber").send_keys("4127779999")
38.
driver.find_element_by_id("email").clear()
39.
driver.find_element_by_id("email").send_keys("email")
40.
driver.find_element_by_id("completeReservation").click()
41.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
42.
#driver.find_element_by_css_selector("li.locu-tab.").click()
43.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
44.
45.
def is_element_present(self, how, what):
46.
try: self.driver.find_element(by=how, value=what)
47.
except NoSuchElementException, e: return False
48.
return True
49.
50.
def is_alert_present(self):
51.
try: self.driver.switch_to_alert()
52.
except NoAlertPresentException, e: return False
53.
return True
54.

Python Scripts 34

Conference Meal Planner

55.
def close_alert_and_get_its_text(self):
56.
try:
57.
alert = self.driver.switch_to_alert()
58.
alert_text = alert.text
59.
if self.accept_next_alert:
60.
alert.accept()
61.
else:
62.
alert.dismiss()
63.
return alert_text
64.
finally: self.accept_next_alert = True
65.
66.
def tearDown(self):
67.
self.driver.quit()
68.
self.assertEqual([], self.verificationErrors)
69.
70. if __name__ == "__main__":
71.
unittest.main()

Python Scripts 35

Conference Meal Planner

Seviche
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.

# -*- coding: utf-8 -*from selenium import webdriver


from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class Seviche(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://rez.opentable.com/"
self.verificationErrors = []
self.accept_next_alert = True
def test_seviche(self):
driver = self.driver
driver.get(self.base_url + "reservation/start/1636?source=selfhost&widget_type=multida
y&day=20140905&seating_time=1020&commit=Go")
time.sleep(10)
Select(driver.find_element_by_id("size")).select_by_visible_text("3 people")
Select(driver.find_element_by_id("seating_time")).select_by_visible_text("7:30 pm")
driver.find_element_by_name("commit").click()
driver.find_element_by_name("commit").click()
driver.find_element_by_id("user_first_name").clear()
driver.find_element_by_id("user_first_name").send_keys("First")
driver.find_element_by_id("user_last_name").clear()
driver.find_element_by_id("user_last_name").send_keys("Last")
driver.find_element_by_id("user_phone").clear()
driver.find_element_by_id("user_phone").send_keys("412-999-9999")
driver.find_element_by_id("user_email").clear()
driver.find_element_by_id("user_email").send_keys("Email")
driver.find_element_by_name("commit").click()
driver.find_element_by_id("user_email").clear()
driver.find_element_by_id("user_email").send_keys("email@email.com")
#driver.find_element_by_name("commit").click()
#driver.find_element_by_name("commit").click()
def is_element_present(self, how, what):
try: self.driver.find_element(by=how, value=what)
except NoSuchElementException, e: return False
return True
def is_alert_present(self):
try: self.driver.switch_to_alert()
except NoAlertPresentException, e: return False
return True
def close_alert_and_get_its_text(self):
try:
alert = self.driver.switch_to_alert()
alert_text = alert.text
if self.accept_next_alert:
alert.accept()
else:
alert.dismiss()

Python Scripts 36

Conference Meal Planner

58.
return alert_text
59.
finally: self.accept_next_alert = True
60.
61.
def tearDown(self):
62.
self.driver.quit()
63.
self.assertEqual([], self.verificationErrors)
64.
65. if __name__ == "__main__":
66.
unittest.main()

Python Scripts 37

Conference Meal Planner

Nola on the Square


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.

# -*- coding: utf-8 -*from selenium import webdriver


from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class Nola(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://www.opentable.com/"
self.verificationErrors = []
self.accept_next_alert = True

def test_the_capital_grille(self):
driver = self.driver
driver.get(self.base_url + "nola-on-the-square?DateTime=2015-0501%2014%3A00&Covers=4&OnlyOffers=false&RestaurantIDs=59623&MetroId=62")
21.
Select(driver.find_element_by_name("Select_1")).select_by_visible_text("4 people")
22.
driver.find_element_by_name("datepicker").click()
23.
Select(driver.find_element_by_name("Select_0")).select_by_visible_text("9:30 PM")
24.
25.
#driver.find_element_by_id("autocompleteWithPlaces").send_keys("The Capital Grille Pittsburgh") --> Search Bar
26.
27.
driver.find_element_by_css_selector("input.button.dtp-picker-button").click()
28.
driver.find_element_by_xpath("(//a[contains(text(),'9:30 PM')])[2]").click()
29.
time.sleep(5)
30.
driver.find_element_by_id("firstName").clear()
31.
driver.find_element_by_id("firstName").send_keys("first")
32.
driver.find_element_by_id("lastName").clear()
33.
driver.find_element_by_id("lastName").send_keys("Last")
34.
driver.find_element_by_id("phoneNumber").clear()
35.
driver.find_element_by_id("phoneNumber").send_keys("4127779999")
36.
driver.find_element_by_id("email").clear()
37.
driver.find_element_by_id("email").send_keys("email")
38.
driver.find_element_by_id("completeReservation").click()
39.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
40.
#driver.find_element_by_css_selector("li.locu-tab.").click()
41.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
42.
43.
def is_element_present(self, how, what):
44.
try: self.driver.find_element(by=how, value=what)
45.
except NoSuchElementException, e: return False
46.
return True
47.
48.
def is_alert_present(self):
49.
try: self.driver.switch_to_alert()
50.
except NoAlertPresentException, e: return False
51.
return True
52.
53.
def close_alert_and_get_its_text(self):
54.
try:

Python Scripts 38

Conference Meal Planner

55.
alert = self.driver.switch_to_alert()
56.
alert_text = alert.text
57.
if self.accept_next_alert:
58.
alert.accept()
59.
else:
60.
alert.dismiss()
61.
return alert_text
62.
finally: self.accept_next_alert = True
63.
64.
def tearDown(self):
65.
self.driver.quit()
66.
self.assertEqual([], self.verificationErrors)
67.
68. if __name__ == "__main__":
69.
unittest.main()

Python Scripts 39

Conference Meal Planner

Meat & Potatoes


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.

# -*- coding: utf-8 -*from selenium import webdriver


from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class MandP(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://www.opentable.com/"
self.verificationErrors = []
self.accept_next_alert = True

def test_the_capital_grille(self):
driver = self.driver
driver.get(self.base_url + "meat-and-potatoes?DateTime=2015-0501%2019%3A00&Covers=2&OnlyOffers=false&RestaurantIDs=61075&MetroId=62")
21.
Select(driver.find_element_by_name("Select_1")).select_by_visible_text("2 people")
22.
driver.find_element_by_name("datepicker").click()
23.
Select(driver.find_element_by_name("Select_0")).select_by_visible_text("11:00 PM")
24.
25.
#driver.find_element_by_id("autocompleteWithPlaces").send_keys("The Capital Grille Pittsburgh") --> Search Bar
26.
27.
driver.find_element_by_css_selector("input.button.dtp-picker-button").click()
28.
driver.find_element_by_xpath("(//a[contains(text(),'11:00 PM')])[2]").click()
29.
time.sleep(5)
30.
driver.find_element_by_id("firstName").clear()
31.
driver.find_element_by_id("firstName").send_keys("first")
32.
driver.find_element_by_id("lastName").clear()
33.
driver.find_element_by_id("lastName").send_keys("Last")
34.
driver.find_element_by_id("phoneNumber").clear()
35.
driver.find_element_by_id("phoneNumber").send_keys("4127779999")
36.
driver.find_element_by_id("email").clear()
37.
driver.find_element_by_id("email").send_keys("email")
38.
driver.find_element_by_id("completeReservation").click()
39.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
40.
#driver.find_element_by_css_selector("li.locu-tab.").click()
41.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
42.
43.
def is_element_present(self, how, what):
44.
try: self.driver.find_element(by=how, value=what)
45.
except NoSuchElementException, e: return False
46.
return True
47.
48.
def is_alert_present(self):
49.
try: self.driver.switch_to_alert()
50.
except NoAlertPresentException, e: return False
51.
return True
52.
53.
def close_alert_and_get_its_text(self):
54.
try:

Python Scripts 40

Conference Meal Planner

55.
alert = self.driver.switch_to_alert()
56.
alert_text = alert.text
57.
if self.accept_next_alert:
58.
alert.accept()
59.
else:
60.
alert.dismiss()
61.
return alert_text
62.
finally: self.accept_next_alert = True
63.
64.
def tearDown(self):
65.
self.driver.quit()
66.
self.assertEqual([], self.verificationErrors)
67.
68. if __name__ == "__main__":
69.
unittest.main()

Python Scripts 41

Conference Meal Planner

Grit & Grace


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.

# -*- coding: utf-8 -*from selenium import webdriver


from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class GandG(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://www.opentable.com/"
self.verificationErrors = []
self.accept_next_alert = True

def test_the_capital_grille(self):
driver = self.driver
driver.get(self.base_url + "grit-and-grace?DateTime=2015-0501%2019%3A00&Covers=2&OnlyOffers=false&RestaurantIDs=115552&MetroId=62")
21.
Select(driver.find_element_by_name("Select_1")).select_by_visible_text("4 people")
22.
driver.find_element_by_name("datepicker").click()
23.
Select(driver.find_element_by_name("Select_0")).select_by_visible_text("9:00 PM")
24.
25.
#driver.find_element_by_id("autocompleteWithPlaces").send_keys("The Capital Grille Pittsburgh") --> Search Bar
26.
27.
driver.find_element_by_css_selector("input.button.dtp-picker-button").click()
28.
driver.find_element_by_xpath("(//a[contains(text(),'9:00 PM')])[2]").click()
29.
time.sleep(5)
30.
driver.find_element_by_id("firstName").clear()
31.
driver.find_element_by_id("firstName").send_keys("first")
32.
driver.find_element_by_id("lastName").clear()
33.
driver.find_element_by_id("lastName").send_keys("Last")
34.
driver.find_element_by_id("phoneNumber").clear()
35.
driver.find_element_by_id("phoneNumber").send_keys("4127779999")
36.
driver.find_element_by_id("email").clear()
37.
driver.find_element_by_id("email").send_keys("email")
38.
driver.find_element_by_id("completeReservation").click()
39.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
40.
#driver.find_element_by_css_selector("li.locu-tab.").click()
41.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
42.
43.
def is_element_present(self, how, what):
44.
try: self.driver.find_element(by=how, value=what)
45.
except NoSuchElementException, e: return False
46.
return True
47.
48.
def is_alert_present(self):
49.
try: self.driver.switch_to_alert()
50.
except NoAlertPresentException, e: return False
51.
return True
52.
53.
def close_alert_and_get_its_text(self):
54.
try:

Python Scripts 42

Conference Meal Planner

55.
alert = self.driver.switch_to_alert()
56.
alert_text = alert.text
57.
if self.accept_next_alert:
58.
alert.accept()
59.
else:
60.
alert.dismiss()
61.
return alert_text
62.
finally: self.accept_next_alert = True
63.
64.
def tearDown(self):
65.
self.driver.quit()
66.
self.assertEqual([], self.verificationErrors)
67.
68. if __name__ == "__main__":
69.
unittest.main()

Python Scripts 43

Conference Meal Planner

The Capital Grille


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.

# -*- coding: utf-8 -*from selenium import webdriver


from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class TheCapitalGrille(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://www.opentable.com/"
self.verificationErrors = []
self.accept_next_alert = True
def test_the_capital_grille(self):
driver = self.driver
driver.get(self.base_url + "the-capital-grille-pittsburgh?DateTime=2015-0520%2013%3A30&Covers=5&OnlyOffers=false&RestaurantIDs=14047&MetroId=62#")
Select(driver.find_element_by_name("Select_1")).select_by_visible_text("5 people")
driver.find_element_by_name("datepicker").click()
time.sleep(2)
Select(driver.find_element_by_name("Select_0")).select_by_visible_text("8:30 PM")
#driver.find_element_by_id("autocompleteWithPlaces").send_keys("The Capital Grille Pittsburgh") --> Search Bar

driver.find_element_by_css_selector("input.button.dtp-picker-button").click()
driver.find_element_by_xpath("(//a[contains(text(),'8:30 PM')])[2]").click()
time.sleep(5)
driver.find_element_by_id("firstName").clear()
driver.find_element_by_id("firstName").send_keys("first")
time.sleep(2)
driver.find_element_by_id("lastName").clear()
driver.find_element_by_id("lastName").send_keys("Last")
driver.find_element_by_id("phoneNumber").clear()
driver.find_element_by_id("phoneNumber").send_keys("4127779999")
time.sleep(2)
driver.find_element_by_id("email").clear()
driver.find_element_by_id("email").send_keys("email")
driver.find_element_by_id("completeReservation").click()
time.sleep(2)
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
44.
#driver.find_element_by_css_selector("li.locu-tab.").click()
45.
#driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/div/div[2]/div[2]/div/
div[1]/div/span/div/ul/li[3]/a").click()
46.
47.
def is_element_present(self, how, what):
48.
try: self.driver.find_element(by=how, value=what)
49.
except NoSuchElementException, e: return False
50.
return True
51.
52.
def is_alert_present(self):
53.
try: self.driver.switch_to_alert()
54.
except NoAlertPresentException, e: return False

Python Scripts 44

Conference Meal Planner

55.
return True
56.
57.
def close_alert_and_get_its_text(self):
58.
try:
59.
alert = self.driver.switch_to_alert()
60.
alert_text = alert.text
61.
if self.accept_next_alert:
62.
alert.accept()
63.
else:
64.
alert.dismiss()
65.
return alert_text
66.
finally: self.accept_next_alert = True
67.
68.
def tearDown(self):
69.
self.driver.quit()
70.
self.assertEqual([], self.verificationErrors)
71.
72. if __name__ == "__main__":
73.
unittest.main()

Python Scripts 45

Conference Meal Planner

Student Contributions

Student Contributions 46

Conference Meal Planner

Interface Design
o Jacob
Mobile Interface Design
o Sean
Interactive SVG Map
o Jacob, Anthony
Mock Ups and WireFrames
o Sean
Restaurant Data Gathering and Analysis
o Jacob, Dave
Interface Issues Documentation
o Jacob, Dave
Customer Specifications Documentation
o Jacob, Dave, Sean
Design Decisions Documentation
o Jacob
Software Instructions Documentation
o Jacob, Dave
Literature Review and Bibliography
o Anthony
Javascript Functionality
o Jacob, Dave, Kyle
Python Scripting Functionality
o Dave
HTML
o Jacob, Dave, Kyle
mySQL back end
o Kyle
mySQL database management
o Kyle
PHP Functionality
o Kyle
Final Report Assembly and Formatting
o Sean

_________________________________
Dave

_________________________________
Kyle

_________________________________
Jacob

_________________________________
Anthony

_________________________________
Sean

Student Contributions 47

S-ar putea să vă placă și