Create or edit single word.
More...
|
|
| $translation_raw = repl_tab_nl(getreq("WoTranslation")) |
| |
| if($translation_raw=='') | else |
| |
|
| $fromAnn = getreq("fromAnn") |
| |
|
| $hex = null |
| |
|
| $lang = null |
| |
|
| $term = null |
| |
|
| $res = do_mysqli_query($sql) |
| |
|
| $record = mysqli_fetch_assoc($res) |
| |
|
| $termlc = mb_strtolower($term, 'UTF-8') |
| |
|
| $new = (isset($wid) == false) |
| |
|
| $titletext = ($new ? "New Term" : "Edit Term") . ": " . tohtml($term) |
| |
|
| $scrdir = getScriptDirectionTag($lang) |
| |
Create or edit single word.
Call: edit_word.php?.... ... op=Save ... do insert new ... op=Change ... do update ... fromAnn=recno ... calling from impr. annotation editing ... tid=[textid]&ord=[textpos]&wid= ... new word
... tid=[textid]&ord=[textpos]&wid=[wordid] ... edit word
- Since
- 1.0.3
- Author
- LWT Project lwt-p.nosp@m.roje.nosp@m.ct@ho.nosp@m.tmai.nosp@m.l.com
◆ change_term_display()
| change_term_display |
( |
|
$wid, |
|
|
|
$translation, |
|
|
|
$hex |
|
) |
| |
Echoes a JavaScript element, that will edit terms diplay
◆ edit_term()
| edit_term |
( |
|
$translation | ) |
|
Edit an existing term.
- Parameters
-
| string | $translation | New translation for this term |
- Returns
- array{0: string, 1: string} Word id, and then an insertion message
◆ insert_new_word()
| insert_new_word |
( |
|
$textlc, |
|
|
|
$translation |
|
) |
| |
Insert a new word to the database
- Parameters
-
| string | $textlc | The word to insert, in lowercase |
| string | $translation | Translation of this term |
- Returns
- array{0: string, 1: string} Word id, and then an insertion message
◆ lowercase_term_not_equal()
| lowercase_term_not_equal |
( |
|
$textlc | ) |
|
Use this function if the lowercase version of the word does not correspond. It will echo an error message.
- Parameters
-
| string | $textlc | The lowercase version of the word we want. |
◆ else
Initial value:{
$translation = $translation_raw