+ end_form();
+ }
+
+ function show_contact_order_form($contact) {
+ if (! check_admin(1)) return;
+
+ $area = get_contact_area($contact);
+ if (! $area) {
+ echo "<p>No valid <a href=\"/area\">area</a> for contact!</p>\n";
+ return;
+ }
+
+ $order = new Order;
+ $order->setBeneficiaryId($contact->getId());
+
+ form("standout");
+ echo "<p>Placing order for " . $contact->getStrongLink() . ".";
+ $parcel = $contact->getParcel();
+ if ($parcel) {
+ echo " Suggested parcel type is <span class=\"strong\">" . get_contact_parcel_string($contact) . "</span>";
+ $order->setParcel($parcel);
+ }
+ echo "</p>\n";
+
+ echo "<table>\n";
+ show_order_form($order, $area_id);
+
+ echo "<tr>\n";
+ echo " <td colspan=2>"; submit("add_order", "Order"); echo "</td></tr>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ end_form();