</tr> </table> </form> <?php } mysql_free_result($res); } else { echo error_message_with_hide($message, 0); get_tags(1); // refresh tags cache $sql = 'select count(TgID) as value from tags where (1=1) ' . $wh_query; $recno = get_first_value($sql); if ($debug) { echo $sql . ' ===> ' . $recno; } $maxperpage = getSettingWithDefault('set-tags-per-page'); $pages = $recno == 0 ? 0 : intval(($recno - 1) / $maxperpage) + 1; if ($currentpage < 1) { $currentpage = 1; } if ($currentpage > $pages) { $currentpage = $pages; } $limit = 'LIMIT ' . ($currentpage - 1) * $maxperpage . ',' . $maxperpage; $sorts = array('TgText', 'TgComment', 'TgID desc'); $lsorts = count($sorts); if ($currentsort < 1) { $currentsort = 1; } if ($currentsort > $lsorts) { $currentsort = $lsorts;
<input type="submit" name="op" value="Change" /></td> </tr> </table> </form> <?php } mysql_free_result($res); } else { echo error_message_with_hide($message, 0); $sql = 'select count(*) as value from (select AtID from (archivedtexts left JOIN archtexttags ON AtID = AgAtID) where (1=1) ' . $wh_lang . $wh_query . ' group by AtID ' . $wh_tag . ') as dummy'; $recno = get_first_value($sql); if ($debug) { echo $sql . ' ===> ' . $recno; } $maxperpage = getSettingWithDefault('set-archivedtexts-per-page'); $pages = $recno == 0 ? 0 : intval(($recno - 1) / $maxperpage) + 1; if ($currentpage < 1) { $currentpage = 1; } if ($currentpage > $pages) { $currentpage = $pages; } $limit = 'LIMIT ' . ($currentpage - 1) * $maxperpage . ',' . $maxperpage; $sorts = array('AtTitle', 'AtID desc'); $lsorts = count($sorts); if ($currentsort < 1) { $currentsort = 1; } if ($currentsort > $lsorts) { $currentsort = $lsorts;
?> <script type="text/javascript"> //<![CDATA[ var context = window.parent.frames['l'].document; $('.word<?php echo $wid; ?> ', context).removeClass('todo todosty').addClass('done<?php echo $stchange >= 0 ? 'ok' : 'wrong'; ?> sty').attr('data_status','<?php echo $status; ?> ').attr('data_todo','0'); <?php $waittime = getSettingWithDefault('set-test-main-frame-waiting-time') + 0; if ($waittime <= 0) { ?> window.parent.frames['l'].location.reload(); <?php } else { ?> setTimeout('window.parent.frames[\'l\'].location.reload();', <?php echo $waittime; ?> ); <?php } ?> //]]> </script>
<input class="notempty right" type="text" name="set-terms-per-page" value="<?php echo tohtml(getSettingWithDefault('set-terms-per-page')); ?> " maxlength="4" size="4" /></td> <td class="td1 center"><img src="icn/status-busy.png" title="Field must not be empty" alt="Field must not be empty" /></td> </tr> <!-- ******************************************************* --> <tr> <td class="td1 center">Tags per Page</td> <td class="td1 center"> <input class="notempty right" type="text" name="set-tags-per-page" value="<?php echo tohtml(getSettingWithDefault('set-tags-per-page')); ?> " maxlength="4" size="4" /></td> <td class="td1 center"><img src="icn/status-busy.png" title="Field must not be empty" alt="Field must not be empty" /></td> </tr> <!-- ******************************************************* --> <tr> <td class="td1 right" colspan="4"> <input type="button" value="<< Back" onclick="location.href='index.php';" /> | <input type="button" value="Reset all settings to default" onclick="location.href='settings.php?op=reset';" /> | <input type="submit" name="op" value="Save" /></td> </tr> <!-- ******************************************************* --> </table> </form>
dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to [http://unlicense.org/]. ***************************************************************/ /************************************************************** Call: ajax_show_sentences.php?... ... lang=[langid] ... language ... word=[word] ... word in lowercase ... sentctl=[sentctl] ... sentence js control Show sentences in edit_texts.php, etc. ***************************************************************/ require_once 'settings.inc.php'; require_once 'connect.inc.php'; require_once 'dbutils.inc.php'; require_once 'utilities.inc.php'; $lang = $_POST['lang'] + 0; $word = stripTheSlashesIfNeeded($_POST['word']); $ctl = stripTheSlashesIfNeeded($_POST['ctl']); echo get20Sentences($lang, $word, $ctl, (int) getSettingWithDefault('set-term-sentence-count'));
<table class="width99pc"><tr><td class="center" colspan="7" style="padding:10px;" 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> <?php // AUDIO PLAYER if ($audio != '') { $playerskin = getSettingWithDefault('set-player-skin-name'); ?> <link type="text/css" href="css/jplayer_skin/<?php echo $playerskin; ?> .css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery.jplayer.min.js"><!-- jPlayer © Happyworm ** http://www.jplayer.org/about/ --></script> <tr> <td class="width45pc"> </td> <td class="center"> <span id="do-single" class="click hide"><img src="icn/arrow-stop.png" alt="Do not repeat" title="Do not repeat" style="width:24px;height:24px;" /></span><span id="do-repeat" class="click"><img src="icn/arrow-repeat.png" alt="Repeat audio" title="Repeat audio" style="width:24px;height:24px;" /></span> </td> <td class="center"> </td> <td> <div id="jquery_jplayer_1" class="jp-jplayer"> </div>
framesetheader('Test'); ?> <frameset cols="<?php echo tohtml(getSettingWithDefault('set-test-l-framewidth-percent')); ?> %,*"> <frameset rows="<?php echo tohtml(getSettingWithDefault('set-test-h-frameheight')); ?> ,*"> <frame src="do_test_header.php?<?php echo $p; ?> " scrolling="no" name="h" /> <frame src="empty.htm" scrolling="auto" name="l" /> </frameset> <frameset rows="<?php echo tohtml(getSettingWithDefault('set-test-r-frameheight-percent')); ?> %,*"> <frame src="empty.htm" scrolling="auto" name="ro" /> <frame src="empty.htm" scrolling="auto" name="ru" /> </frameset> <noframes><body><p>Sorry - your browser does not support frames.</p></body></noframes> </frameset> </html> <?php } else { header("Location: edit_texts.php"); exit; }
?> " scrolling="yes" name="header"></iframe> </div> <div id="frame-l"> <iframe id="frame-l-2" src="display_impr_text_text.php?text=<?php echo $_REQUEST['text']; ?> " scrolling="yes" name="text"></iframe> </div> <?php } else { ?> <frameset rows="<?php echo isset($audio) ? getSettingWithDefault('set-text-h-frameheight-with-audio') - 90 : getSettingWithDefault('set-text-h-frameheight-no-audio') - 90; ?> ,*"> <frame src="display_impr_text_header.php?text=<?php echo $_REQUEST['text']; ?> " scrolling="no" name="header" /> <frame src="display_impr_text_text.php?text=<?php echo $_REQUEST['text']; ?> " scrolling="auto" name="text" /> </frameset> <noframes><body><p>Sorry - your browser does not support frames.</p></body></noframes> </frameset> </html> <?php
);"><img src="icn/sticky-notes-stack.png" title="Show Sentences" alt="Show Sentences" /> Show Sentences</span></div> <?php } else { $sql = 'select WoTranslation, WoSentence, WoRomanization, WoStatus from ' . $tbpref . 'words where WoID = ' . $wid; $res = do_mysql_query($sql); if ($record = mysql_fetch_assoc($res)) { $status = $record['WoStatus']; if ($fromAnn == '') { if ($status >= 98) { $status = 1; } } $sentence = repl_tab_nl($record['WoSentence']); if ($sentence == '' && isset($_REQUEST['tid']) && isset($_REQUEST['ord'])) { $seid = get_first_value("select TiSeID as value from " . $tbpref . "textitems where TiTxID = " . $_REQUEST['tid'] . " and TiWordCount = 1 and TiOrder = " . $_REQUEST['ord']); $sent = getSentence($seid, $termlc, (int) getSettingWithDefault('set-term-sentence-count')); $sentence = repl_tab_nl($sent[1]); } $transl = repl_tab_nl($record['WoTranslation']); if ($transl == '*') { $transl = ''; } ?> <form name="editword" class="validate" action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post"> <input type="hidden" name="WoLgID" id="langfield" value="<?php echo $lang; ?>
} ?> <th class="th1 clickable">Title [Tags] / Audio: <img src="icn/speaker-volume.png" title="With Audio" alt="With Audio" />, Src.Link: <img src="icn/chain.png" title="Source Link available" alt="Source Link available" />, Ann.Text: <img src="icn/tick.png" title="Annotated Text available" alt="Annotated Text available" /></th> <th class="th1 sorttable_numeric clickable">Total<br />Words</th> <th class="th1 sorttable_numeric clickable">Saved<br />Wo+Ex</th> <th class="th1 sorttable_numeric clickable">Unkn.<br />Words</th> <th class="th1 sorttable_numeric clickable">Unkn.<br />%</th> </tr> <?php $sql = 'select TxID, TxTitle, LgName, TxAudioURI, TxSourceURI, length(TxAnnotatedText) as annotlen, ifnull(concat(\'[\',group_concat(distinct T2Text order by T2Text separator \', \'),\']\'),\'\') as taglist from ((' . $tbpref . 'texts left JOIN ' . $tbpref . 'texttags ON TxID = TtTxID) left join ' . $tbpref . 'tags2 on T2ID = TtT2ID), ' . $tbpref . 'languages where LgID=TxLgID ' . $wh_lang . $wh_query . ' group by TxID ' . $wh_tag . ' order by ' . $sorts[$currentsort - 1] . ' ' . $limit; if ($debug) { echo $sql; } $res = do_mysql_query($sql); $showCounts = getSettingWithDefault('set-show-text-word-counts') + 0; while ($record = mysql_fetch_assoc($res)) { if ($showCounts) { flush(); $txttotalwords = textwordcount($record['TxID']); $txtworkedwords = textworkcount($record['TxID']); $txtworkedexpr = textexprcount($record['TxID']); $txtworkedall = $txtworkedwords + $txtworkedexpr; $txttodowords = $txttotalwords - $txtworkedwords; $percentunknown = 0; if ($txttotalwords != 0) { $percentunknown = round(100 * $txttodowords / $txttotalwords, 0); if ($percentunknown > 100) { $percentunknown = 100; } if ($percentunknown < 0) {
function get_first_sepa() { static $sepa; if (!$sepa) { $sepa = mb_substr(getSettingWithDefault('set-term-translation-delimiters'), 0, 1, 'UTF-8'); } return $sepa; }
function print_similar_terms_tabrow() { if ((int) getSettingWithDefault("set-similar-terms-count") > 0) { echo '<tr><td class="td1 right">Similar<br />Terms:</td><td class="td1"><span id="simwords" class="smaller"> </span></td></tr>'; } }
?> '; WBLINK3 = '<?php echo $wb3; ?> '; RTL = <?php echo $rtlScript; ?> ; TID = '<?php echo $_REQUEST['text']; ?> '; ADDFILTER = '<?php echo makeStatusClassFilter(getSettingWithDefault('set-text-visit-statuses-via-key')); ?> '; $(document).ready( function() { $('.word').each(word_each_do_text_text); $('.mword').each(mword_each_do_text_text); $('.word').click(word_click_event_do_text_text); $('.mword').click(mword_click_event_do_text_text); $('.word').dblclick(word_dblclick_event_do_text_text); $('.mword').dblclick(word_dblclick_event_do_text_text); $(document).keydown(keydown_event_do_text_text); }); //]]> </script> <?php echo '<div id="thetext" ' . ($rtlScript ? 'dir="rtl"' : '') . '><p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.4; margin-bottom: 10px;">';
function makeAudioPlayer($audio) { if ($audio != '') { $playerskin = getSettingWithDefault('set-player-skin-name'); if ($playerskin != "jplayer.blue.monday") { $playerskin = "jplayer.blue.monday.modified"; } $repeatMode = getSettingZeroOrOne('currentplayerrepeatmode', 0); ?> <link type="text/css" href="css/jplayer_skin/<?php echo $playerskin; ?> .css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery.jplayer.min.js"><!-- jPlayer © Happyworm ** http://www.jplayer.org/about/ --></script> <table class="width99pc" cellspacing="0" cellpadding="3"> <tr> <td class="width45pc"> </td> <td class="center borderleft" style="padding-left:10px;"> <span id="do-single" class="click<?php echo $repeatMode ? '' : ' hide'; ?> "><img src="icn/arrow-repeat.png" alt="Toggle Repeat (Now ON)" title="Toogle Repeat (Now ON)" style="width:24px;height:24px;" /></span><span id="do-repeat" class="click<?php echo $repeatMode ? ' hide' : ''; ?> "><img src="icn/arrow-norepeat.png" alt="Toggle Repeat (Now OFF)" title="Toggle Repeat (Now OFF)" style="width:24px;height:24px;" /></span> </td> <td class="center bordermiddle"> </td> <td class="bordermiddle"> <div id="jquery_jplayer_1" class="jp-jplayer"> </div> <div id="jp_container_1" class="jp-audio"> <div class="jp-type-single"> <div class="jp-gui jp-interface"> <ul class="jp-controls"> <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li> <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li> <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li> <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li> <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li> </ul> <div class="jp-progress"> <div class="jp-seek-bar"> <div class="jp-play-bar"></div> </div> </div> <div class="jp-volume-bar"> <div class="jp-volume-bar-value"></div> </div> <div class="jp-time-holder"> <div class="jp-current-time"></div> <div class="jp-duration"></div> </div> </div> </div> </div> </td> <td class="center bordermiddle"> </td> <td class="center borderright" style="padding-right:10px;"> <?php $currentplayerseconds = getSetting('currentplayerseconds'); if ($currentplayerseconds == '') { $currentplayerseconds = 5; } ?> <select id="backtime" name="backtime" onchange="{do_ajax_save_setting('currentplayerseconds',document.getElementById('backtime').options[document.getElementById('backtime').selectedIndex].value);}"><?php echo get_seconds_selectoptions($currentplayerseconds); ?> </select><br /> <span id="backbutt" class="click"><img src="icn/arrow-circle-225-left.png" alt="Rewind n seconds" title="Rewind n seconds" /></span> <span id="forwbutt" class="click"><img src="icn/arrow-circle-315.png" alt="Forward n seconds" title="Forward n seconds" /></span> <span id="playTime" class="hide"></span> </td> <td class="width45pc"> </td> </tr> <script type="text/javascript"> //<![CDATA[ function new_pos(p) { $("#jquery_jplayer_1").jPlayer("playHead", p); } function click_single() { $("#jquery_jplayer_1").unbind($.jPlayer.event.ended + ".jp-repeat"); $("#do-single").addClass('hide'); $("#do-repeat").removeClass('hide'); do_ajax_save_setting('currentplayerrepeatmode','0'); return false; } function click_repeat() { $("#jquery_jplayer_1").bind($.jPlayer.event.ended + ".jp-repeat", function(event) { $(this).jPlayer("play"); }); $("#do-repeat").addClass('hide'); $("#do-single").removeClass('hide'); do_ajax_save_setting('currentplayerrepeatmode','1'); return false; } function click_back() { var t = parseInt($("#playTime").text(),10); var b = parseInt($("#backtime").val(),10); var nt = t - b; if (nt < 0) nt = 0; $("#jquery_jplayer_1").jPlayer("play", nt); } function click_forw() { var t = parseInt($("#playTime").text(),10); var b = parseInt($("#backtime").val(),10); var nt = t + b; $("#jquery_jplayer_1").jPlayer("play", nt); } $(document).ready(function(){ $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { <?php $audio = trim($audio); if (strcasecmp(substr($audio, -4), '.mp3') == 0) { echo 'mp3: ' . prepare_textdata_js(encodeURI($audio)); } elseif (strcasecmp(substr($audio, -4), '.ogg') == 0) { echo 'oga: ' . prepare_textdata_js(encodeURI($audio)) . ", " . 'mp3: ' . prepare_textdata_js(encodeURI($audio)); } elseif (strcasecmp(substr($audio, -4), '.wav') == 0) { echo 'wav: ' . prepare_textdata_js(encodeURI($audio)) . ", " . 'mp3: ' . prepare_textdata_js(encodeURI($audio)); } else { echo 'mp3: ' . prepare_textdata_js(encodeURI($audio)); } ?> }); }, swfPath: "js", }); $("#jquery_jplayer_1").bind($.jPlayer.event.timeupdate, function(event) { $("#playTime").text(Math.floor(event.jPlayer.status.currentTime)); }); $("#backbutt").click(click_back); $("#forwbutt").click(click_forw); $("#do-single").click(click_single); $("#do-repeat").click(click_repeat); <?php echo $repeatMode ? "click_repeat();\n" : ''; ?> }); //]]> </script> <?php } // if (isset($audio)) }
$r .= '</span></td></tr>'; } else { if (trim($vals[1]) != '') { $nontermbuffer .= str_replace("¶", '<img src="icn/new_line.png" title="New Line" alt="New Line" />', tohtml($vals[1])); } } } if ($nontermbuffer != '') { $r .= '<tr><td class="td1 center" style="font-size:' . $textsize . '%;">'; $r .= $nontermbuffer; $r .= '</td><td class="td1 right" colspan="3"><img class="click" src="icn/tick.png" title="Back to \'Display/Print Mode\'" alt="Back to \'Display/Print Mode\'" onclick="location.href=\'print_impr_text.php?text=' . $textid . '\';" /></td></tr>'; } $r .= '<th class="th1 center">Text</th>'; $r .= '<th class="th1 center">Dict.</th>'; $r .= '<th class="th1 center">Edit<br />Term</th>'; $r .= '<th class="th1 center">Term Translations (Delim.: ' . tohtml(getSettingWithDefault('set-term-translation-delimiters')) . ')<br /><input type="button" value="Reload" onclick="do_ajax_edit_impr_text(1e6,\'\');" /><a name="bottom"></a></th>'; $r .= '</tr></table></form>' . "\n"; /* $r .= '<script type="text/javascript">' . "\n"; $r .= '//<![CDATA[' . "\n"; $r .= '$(document).ready( function() {' . "\n"; $r .= "$('input.impr-ann-text').change(changeImprAnnText);\n"; $r .= "$('input.impr-ann-radio').change(changeImprAnnRadio);\n"; $r .= '} );' . "\n"; $r .= '//]]>' . "\n"; $r .= '</script>' . "\n"; */ if ($wordlc == '') { echo "\$('#editimprtextdata').html(" . prepare_textdata_js($r) . ");"; } else { echo $rr;