Exemple #1
0
function print_result_detail_table($answers, $data)
{
    $theses_count = sizeof($data['theses']);
    for ($i = 0; $i < sizeof($data['lists']); $i = $i + 1) {
        $classname = string_to_css_classname($data['lists'][$i]['name']);
        echo "<th class='hidden-xs hidden-sm list-{$classname}'>{$data['lists'][$i]['name_x']} (" . calculate_points($data['answers'][$i], $answers) . ")</th>";
    }
    echo "</tr>\n";
    for ($i = 0; $i < $theses_count; $i = $i + 1) {
        char_to_multiply($answers[$i]) == 2 ? $star = '<span class="glyphicon glyphicon-star" title="Doppelte Gewichtung"></span>' : ($star = '');
        char_to_multiply($answers[$i]) == 2 ? $tdcl = ' class="warning"' : ($tdcl = '');
        $labelclass = code_to_labelclass(char_to_value($answers[$i]));
        echo "<tr{$tdcl}>\n";
        echo '<td><p class="text-center">' . $star . '</p></td>';
        echo '<td><a id="thesis' . $i . '" class="btn ' . code_to_btnclass(char_to_value($answers[$i])) . ' btn-block" onclick="toggleNext(this)">' . $data['theses'][$i]['s'] . '</a></td>';
        for ($listid = 0; $listid < sizeof($data['lists']); $listid = $listid + 1) {
            echo get_list_result_td($data, $listid, $i);
        }
        echo "</tr>\n";
        // Statements
        echo "<tr class='multheseslong'><td class='mtl'></td><td class='mtl' colspan='" . (sizeof($data['lists']) + 1) . "'><!--<span class='label {$labelclass}'>Thesis " . ($i + 1) . ": " . $data['theses'][$i]['s'] . "</span><br>--> <p class='well'>" . $data['theses'][$i]['l'] . "</p>";
        for ($listid = 0; $listid < sizeof($data['lists']); $listid = $listid + 1) {
            echo get_list_statement($data, $listid, $i);
        }
        echo "</td></tr>\n";
    }
}
Exemple #2
0
  
  <div class="container mow-container" style="margin-top: 20px;">
      <img src="img/mahlowat_logo.png" title="Mahlowat Logo" class="pull-right" onclick="changeText()"/>
	<p id="spruch" class="pull-right"></p>
	
      <div class="bottom-buffer top-buffer">
    
    <h1>Ergebnisse</h1>
    <p>Klicke auf die Titel, um die zugehörige These anzuzeigen.</p>
      <table class="table table-bordered">
            <tr><th style="width: 320px;">Deine Wahl</th><th>Doppelt gewichten</th>
            <?php 
for ($i = 0; $i < sizeof($ans); $i = $i + 1) {
    $emph[$i] == 2 ? $active = "btn-info active" : ($active = "btn-default");
    $emph[$i] == 2 ? $multbutton = "These wird doppelt gewichtet" : ($multbutton = "These doppelt gewichten");
    $btnclass = code_to_btnclass(char_to_value($ans[$i]));
    $labelclass = code_to_labelclass($ans[$i]);
    echo "<tr>";
    echo "<td><a id='thesis{$i}' class='btn {$btnclass} btn-block' onclick='toggleNext(this)'>" . $theses[$i]['s'] . "</a></td>\n                  <td><button id='thesis{$i}-multiply' class='btn btn-block weight {$active}' data-toggle='button'>{$multbutton}</button></td>";
    echo "</tr>\n";
    echo "<tr class='multheseslong'><td class='mtl' colspan='2'><!--<span class='label {$labelclass}'>These " . ($i + 1) . ": " . $theses[$i]['s'] . "</span><br>--> " . $theses[$i]['l'] . "</td></tr>";
}
?>
     
      </table>
      <button id="commit" class="btn btn-primary">Neu Auswerten</button>
    
    <div class="text-right">
    <hr />
      <small>Du kannst die Befragung 
      <a href="index.php" title="Von vorn beginnen">neu starten</a>