\n
# | '; echo '' . htmlspecialchars(_('proposal'), ENT_COMPAT, 'ISO-8859-1') . ' | '; if ($proposalIdValues) echo '' . htmlspecialchars($valueColumnTitle, ENT_COMPAT, 'ISO-8859-1') . ' | '; echo "
---|---|---|
$key | "; echo '' . htmlspecialchars(getProposalDateTimeStr($value), ENT_COMPAT, 'ISO-8859-1') . ' | '; if ($proposalIdValues) echo '' . number_format($proposalIdValues[$key], 2) . ' | '; echo "
"; $c = 0; foreach (array_keys($cm) as $proposalId) { $fullname = htmlspecialchars(getProposalDateTimeStr($proposalId), ENT_COMPAT, 'ISO-8859-1'); if (count($cm) > $threshold) echo html_element('th', array('title' => $fullname), (string) condorcetTable_NumToAbc($c)); else echo html_element('th', $fullname); $c++; } echo " |
---|
' . ($proposalIdCol == $proposalIdRow ? '\\' : $value) . ' | '; } echo "
" . htmlspecialchars(_('proposal'), ENT_COMPAT, 'ISO-8859-1') . ' | '; foreach ($participants as $person) { extract(html_escape_array($person)); echo ""; if ($email) echo html_element('a', array('href' => "mailto:$email"), $fullname, TRUE); else echo(htmlspecialchars($fullname, ENT_COMPAT, 'ISO-8859-1')); echo " | "; } echo "
---|---|
$date $time (" . htmlspecialchars(strftime('%a', $timestamp), ENT_COMPAT, 'ISO-8859-1') . ') | '; $respones = getResponses($id); foreach ($respones as $response) { extract(html_escape_array($response)); if ($showcomments == '1') $comment = htmlspecialchars(text_cut($response['comment'], 15), ENT_COMPAT, 'ISO-8859-1'); echo ""; if ($value) echo "$value"; if ($showcomments) echo ' ', $comment; echo " | "; } echo "
'; if ($showcomments != 0) echo '", htmlspecialchars(_('No comments'), ENT_COMPAT, 'ISO-8859-1'), ' '; if ($showcomments != 1) echo '", htmlspecialchars(_('Short comments'), ENT_COMPAT, 'ISO-8859-1'), ' '; if ($showcomments != 2) echo '", htmlspecialchars(_('Full comments'), ENT_COMPAT, 'ISO-8859-1'), ''; echo "
\n"; // Analysis // -------- if ($expired || $appointmentrights['manageappointment']) { ?> 'noproposals'), _('There are no responses to be analyzed.')); else { if ($DEBUG) {echo("---Time-Diff: " . (microtime_float()-$t0) . "---");} // ---debug --- echo html_element('h3', _('Mean value analysis'), TRUE); echo html_element('p', array('class' => 'description'), _('For each proposal, the mean value of the responses is calculated.'), TRUE); analysisTable($responseArray, $proposalIdValues, _('mean value')); if ($DEBUG) {echo("---Time-Diff: " . (microtime_float()-$t0) . "---");} // ---debug --- echo html_element('h3', _('Negative majority analysis'), TRUE); echo html_element('p', array('class' => 'description'), _('For each person, the worst proposal gets zero points, all other proposals one point. Finally the sum is calculated.'), TRUE); list($responseArray, $proposalIdValues) = analyzeNegativeMajority(getResponseArray($appointmentid), $approvaldesc); analysisTable($responseArray, $proposalIdValues, _('points')); if ($DEBUG) {echo("---Time-Diff: " . (microtime_float()-$t0) . "---");} // ---debug --- echo html_element('h3', _('Condorcet analysis'), TRUE); echo html_element('p', array('class' => 'description'), htmlspecialchars(_('Cf. '), ENT_COMPAT, 'ISO-8859-1') . html_element('a', array('href'=>_('http://en.wikipedia.org/wiki/Condorcet_method')), _('http://en.wikipedia.org/wiki/Condorcet_method'), TRUE) . htmlspecialchars(_('. Below you find a table with the Condorcet winner(s) and the beat matrix.'), ENT_COMPAT, 'ISO-8859-1')); list($responseArray, $condorcetMatrix) = analyzeCondorcet(getResponseArray($appointmentid), $approvaldesc); analysisTable($responseArray, NULL, NULL); condorcetTable($condorcetMatrix); if ($DEBUG) {echo("---Time-Diff: " . (microtime_float()-$t0) . "---");} // ---debug --- } } // Own responses // ------------- // don't show if expired except the user is manager if (!$expired || $appointmentrights['manageappointment']) { ?> = date(now()) order by date"; $data = pg_u_query_assoc($db_conn, $sql); $sql = "select id, date || ', ' || to_char(time, 'HH24:MI') || to_char(date, ' (Dy)') as datetime from proposal where appointmentid=$appointmentid and date >= date(now()) order by date"; $lookup_hash = array_to_hash(pg_u_query_num($db_conn, $sql)); $sql = "select id, date || ', ' || to_char(time, 'HH24:MI') || to_char(date, ' (Dy)') as datetime from proposal where appointmentid=$appointmentid and date >= date(now()) and id not in (select proposalid from response where personid=" . $_SESSION['person']['id'] . ") order by date"; $insert_hash = array_to_hash(pg_u_query_num($db_conn, $sql)); $columns = array( new DiOnlyInputSelect('proposalid:', _('proposal'), NULL, $lookup_hash, $insert_hash), new DiTextEdit('value', _('value'), NULL, 3), new DiTextEdit('comment', _('comment'), NULL, 50), new DiHidden('personid:', (string) $_SESSION['person']['id']) ); echo html_createEditForm( 'cgi-bin/editdb.php', basename($_SERVER['REQUEST_URI']), 'response', $columns, $data, // Array of rows, that are again arrays of columns count($insert_hash) > 0, TRUE, TRUE); } // if not expired } // if (count($proposals) > 0) // Manage proposals // ---------------- if ((!$expired || $appointmentrights['manageappointment']) && ($appointmentrights['insertproposal'] || $appointmentrights['updateproposal'] || $appointmentrights['deleteproposal'])) { ?>Person and appointment don't go well together ...