} $audio = trim($audio); $title = $record['TxTitle']; $sourceURI = $record['TxSourceURI']; $langid = $record['TxLgID']; mysql_free_result($res); saveSetting('currenttext', $textid); pagestart_nobody(tohtml($title), $addcss = 'html, body {margin-bottom:0;}'); echo '<h4>'; echo '<a href="edit_texts.php" target="_top">'; echo_lwt_logo(); echo 'LWT'; echo '</a> | '; quickMenu(); echo getPreviousAndNextTextLinks($textid, 'do_text.php?start=', FALSE, ' | '); echo ' | <a href="do_test.php?text=' . $textid . '" target="_top"><img src="icn/question-balloon.png" title="Test" alt="Test" /></a> <a href="print_text.php?text=' . $textid . '" target="_top"><img src="icn/printer.png" title="Print" alt="Print" />' . get_annotation_link($textid) . ' <a target="_top" href="edit_texts.php?chg=' . $textid . '"><img src="icn/document--pencil.png" title="Edit Text" alt="Edit Text" /></a> | <a href="new_word.php?text=' . $textid . '&lang=' . $langid . '" target="ro"><img src="icn/sticky-note--plus.png" title="New Term" alt="New Term" /></a>'; echo '</h4><table><tr><td><h3>READ ▶</h3></td><td class="width99pc"><h3>' . tohtml($title) . (isset($sourceURI) ? ' <a href="' . $sourceURI . '" target="_blank"><img src="icn/chain.png" title="Text Source" alt="Text Source" /></a>' : '') . '</h3></td></tr></table>'; $showAll = getSettingZeroOrOne('showallwords', 1); ?> <table class="width99pc"><tr><td class="center" colspan="7" style="padding:2px 5px 5px 5px;" nowrap="nowrap">TO DO: <span id="learnstatus"><?php echo texttodocount2($_REQUEST['text']); ?> </span> <span title="[Show All] = ON: ALL terms are shown, and all multi-word terms are shown as superscripts before the first word. The superscript indicates the number of words in the multi-word term. [Show All] = OFF: Multi-word terms now hide single words and shorter or overlapping multi-word terms.">Show All <input type="checkbox" id="showallwords" <?php echo get_checked($showAll); ?> /></span><span id="thetextid" class="hide"><?php echo $textid; ?> </span></td></tr>
} if ($p == '') { my_die("do_test_header.php called with wrong parameters"); } $totalcountdue = get_first_value('SELECT count(distinct WoID) as value FROM ' . $testsql . ' AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != \'\' AND WoTranslation != \'*\' AND WoTodayScore < 0'); $totalcount = get_first_value('SELECT count(distinct WoID) as value FROM ' . $testsql . ' AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != \'\' AND WoTranslation != \'*\''); pagestart_nobody(tohtml($title), $addcss = 'html, body {margin-bottom:0;}'); echo '<h4>'; echo '<a href="edit_texts.php" target="_top">'; echo_lwt_logo(); echo 'LWT'; echo '</a> | '; quickMenu(); if (substr($p, 0, 4) == 'text') { echo getPreviousAndNextTextLinks($textid, 'do_test.php?text=', FALSE, ' | '); echo ' | <a href="do_text.php?start=' . $textid . '" target="_top"><img src="icn/book-open-bookmark.png" title="Read" alt="Read" /></a> <a href="print_text.php?text=' . $textid . '" target="_top"><img src="icn/printer.png" title="Print" alt="Print" /></a>' . get_annotation_link($textid); } echo '</h4><table><tr><td><h3>TEST ▶</h3></td><td class="width99pc"><h3>' . tohtml($title) . ' (Due: ' . $totalcountdue . ' of ' . $totalcount . ')</h3></td></tr><tr><td colspan="2">'; $_SESSION['teststart'] = time() + 2; $_SESSION['testcorrect'] = 0; $_SESSION['testwrong'] = 0; $_SESSION['testtotal'] = $totalcountdue; if ($message != '') { echo error_message_with_hide($message, 1); } else { // OK ?> <p style="margin-bottom:0;"> <input type="button" value="..[L2].." onclick="{parent.frames['ro'].location.href='empty.htm'; parent.frames['ru'].location.href='empty.htm'; parent.frames['l'].location.href='do_test_test.php?type=1&<?php echo $p; ?>
echo "</select> ...<br />will be <b>annotated</b> with "; echo "<select id=\"ann\" onchange=\"{val=document.getElementById('ann').options[document.getElementById('ann').selectedIndex].value;location.href='print_text.php?text=" . $textid . "&ann=' + val;}\">"; echo "<option value=\"0\"" . get_selected(0, $ann) . ">Nothing</option>"; echo "<option value=\"1\"" . get_selected(1, $ann) . ">Translation</option>"; echo "<option value=\"5\"" . get_selected(5, $ann) . ">Translation & Tags</option>"; echo "<option value=\"2\"" . get_selected(2, $ann) . ">Romanization</option>"; echo "<option value=\"3\"" . get_selected(3, $ann) . ">Romanization & Translation</option>"; echo "<option value=\"7\"" . get_selected(7, $ann) . ">Romanization, Translation & Tags</option>"; echo "</select><select id=\"annplcmnt\" onchange=\"{val=document.getElementById('annplcmnt').options[document.getElementById('annplcmnt').selectedIndex].value;location.href='print_text.php?text=" . $textid . "&annplcmnt=' + val;}\">"; echo "<option value=\"0\"" . get_selected(0, $annplcmnt) . ">behind</option>"; echo "<option value=\"1\"" . get_selected(1, $annplcmnt) . ">in front of</option>"; echo "<option value=\"2\"" . get_selected(2, $annplcmnt) . ">above (ruby)</option>"; echo "</select> the term.<br />"; echo "<input type=\"button\" value=\"Print it!\" onclick=\"window.print();\" /> (only the text below the line)"; if (get_first_value("select length(TxAnnotatedText) as value from " . $tbpref . "texts where TxID = " . $textid) + 0 > 0) { echo " | Or <input type=\"button\" value=\"Print/Edit/Delete\" onclick=\"location.href='print_impr_text.php?text=" . $textid . "';\" /> your <b>Improved Annotated Text</b>" . get_annotation_link($textid) . "."; } else { echo " | <input type=\"button\" value=\"Create\" onclick=\"location.href='print_impr_text.php?edit=1&text=" . $textid . "';\" /> an <b>Improved Annotated Text</b> [<img src=\"icn/tick.png\" title=\"Annotated Text\" alt=\"Annotated Text\" />]."; } echo "</p></div> <!-- noprint -->"; echo "<div id=\"print\"" . ($rtlScript ? ' dir="rtl"' : '') . ">"; echo '<p style="font-size:' . $textsize . '%;line-height: 1.35; margin-bottom: 10px; ">' . tohtml($title) . '<br /><br />'; $sql = 'select TiWordCount as Code, TiText, TiOrder, TiIsNotWord, WoID, WoTranslation, WoRomanization, WoStatus from (' . $tbpref . 'textitems left join ' . $tbpref . 'words on (TiTextLC = WoTextLC) and (TiLgID = WoLgID)) where TiTxID = ' . $textid . ' and (not (TiWordCount > 1 and WoID is null)) order by TiOrder asc, TiWordCount desc'; $saveterm = ''; $savetrans = ''; $saverom = ''; $savetags = ''; $until = 0; $res = do_mysql_query($sql); while ($record = mysql_fetch_assoc($res)) { $actcode = $record['Code'] + 0;