示例#1
0
$cell_colors = array('#FF8080', '#FFC169', '#50E850');
$rating_class = array('rating1', 'rating2', 'rating3');
$result = $mysqli->prepare("SELECT q_id, q_type, theme, notes, scenario, leadin, display_method FROM papers, questions WHERE paper = ? AND papers.question = questions.q_id ORDER BY display_pos");
$result->bind_param('i', $paperID);
$result->execute();
$result->bind_result($q_id, $q_type, $theme, $notes, $scenario, $leadin, $display_method);
while ($result->fetch()) {
    if ($question_no == 1) {
        // Header row
        $cols = substr_count($display_method, '|');
    }
    if (trim($theme) != '') {
        echo "<tr><td colspan=\"4\" class=\"t\">{$theme}</td></tr>\n";
    }
    echo "<tr id=\"row_" . $question_no . "\">";
    if ($killer_questions->is_killer_question($q_id)) {
        if (array_key_exists($q_id, $stored_results) and $stored_results[$q_id] == 0) {
            echo "<td class=\"killerq skull\">";
            $killed = true;
        } else {
            echo "<td class=\"q skull\">";
        }
    } else {
        echo "<td class=\"q\">";
    }
    if (trim($notes) != '') {
        echo "<span style=\"color:{$labelcolor}\"><img src=\"../artwork/notes_icon.gif\" width=\"16\" height=\"16\" alt=\"note\" />&nbsp;{$notes}</span><br />\n";
    }
    echo parse_leadin($leadin, $stored_q_parts[$q_id]) . "</td>";
    $sub_totals[$stored_results[$q_id]]++;
    for ($i = 0; $i < $cols; $i++) {
示例#2
0
             echo '<tr id="link_break' . ($old_screen + $missing) . '" class="breakline qline screenerror"><td colspan="6" class="ie-fullwidth"><h4><span class="opaque">' . $string['screen'] . '&nbsp' . ($old_screen + $missing) . '&nbsp;</span></h4></td></tr>';
             echo '<tr><td colspan="6" style="height:55px; background-image:url(../artwork/no_questions_gradient.png); repeat:repeat-x; color:white; background-color:#C00000; padding-left:15px; padding-top:4x">' . $string['noquestionscreen'] . '</td></tr>';
         }
     }
     echo '<tr id="link_break' . $temp_array[$x]['screen'] . '" class="breakline qline"><td colspan="6" class="ie-fullwidth"><h4><span class="subsect opaque">' . $string['screen'] . '&nbsp' . $temp_array[$x]['screen'] . '&nbsp;</span></h4></td></tr>';
 }
 $old_screen = $temp_array[$x]['screen'];
 $higlight_class = '';
 $status_class = '';
 if (!$status_array[$temp_array[$x]['status']]->get_exclude_marking() and $temp_array[$x]['marks'] == 0 and $temp_array[$x]['q_type'] != 'info' and $properties->get_paper_type() != '3' and $properties->get_paper_type() != '4' and $exclusions->get_exclusions_by_qid($temp_array[$x]['q_id']) != '0000000000000000000000000000000000000000') {
     $higlight_class = ' excluded';
 } else {
     $status_class = ' status' . $temp_array[$x]['status'];
 }
 $killer = 0;
 if (isset($killer_questions) and $killer_questions->is_killer_question($temp_array[$x]['q_id'])) {
     $killer = 1;
     $killer_class = ' killer_icon';
 } else {
     $killer_class = '';
 }
 $theme_class = '';
 $theme_str = '';
 if (trim($temp_array[$x]['theme']) != '') {
     $theme_class = ' q_theme';
     $theme_str = "<h4 class=\"theme\">" . trim($temp_array[$x]['theme']) . "</h4>\n";
 }
 echo "<tr id=\"link_{$x}\" onselectstart=\"return false\" onmousedown=\"if (typeof event.preventDefault != 'undefined') { event.preventDefault(); }\" class=\"link_{$x} qline{$theme_class}{$status_class}{$higlight_class}";
 $prevous_screen = '';
 $next_screen = '';
 if ($temp_array[$x]['q_type'] != 'info') {