$wid = get_last_key(); } else { $oldstatus = $_REQUEST["WoOldStatus"]; $newstatus = $_REQUEST["WoStatus"]; $xx = ''; if ($oldstatus != $newstatus) { $xx = ', WoStatus = ' . $newstatus . ', WoStatusChanged = NOW()'; } $wid = $_REQUEST["WoID"] + 0; $message = runsql('update ' . $tbpref . 'words set WoText = ' . convert_string_to_sqlsyntax($_REQUEST["WoText"]) . ', WoTextLC = ' . convert_string_to_sqlsyntax(mb_strtolower($_REQUEST["WoText"], 'UTF-8')) . ', WoTranslation = ' . convert_string_to_sqlsyntax($translation) . ', WoSentence = ' . convert_string_to_sqlsyntax(repl_tab_nl($_REQUEST["WoSentence"])) . ', WoRomanization = ' . convert_string_to_sqlsyntax($_REQUEST["WoRomanization"]) . $xx . ',' . make_score_random_insert_update('u') . ' where WoID = ' . $_REQUEST["WoID"], "Updated", $sqlerrdie = FALSE); } saveWordTags($wid); } // NEW if (isset($_REQUEST['new']) && isset($_REQUEST['lang'])) { $scrdir = getScriptDirectionTag($_REQUEST['lang']); ?> <h4>New Term</h4> <script type="text/javascript" src="js/unloadformcheck.js" charset="utf-8"></script> <form name="newword" class="validate" action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post"> <input type="hidden" name="WoLgID" id="langfield" value="<?php echo $_REQUEST['lang']; ?> " /> <table class="tab3" cellspacing="0" cellpadding="5"> <tr> <td class="td1 right">Language:</td>
$lang = $record['WoLgID']; $transl = repl_tab_nl($record['WoTranslation']); if ($transl == '*') { $transl = ''; } $sentence = repl_tab_nl($record['WoSentence']); $rom = $record['WoRomanization']; $status = $record['WoStatus']; } else { die("Error: No results"); } mysql_free_result($res); $termlc = mb_strtolower($term, 'UTF-8'); $titeltext = "Edit Term: " . tohtml($term); pagestart_nobody($titeltext); $scrdir = getScriptDirectionTag($lang); ?> <form name="editword" class="validate" action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post"> <input type="hidden" name="WoID" value="<?php echo $wid; ?> " /> <input type="hidden" name="WoOldStatus" value="<?php echo $status; ?> " /> <input type="hidden" name="WoTextLC" value="<?php
?> </select> <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">Title:</td> <td class="td1"><input type="text" class="notempty" name="TxTitle" value="<?php echo tohtml($record['TxTitle']); ?> " maxlength="200" size="60" /> <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">Text:<br /><br />(max.<br />65,000<br />bytes)</td> <td class="td1"> <textarea <?php echo getScriptDirectionTag($record['TxLgID']); ?> name="TxText" class="notempty checkbytes" data_maxlength="65000" data_info="Text" cols="60" rows="20"><?php echo tohtml($record['TxText']); ?> </textarea> <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">Ann.Text:</td> <td class="td1"> <?php echo $record['annotlen'] ? '<img src="icn/tick.png" title="With Improved Annotation" alt="With Improved Annotation" /> Exists - May be partially or fully lost if you change the text!<br /><input type="button" value="Print/Edit..." onclick="location.href=\'print_impr_text.php?text=' . $_REQUEST['chg'] . '\';" />' : '<img src="icn/cross.png" title="No Improved Annotation" alt="No Improved Annotation" /> - None | <input type="button" value="Create/Print..." onclick="location.href=\'print_impr_text.php?edit=1&text=' . $_REQUEST['chg'] . '\';" />'; ?> </td> </tr>
$textno++; $textstring = str_replace("¶", "\n", implode(" ", $item)); $bytes = strlen($textstring); ?> <tr> <td class="td1 right"><b>Text <?php echo $textno + 1; ?> :</b><br /><br /><br />Length:<br /><?php echo $bytes; ?> <br />Bytes</td> <td class="td1"> <textarea readonly="readonly" <?php echo getScriptDirectionTag($langid); ?> name="text[<?php echo $textno; ?> ]" cols="60" rows="10"><?php echo str_replace('¶', "\n", str_replace("¶ ", "\n", implode(" ", $item))); ?> </textarea> </td> </tr> <?php } ?> </table> </form>
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> </tr> <tr>