*******dcship.php This page lets the DC choose which store to send a shipment to Then it displays the inventory with a Quantity add button It also stars the items that store requested (aka ordered) To add to the shipment table, it goes to dcshipOrder.php After all items have been ordered, it goes to the finalize page // Send Shipment to a Store Send Shipment to a Store
** items that were ordered by store


ENDHTML; if($choice=="") { Print<<

Choose store:




ENDHTML; } else { Print<< ORDER from #$choice: Item Sku Price Color Quantity to Send Order Item ENDHTML; $link=mysql_connect("mysql.tjhsst.edu", "syousuf", "xxxxxx"); mysql_select_db("syousuf", $link); if($choice=="56") $query2= "select * from order56"; if($choice=="112") $query2= "select * from order112"; if($choice=="364") $query2= "select * from order364"; if($choice=="872") $query2= "select * from order872"; if($choice==650) $query2= "select * from order650"; $sort="item"; $query= "select * from inventory order by $sort"; $result = mysql_query($query, $link); $num_rows = mysql_num_rows($result); for($x=0; $x<$num_rows; $x++) { $row=mysql_fetch_array($result); $item=$row["item"]; $sku=$row["sku"]; $price=$row["price"]; $color=$row["color"]; $quantity=$row["quantity"]; $answer="no"; $result2 = mysql_query($query2, $link); $num_rows2 = mysql_num_rows($result2); for($y=0;$y<$num_rows2; $y++) { $row2=mysql_fetch_array($result2); $sku2=$row2["sku"]; if($sku2==$sku) $answer="yes"; } Print<< ENDHTML; if($answer=="yes") echo('**'); else echo(''); Print<< $sku $ $price $color ENDHTML; } Print<<
Submit: ENDHTML; } //?> ********dcshipOrder.php Here the page gets the info for the item to be ordered it then adds it into the correct shipment table The it redirects back to the first page // *********dcshipOrder2.php Here the DC can delete items from the shipment it has just chosen This page redirects back to the finalize page // *******finalize2.php This page outputs the shipment table it also gives the option of deleting items Then it returns to the DC menu page // Finalize Shipment to #$choice: Item Sku Price Color Quantity to Send Delete ENDHTML; $link=mysql_connect("mysql.tjhsst.edu", "syousuf", "xxxxx"); mysql_select_db("syousuf", $link); if($choice==56) $query= "select * from ship56"; if($choice==112) $query= "select * from ship112"; if($choice==364) $query= "select * from ship364"; if($choice==872) $query= "select * from ship872"; if($choice==650) $query= "select * from ship650"; $result = mysql_query($query, $link); $num_rows = mysql_num_rows($result); for($x=0; $x<$num_rows; $x++) { $row=mysql_fetch_array($result); $item=$row["item"]; $sku=$row["sku"]; $price=$row["price"]; $color=$row["color"]; $quantity=$row["quantity"]; Print<< $item $sku $ $price $color $quantity ENDHTML; } Print<<
Return to Order Form:
Done!: ENDHTML; //?>