All pastes #97823 Raw Edit

Unnamed

public php v1 · immutable
#97823 ·published 2006-07-24 02:43 UTC
rendered paste body
<html><body><pre><?php//***********************************//project 8//***********************************$fp_a=fopen("proj8a.dat", r);$fp_b=fopen("proj8b.dat", r);$fp_c=fopen("proj8c.dat', r);get_data($fp_a, $fp_b, $fp_c, $item_inventory);function get_data($fp_a, $fp_b, $fp_c, &$item_inventory){	for ($count=1; $count<=23; $count++)	{		$item_inventory[$count]=fgets($fp_a, 4);	}		print_begining($item_inventory);	for ($count=1; $count<=23; $count++)	{		$inventory_holder=fgets($fp_b, 4);		$item_inventory[$count]=$item_inventory[$count]+$inventory_holder;	} 	//print_updated($item_inventory);	for ($count=1; $count<=23; $count++)	{		$item_number=fgets($fp_c, 4);		$inventory_holder=fgets($fp_c, 4);		$item_inventory[$item_number]=$item_inventory[$count]+$inventory_holder;	}	//print_end($item_inventory);	return;}function print_begining($item_inventory){	print "Begining Inventory Report<br>";	print "Beese National Corporation<br>";	$date_line= date("F d, Y-h:i A");	print "Date: $date_line <br>";	print "Item Number     Number in Inventory<br>";	for ($count=1; $count<=23; $count++)	{		printf("   %2d               %3d<br>", $count, $item_inventory[$count]);	}	return;}?></pre></body></html>