1 SIT780 Enterprise Applications Development (Trimester 1, 2017) Assignment 2 Title: Website Project Weight: 40% Due Date: 9:00am Monday, 29 May 2017 Introduction This is an individual assignment and you are required to develop a web application to process XML and database data. The application will use PHP, Database, XML and JavaScript techniques. The home/login page of your application may look like this: Preparation 1. Create a XML file staff.xml that contains data of staff members. The elements should be: - staff_id; attribute email - surname - givenname - address Populate staff.xml with some sample data. 2. Create a userlogin table in Deakin Oracle SSID database with the appropriate fields and populate the table with some sample data. This database table contains data used to validate users before they are able to log into the website. Once a user is logged in, he/she should have different views depending on the user’s privilege. For Captcha2 example, a "normal" user may only lookup data in staff.xml; an "administrator" should be able to insert staff data into staff.xml and add new users into the userlogin table in the database. Tasks 1. Login page (4 marks) Create a Login page which accepts a username and password. Create two username/password for testing: - admin/SIT780 (grant the user administrator privilege) - guest/SIT780 (grant the user normal privilege) Captcha needs to be used in the login page as shown above to ensure that a humanbeing is attempting to login. 2. Welcome page (4 marks) After successful validation, a welcome page should be displayed. The welcome page should display a welcome message and also clearly state the privilege assigned to the user (normal or administrator). Create a menu to navigate to the options in task #3, #4, #5, #6, #7 and #8 below. Logout link/function should be provided as well. 3. Display staff member data from staff.xml (4 marks) Parse staff.xml and display data in a HTML table for “normal” and “administrator” users. 4. Search staff data (5 marks) Provide an interface to search staff.xml by givenname or surname. Appropriate results should be displayed in a HTML table for “normal” and “administrator” users. 5. Add new staff data (5 marks) Only an administrator should have access to this option. Provide an interface to accept values for staff_id, email, surname, givenname and address. The data should be appended to staff.xml. 6. Add a new user to the database table userlogin (5 marks) Only an administrator should have access to this option. Provide an interface to accept values for the fields of table userlogin. After a new user is inserted, its record should be stored in the database table userlogin. 7. Delete a user from the database table userlogin (5 marks) Only an administrator should have access to this option. Provide an interface to display all users in the userlogin table and allow the administrator to select a user to delete. After a user is deleted, all remaining users in the table should be displayed, and the administrator can delete another user is he wants to.3 8. Display all users from the database table userlogin (4 marks) Only an administrator should have access to this option. Provide an interface to extract data from the database table userlogin, and display the data in a proper HTML table. 9. Visualization of address information in Google Maps (4 marks) Enhance the task #3 and #4 so that each staff record has a hyperlink to visualize the address information in Google Maps. Refer to the example: http://www.deakin.edu.au/~jingyu/geocoding-simple.html which is a modification of sample code from Google Maps. Note: A demo website for your reference can be found from: http://www.deakin.edu.au/~jingyu/sit780/ass2/index.php The username/password for testing is: admin/SIT780 (administrator) and guest/SIT780 (normal) Hint: Use PHP session on the server side to ensure the operations on the website are for the granted privilege. Submission You need to submit: 1. The URL of the 'home page' of your system on Deakin server. For example, if your Deakin username is nathan and you have saved your assignment in the folder /public_html on H: drive with the home page file index.html, you would submit the URL like this: http://www.deakin.edu.au/~nathan/index.html. 2. Submit all your source files as a zipped (.zip or .rar) file including a readme.txt file that shows your website URL as well as other information you think necessary. If you wish to apply for an extension, application should be submitted to the unit chair before the due date. Documentary evidence of the disadvantage causing this request, and an ongoing assignment representing the work you have completed are expected to be submitted. A judgment will be made by the unit chair as to whether an extension shall be granted.