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>"; }
function MakeBibList($user, $isadmin, $query_result) { $res = ''; $number = 1; $category = "\n\t xyz"; while ($r = mysql_fetch_array($query_result)) { if ($category != $r['category']) { if ($category != "\n\t xyz") { $res .= "</ol>\n"; } $category = $r['category']; if ($category == '') { $category = 'Uncategorized'; } $res .= "<h2>" . $category . "</h2>\n"; $res .= "<ol>\n"; $category = $r['category']; } $res .= "<li style=\"margin-bottom: 10pt\" value={$number}>"; $res .= MakeBib($user, $isadmin, $r); $res .= "</li>\n"; $number++; } $res .= "</ol>\n"; return $res; }