function show_dispute($id) { list($rc, $projinfo) = ff_getprojectinfo($id); print "<div id='disputebody'>\n"; print "<script>\n"; print "function showdispute() { document.getElementById('disputebody').innerHTML='';"; print "document.getElementById('disputebody').innerHTML='hello';"; print "}\n"; print "</script>"; list($rc, $disputes) = ff_getprojectdisputes($id); print "<table border=0 cellpadding=0 cellspacing=0 width=100%>\n"; print "<tr><td bgcolor=#e51f1f><b><font color='white'> subject</font></b></td>"; print "<td align=left bgcolor=#e51f1f><b><font color='white'>status</font></td></tr>"; foreach ($disputes as $dispute) { if ($dispute['status'] == 'plaintiff') { $status = "awaiting response from " . $dispute['plaintiff']; } elseif ($dispute['status'] == 'defendant') { $status = "awaiting response from " . $projinfo['lead']; } else { $status = $dispute['status']; } print "<tr>"; print " <td><a href='dispute.php?id=" . $dispute['disputeid'] . "'>" . htmlentities($dispute['subject'] ? $dispute['subject'] : 'No Subject') . "</a></td><td>" . ($status == 'decided' ? "<b>decided</b> " . date("M j, H:i T", $dispute["decided"]) : $status) . "</td>"; print "</tr>"; } print "</table>"; print "</div>"; }
?> <img class=arrow id="retract-arrow" src="orange-arrow.gif" onClick="folder('retract','orange')"> <a class="folder clean" id="retract-project" href="javascript:folder('retract','orange')">Retract or Reduce Your Sponsorship</a> <div id="retract-div" class=folded> <?php include "retract.php"; ?> </div> <?php } ?> </div> <a name="tabs"></a> <?php include_once "tabs.php"; $tabs = array("requirements" => "Requirements", "subprojects" => "Bugs/Subprojects", "sponsors" => "Sponsors", "news" => "Activity", "submissions" => "Submissions", "start" => "Get Started"); list($rc, $disputes) = ff_getprojectdisputes($id); if (!$rc && sizeof($disputes)) { $tabs["disputes"] = "Disputes"; } tab_header($tabs, projurl($id), $tab, "requirements"); include_once "forum.php"; if ($tab == 'requirements') { print '<div style="font-size:small;color:#9c9d9d;text-align:center;padding-bottom:0.2em;font-style:italic">'; print "Note: You can propose changes " . "using the forum below.</div>\n"; print '<div class="spec">'; //check if post has attachments if ($projinfo['numattachments'] > 0) { list($rc, $body) = ff_attachtoproject($projinfo['id'], formatText($projinfo["reqmts"])); } else { $body = formatText($projinfo["reqmts"]); }
function show_body($topicid, $post, $openids = false) { $body = $post["body"]; $diff = ''; if (ereg("^(.*)\n/-/-/-/-/-begin-diff-/-/-/-/-/\n(.*)\$", $body, $args)) { $body = $args[1]; $diff = $args[2]; } $body = linkify(str_replace("\n", "<br />\n", trim(htmlentities($body)))); //check if post has attachments if (sizeof($post['attachments']) > 0) { list($rc, $body) = ff_attachtobody($post['id'], $body); } print $body; if ($diff) { include_once "diff.php"; print "<hr>\n"; print formatDiff($diff); } if (sizeof($post['attachments']) > 0) { print "<br>\n"; print "<b>attachments:</b><br>\n"; list($rc, $err) = ff_listattachments($post['id']); } $subject = $post["subject"]; $subject = ereg_replace("^[rR][eE]:? *", "", $subject); $subject = "Re: {$subject}"; print "<br>\n"; print "<div class=postfooter>"; print "[ <a href=\"javascript:inlinepost('{$topicid}','{$post['id']}','{$topicid}_field{$post['id']}','" . htmlentities(jsencode("Re: " . ereg_replace("^[rR][eE]:? *", "", $post["subject"]))) . "','{$GLOBALS['username']}')\">Reply to This</a> ]"; // If the post status is pending and the lead is viewing, // offer the Accept / Reject options. if ($post['status'] == 'pending') { $projectid = substr($post['topicid'], 6); list($rc, $projinfo) = ff_getprojectinfo($projectid); if ($GLOBALS['username'] == $projinfo['lead'] && $GLOBALS['username'] !== "") { // If a requirements change dispute is deliberating then // the lead can't accept this proposal. list($rc, $disputes) = ff_getprojectdisputes($projectid); if ($rc) { $disputes = array(); } $canaccept = 1; foreach ($disputes as $dispute) { if ($dispute["type"] == 'badchange' && $dispute["status"] == 'deliberating') { $canaccept = 0; break; } } print "[ <a href=\"handlechange.php?project={$projectid}&accept=1&post={$post['id']}\"" . ($canaccept ? "" : " onClick=\"alert('You can\\'t accept requirements changes while a\\nchange dispute is in deliberation. Please try again later.');return false\"") . "> Accept </a> ]"; print "[ <a href=\"handlechange.php?project={$projectid}&accept=0&post={$post['id']}\"> Reject </a> ]"; } } print "</div>"; print "<div id={$topicid}_field{$post['id']}></div>"; print "<div id={$topicid}_attachment{$post['id']} align='right'></div>"; if (sizeof($post["children"])) { print "<div class=postindent>"; show_thread($topicid, $post["children"], 0, $openids); print "</div>\n"; } }