} } $formfields['notes'] = str_replace("\r", "", $formfields['notes']); if ($errors) { SPITFORM($formfields, $errors); PAGEFOOTER(); return; } # # # $formfields['month_name'] = $monthlist[$formfields['month']]; # # Build DB Query and Send Mail to Testbed-ops # $formdump = FormTextDump($form, $fields, $formfields, 30); function ConfirmationCommon($deleted = false) { global $form, $fields, $formfields, $formdump, $idx; echo "<pre>\n" . htmlspecialchars($formdump) . "\n</pre>\n"; if (!$deleted) { echo '<p>It will appear in the public <a href="expubs.php">Bibliography</a> '; echo "under " . htmlspecialchars($formfields['category']) . " like this:</p>"; echo "<ul>\n<li>\n"; echo MakeBib(NULL, 0, $formfields); echo "</li></ul>\n"; } echo "<a href=\"submitpub.php?idx=" . $idx . "\" style=\"background:yellow\">Edit</a>"; } if (!isset($idx)) { $cols = array('owner', 'submitted_by', 'last_edit_by', 'uuid', 'created', 'last_edit');
function FormTextDump($form, $fields, $values, $label_width = 20, $parent_label = '') { $res = ''; foreach ($fields as $name => $attributes) { switch ($attributes['#type']) { case "hidden": case "textfield": case "password": case "submit": case "checkbox": case "radio": case "select": case "textarea": case "display": $res .= FormTextDumpElement($name, $attributes, $values, $label_width, $parent_label); break; case "checkboxes": while (list($subname, $subattrs) = each($attributes['#boxes'])) { FormTextDumpElement($subname, $subattrs, $values, $label_width, CombineLabels($parent_label, $attributes)); } break; case "table": $res .= FormTextDump($form, $attributes['#fields'], $values, $label_width, CombineLabels($parent_label, $attributes)); break; case "list": case "vlist": while (list($subname, $subattrs) = each($attributes['#elements'])) { $res .= FormTextDumpElement($subname, $subattrs, $values, $label_width, CombineLabels($parent_label, $attributes)); } break; case "file": # Skip for now break; default: user_error("Invalid slot type \"" . $attributes['#type'] . "\" in FormTextDump", E_USER_NOTICE); break; } } return $res; }