element of booking.html. Note that the
element must include a
element that uses the confirmation information
as its content.
2.2 The Admin Component
This component allows administrative people of CabsOnline to view those taxi booking requests
that need to be assigned as soon as possible and to assign taxi for a particular booking request.
Note that authentication is not required though it is necessary in the real application. If you provide
this function, you must provide the password and explain it in the readme document. The specific
functions of this component include:
1) Design an HTML page (admin.html) that takes two types of requests:
1
*** Note that it is not necessary to validate the genuineness of an address. But if you want to do that to make the
application more realistic, you can use google.maps.Geocoder() Web API. Please refer to Google Map API
online document or https://codepen.io/pavenuto/pen/dXkgEz on how to do that.
3
The first is to search booking requests and is realized by a single button to show pick-up
requests.
This search function has one text input field:
• Search Bookings (Text input type. Must set its name attribute to ”bsearch”:
. Optional). User can either input a
reference number or nothing:
i. If a reference number is input, then the booking record associated with this
reference number is returned by the server.
ii. If user input nothing (empty), then a list of bookings with a pick-up time within 2
hours from now is returned by the server (see below Item 3 for details).
• Search Button (button input type. Must set its name attribute to ”sbutton”: type=”text” name=”sbutton”>).
The second is to assign taxi for a particular booking request (See Item 4 for details)
2) Once the button search booking is pressed, a client-side program issues a query request to
the server (using XHR object); once the button assign taxi is pressed, a client program
issues an assigning request to the server with a booking reference number.
3) On the server side, a server-side program responds differently for different types of
requests from the client:
a. For a request for showing pick-up requests, the server-side program executes a
query on the MySQL database for finding those “unassigned” booking requests
with a pick-up time within 2 hours from now only. For each found request, the
booking reference number, customer name, contact phone, pick-up suburb,
destination suburb, and pick-up date/time are required to return to the client.
b. For a request for assigning taxi, make an update to the MySQL database to change
the status of the booking request that matches the given booking reference number
from “unassigned” to “assigned”, and return confirmation information to the
client.
4) On the client side, for a request for showing pick-up requests, you display the returned
information in a
area of the HTML page admin.html.
• Inside the div element is a
element with the following table header fields exactly
as follows: “booking reference number”, “customer name”, “phone”, “pick-up suburb”,
“destination suburb”, and “pick-up date/time”, “status”, “assign”.
• Each table row must contain one record. For each row, the “assign” field must contain a
button with name “assign”, and when its clicked, the “status” of this record needs to be
updated on both the database and the html page.
Submission Requirements
You should ensure that all files used for the assignment sit in a directory called “assign2” (use this
name exactly, it is case sensitive and no space between assign and 2) within your cmslamp14
account. The directory should contain no sub-directories (i.e., all files are placed directly under the
“assign2” directory).
The assignment should be submitted as an individual work using the Assignment 2 link in
Blackboard (inside the Assignments area)
Please compress all your html and PHP files as a zip file named “assignment_2.zip” to
submit via Blackboard submission link. You can submit more than once.
The files should include:
• two HTML files booking.html and admin.html;
4
• any JavaScript files that you use;
• any CSS files that you use;
• any PHP files that you use;
• a text file “mysqlcommand.txt” that includes the MySQL commands that you used to create
the database;
• a text file readme.txt that includes
o a list of all the files in the system;
o brief instructions on how to use the system.
For each submitted file, we require clear comments including student information, description of
the file, and description of each function defined in this file.
The MySQL database that you use should be constructed in your cmslamp14 account. After
submission, you are not allowed to change any of the submitted files in the assign2 directory on
your cmslamp14 account; time stamps will be checked.
Assignments that fail to follow "submission requirements" will NOT be assessed.
Notes:
Please remove your database login details from the files before submitting to Blackboard to avoid
potential privacy breach.
Following is a guideline that you may follow to submit your assignment:
1. Make your code working on cmslamp14 server in the folder ‘assign2’
2. Download the folder (including all the files in it) to your local machine
3. If any PHP file in the folder contains your password then please replace the password
string with an empty string in a text editor
4. Make a zip archive of this folder and submit through Blackboard ‘Assignments” area
* Make sure to test your program on the cmslamp14 server before your submission.
* If your assignment cannot run on cmslamp14, your result will be 0 marks for this assignment.
Marking Scheme
Work will be assessed based on the quality and presentation. The assignment will be marked out
of 100 and will contribute 25% towards assessment of this course.
Assessment item Marks
comment and readme.doc 10
Quality of code 5
Usability of user interface 5
2.1.1 10
2.1.2 10
2.1.3 15
2.1.4 10
2.2.1 10
2.2.2 15
2.2.3 10
Total 100
- QQ:99515681
- 邮箱:99515681@qq.com
- 工作时间:8:00-23:00
- 微信:codinghelp