Question: 1. Part A: Modify vieworder.php to generate the desired output below. Use orders.txt file to be read by PHP program. 2. Separate the style section

1. Part A: Modify vieworder.php to generate the desired output below. Use orders.txt file to be read by PHP program.

2. Separate the style section into a CSS file named general.css and retain the same functionality.

1. Part A: Modify vieworder.php to generate the desired output below. Use

3. Part B: A tab-delimited file "autoparts.txt" consists of the following contents:

PartNo PartName QtyOnHand ReorderPoint UnitPrice

1011 Air Filter 100 50 20.99

1012 Air Intake Kit 45 10 164.99

2031 V-Poswer Spark Plug 300 100 2.59

2032 Iridium Spark Plug 240 100 7.99

2033 Platinum Spark Plug 145 70 7.29

3016 Ceramic Brake Pads(4-Pad Set) 80 20 39.99

3017 Platinum Brake Pads (4-Pad Set) 60 15 55.99

4011 "Wiper Blade, 22""" 50 12 16.99

4013 "Wiper Blade, 20""" 50 12 13.99

4015 "Wiper Blade, 24""" 50 10 16.99

The first line is for internal documentation purpose only and should be ignored when the file is processed.

4. Add 2 more valid records of your own choosing. Save as "viewinventory.php". Should look similar to below with subtotal and inventory asset having two decimal ends.

orders.txt file to be read by PHP program. 2. Separate the style

vieworder.php

Bob's Auto Parts - Customer Orders

th { background: #ccccff; }

Bob's Auto Parts

Customer Orders

// count the number of orders in the array $number_of_orders = count($orders);

if ($number_of_orders == 0) { echo "

No orders pending.
Please try again later.

"; }

echo "

"; echo "";

for ($i=0; $i

// keep only the number of items ordered $line[1] = intval($line[1]); $line[2] = intval($line[2]); $line[3] = intval($line[3]);

// output each order echo "

"; } echo "
Order Date Tires Oil Spark Plugs Total Address
".$line[0]." ".$line[1]." ".$line[2]." ".$line[3]." ".$line[4]." ".$line[5]."

"; ?>

orders.txt

18:55, 16th April 2013 4 tires 1 oil 6 spark plugs $477.4 22 Short St, Smalltown 18:56, 16th April 2013 1 tires 0 oil 0 spark plugs $110 33 Main Rd, Oldtown 18:57, 16th April 2013 0 tires 1 oil 4 spark plugs $28.6 127 Acacia St, Springfield

Auto Parts Customer Orders Order DateT Tires Oil Spark Plugs Total Address 18:55, 16th April 2013 18:56, 16th April 2013 18:57, 16th April 2013 06:08, 30th December 2016 6 $477.422 Short St, Smalltown 0 $110 33 Main Rd, Oldtown 4 S28.6 127 Acacia St, Springfield 3 S288.2 10 Round Cir, NoWhereTown 2 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!