Beispiel #1
0
    }
    if ($order > $until) {
        output_text($saveterm, $saverom, $savetrans, $savetags, $show_rom, $show_trans, $show_tags, $annplcmnt);
        $saveterm = '';
        $savetrans = '';
        $saverom = '';
        $savetags = '';
        $until = $order;
    }
    if ($record['TiIsNotWord'] != 0) {
        echo str_replace("¶", '</p><p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.3; margin-bottom: 10px;">', tohtml($record['TiText']));
    } else {
        $until = $order + 2 * ($actcode - 1);
        $saveterm = $record['TiText'];
        $savetrans = '';
        $savetags = '';
        if (isset($record['WoID'])) {
            $savetrans = $record['WoTranslation'];
            $savetags = getWordTagList($record['WoID'], '', 1, 0);
            if ($savetrans == '*') {
                $savetrans = '';
            }
        }
        $saverom = trim(isset($record['WoRomanization']) ? $record['WoRomanization'] : "");
    }
}
// while
mysql_free_result($res);
output_text($saveterm, $saverom, $savetrans, $savetags, $show_rom, $show_trans, $show_tags, $annplcmnt);
echo "</p></div>";
pageend();
Beispiel #2
0
//<![CDATA[
var context = window.parent.frames['l'].document;
var woid = <?php 
    echo prepare_textdata_js($wid);
    ?>
;
var wotext = <?php 
    echo prepare_textdata_js($_REQUEST["WoText"]);
    ?>
;
var status = <?php 
    echo prepare_textdata_js($_REQUEST["WoStatus"]);
    ?>
;
var trans = <?php 
    echo prepare_textdata_js($translation . getWordTagList($wid, ' ', 1, 0));
    ?>
;
var roman = <?php 
    echo prepare_textdata_js($_REQUEST["WoRomanization"]);
    ?>
;
$('.word' + woid, context).attr('data_text',wotext).attr('data_trans',trans).attr('data_rom',roman).attr('data_status',status);
window.parent.frames['l'].focus();
window.parent.frames['l'].setTimeout('cClick()', 100);
//]]>
</script>
	
<?php 
} else {
    // if (! isset($_REQUEST['op']))
Beispiel #3
0
                echo 'status' . $record['WoStatus'];
                ?>
 TERM<?php 
                echo strToClassName($record['TiTextLC']);
                ?>
" data_pos="<?php 
                echo $currcharcount;
                ?>
" data_order="<?php 
                echo $record['TiOrder'];
                ?>
" data_wid="<?php 
                echo $record['WoID'];
                ?>
" data_trans="<?php 
                echo tohtml(repl_tab_nl($record['WoTranslation']) . getWordTagList($record['WoID'], ' ', 1, 0));
                ?>
" data_rom="<?php 
                echo tohtml($record['WoRomanization']);
                ?>
" data_status="<?php 
                echo $record['WoStatus'];
                ?>
" data_mw2="<?php 
                echo tohtml($titext[2]);
                ?>
" data_mw3="<?php 
                echo tohtml($titext[3]);
                ?>
" data_mw4="<?php 
                echo tohtml($titext[4]);
Beispiel #4
0
     $pass++;
     $sql = 'SELECT DISTINCT WoID, WoText, WoTextLC, WoTranslation, WoRomanization, WoSentence, (ifnull(WoSentence,\'\') not like concat(\'%{\',WoText,\'}%\')) as notvalid, WoStatus, DATEDIFF( NOW( ), WoStatusChanged ) AS Days, WoTodayScore AS Score FROM ' . $testsql . ' AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != \'\' AND WoTranslation != \'*\' AND WoTodayScore < 0 ' . ($pass == 1 ? 'AND WoRandom > RAND()' : '') . ' order by WoTodayScore, WoRandom LIMIT 1';
     if ($debug) {
         echo 'DEBUG TEST-SQL: ' . $sql . '<br />';
     }
     $res = mysql_query($sql);
     if ($res == FALSE) {
         die("Invalid query: {$sql}");
     }
     $record = mysql_fetch_assoc($res);
     if ($record) {
         $num = 1;
         $wid = $record['WoID'];
         $word = $record['WoText'];
         $wordlc = $record['WoTextLC'];
         $trans = repl_tab_nl($record['WoTranslation']) . getWordTagList($wid, ' ', 1, 0);
         $roman = $record['WoRomanization'];
         $sent = repl_tab_nl($record['WoSentence']);
         $notvalid = $record['notvalid'];
         $status = $record['WoStatus'];
         $days = $record['Days'];
         $score = $record['Score'];
         $pass = 2;
     }
     mysql_free_result($res);
 }
 if ($num == 0) {
     // should not occur but...
     echo '<p class="center"><img src="img/ok.png" alt="Done!" /><br /><br /><span class="red2">Nothing to test here!</span></p></div>';
     $count = 0;
 } else {
Beispiel #5
0
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
pagestart_nobody('Term');
$wid = getreq('wid');
$ann = stripTheSlashesIfNeeded($_REQUEST["ann"]);
if ($wid == '') {
    my_die('Word not found in show_word.php');
}
$sql = 'select WoLgID, WoText, WoTranslation, WoSentence, WoRomanization, WoStatus from ' . $tbpref . 'words where WoID = ' . $wid;
$res = do_mysql_query($sql);
if ($record = mysql_fetch_assoc($res)) {
    $transl = repl_tab_nl($record['WoTranslation']);
    if ($transl == '*') {
        $transl = '';
    }
    $tags = getWordTagList($wid, '', 0, 0);
    $rom = $record['WoRomanization'];
    $scrdir = getScriptDirectionTag($record['WoLgID']);
    ?>


<table class="tab2" cellspacing="0" cellpadding="5">
<tr>
<td class="td1 right" style="width:30px;">Term:</td>
<td class="td1" style="font-size:120%;" <?php 
    echo $scrdir;
    ?>
><b><?php 
    echo tohtml($record['WoText']);
    ?>
</b></td>