[Solved] PHP, Database and XML/JSON

$25

File Name: PHP__Database_and_XML_JSON.zip
File Size: 244.92 KB

SKU: [Solved] PHP, Database and XML/JSON Category: Tag:
5/5 - (1 vote)

Introduction

You are required to develop a web application to process XML and JSON data. The application will use PHP, Database, XML, and JSON.

Preparation

  1. Create a XML file which contains data of students (say, students.xml). The elements should be:
    • student_id; attribute email
    • lastname
    • firstname
    • address
  2. You will need a database table which contains data used to validate users before they are able to log into the website. Create a logintable in Oracle (student)database with the appropriate fields. Once a user is logged in, they should have different views depending on their privilege. A normal user may only lookup data in xml; an administrator should be able to insert student data into students.xml.
  3. Populate xmland the login table with some data.
  4. Download the JSON file called jsonfrom: university link(I have downloaded it, details are following) This file contains environmental data captured from environmental sensors. Users will be able to lookup data in sensor.json.

{sensorreadinglist:[

{

xbeeid:B3D982A49F,

moteid:crest001,

motelocation:Canteen, ground floor,

hubname:hubone,

temperature:33.66,

airpressure:1011.40,

humidity:55.23,

light:180.50,

altitude:28493.84,

mic:392.38,

gas:0135.32

},

{

xbeeid:B3D982358A,

moteid:crest002,

motelocation:Classroom Hallway, second floor,

hubname:hubone,

temperature:32.34,

airpressure:1010.30,

humidity:56.98,

light:240.50,

altitude:28503.84,

mic:292.38,

gas:0085.32

},

{

xbeeid:B3D989A2DD9,

moteid:crest003,

motelocation:Football Field, ground floor,

hubname:hubone,

temperature:34.09,

airpressure:1011.22,

humidity:58.30,

light:280.30,

altitude:28504.33,

mic:085.38,

gas:0038.93

}

]}

Requirements

  1. Login page (3 marks)Create a Login page which accepts a username and password. Create two username/password for testing :
    • admin/SIT780 (grant the user administratorprivilege)
    • guest/SIT780 (grant the user normalprivilege)

Prepared statements reduce the risk of SQL injection. Hence, prepared statements need to be used to implement the login functionality.Captcha needs to be used in the login page to ensure that a human-being is attempting to login.

  1. Welcome page (1 mark)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 #3, #4, #5 and #6 below.
  2. Display data from sensor.json (3 marks)json contains environmental data captured from sensors placed around a school. Parse sensor.json and display data in a HTML table. Assign background color to HTML table data to highlight high/low values of temperature and humidity.
  3. Display student data (3 marks)Parsexml and display data in a HTML table.
  4. Search student data (4 marks)Provide an interface to search xml by firstname or lastname. Appropriate results should be displayed.
  5. Insert student data (3 marks)Only an administrator should have access to this option. Provide an interface to accept values for student_id, email, lastname, firstname and address. The data should be appended to xml
  6. Visualisation of address information in Google earth (3 marks)Enhance the requirement #4 and #5 so that each student record has a hyperlink to visualize the location information in Google Maps. Refer to the example:

which is a modification of sample code from Google Maps.

Submission

You need to submit:

  1. The URL of the home page of your system on university server; for example, if your username is Bhagya and you have put your assignment in the folder /public_html/, you would submit something like this: http://www.university.edu.au/~bhagya/index.html
  2. An assignment cover sheet. It can be submitted as an attachment or as a page on your website.
  3. Submit all your source files as a zipped (.zip or .rar) file.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] PHP, Database and XML/JSON[Solved] PHP, Database and XML/JSON
$25