+ /* Parcel type. */
+ echo "<tr>\n";
+ echo " <td>Family unit</td>\n";
+ echo " <td><select name=\"parcel_size\">\n";
+ $mask = 1 << (count($parcel_sizes) + 1);
+ for ($i = 0; $i < count($parcel_sizes); $i++) {
+ option("parcel_size", $i << 1, $parcel_sizes[$i], $contact->getParcel() % $mask);
+ }
+ echo "</select></td>\n";
+ echo "</tr>\n";
+
+ /* Parcel contents. */
+ echo "<tr>\n";
+ echo " <td>Dietary requirements</td>\n";
+ echo " <td>";
+ for ($i = count($parcel_sizes); $i < count($parcel_contents); $i++) {
+ if (1 << $i == $GLOBALS['PARCEL_TOILETRY']) continue;
+ echo " <input type=\"checkbox\" name=\"parcel_$i\"";
+ if ($contact->getParcel() & (1 << $i)) echo " checked";
+ echo ">$parcel_contents[$i]\n";
+ }
+ echo "</td>\n";
+ echo "</tr>\n";
+