forked from chaosarium/lwt
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/dev' into patch-2
- Loading branch information
Showing
342 changed files
with
5,646 additions
and
2,513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/all__words__wellknown_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/all-words-wellknown.html | ||
* @since 1.0.3 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/backup__restore_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/backup-restore.html | ||
* @since 1.0.3 | ||
*/ | ||
|
||
|
@@ -266,7 +266,7 @@ | |
`WoRomanization` varchar(100) DEFAULT NULL, | ||
`WoSentence` varchar(1000) DEFAULT NULL, | ||
`WoCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
`WoStatusChanged` timestamp NOT NULL DEFAULT '0000-00-00 00:00:01', | ||
`WoStatusChanged` timestamp NOT NULL DEFAULT '1970-01-01 01:00:01', | ||
`WoTodayScore` double NOT NULL DEFAULT '0', | ||
`WoTomorrowScore` double NOT NULL DEFAULT '0', | ||
`WoRandom` double NOT NULL DEFAULT '0', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/bulk__translate__words_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/bulk-translate-words.html | ||
* @since 1.6.1 | ||
*/ | ||
|
||
|
@@ -168,6 +168,44 @@ function bulk_do_content($tid, $sl, $tl, $pos): void | |
WBLINK3 = '<?php echo $wb3; ?>'; | ||
$('h3,h4,title').addClass('notranslate'); | ||
|
||
function clickDictionary() { | ||
if ($(this).hasClass( "dict1" )) | ||
WBLINK = WBLINK1; | ||
if ($(this).hasClass( "dict2" )) | ||
WBLINK = WBLINK2; | ||
if ($(this).hasClass( "dict3" )) | ||
WBLINK = WBLINK3; | ||
let dict_link = WBLINK; | ||
let popup; | ||
if (dict_link.startsWith('*')) { | ||
popup = true; | ||
dict_link = dict_link.substring(1); | ||
} | ||
try { | ||
let final_url = new URL(dict_link); | ||
popup = popup || final_url.searchParams.has("lwt_popup"); | ||
} catch (err) { | ||
if (!(err instanceof TypeError)) { | ||
throw err; | ||
} | ||
} | ||
if (popup) { | ||
owin(createTheDictUrl( | ||
dict_link, $(this).parent().prev().text() | ||
)); | ||
} else { | ||
window.parent.frames['ru'].location.href = createTheDictUrl( | ||
dict_link, $(this).parent().prev().text() | ||
); | ||
} | ||
$('[name="WoTranslation"]') | ||
.attr('name',$('[name="WoTranslation"]') | ||
.attr('data_name')); | ||
const el = $(this).parent().parent().next().children(); | ||
el.attr('data_name', el.attr('name')); | ||
el.attr('name','WoTranslation'); | ||
} | ||
|
||
const bulk_interactions = function() { | ||
$('[name="form1"]').submit(function() { | ||
$('[name="WoTranslation"]').attr('name',$('[name="WoTranslation"]') | ||
|
@@ -179,43 +217,7 @@ function bulk_do_content($tid, $sl, $tl, $pos): void | |
$('td').on( | ||
'click', | ||
'span.dict1, span.dict2, span.dict3', | ||
function() { | ||
if ($(this).hasClass( "dict1" )) | ||
WBLINK = WBLINK1; | ||
if ($(this).hasClass( "dict2" )) | ||
WBLINK = WBLINK2; | ||
if ($(this).hasClass( "dict3" )) | ||
WBLINK = WBLINK3; | ||
let dict_link = WBLINK; | ||
let popup; | ||
if (dict_link.startsWith('*')) { | ||
popup = true; | ||
dict_link = dict_link.substring(1); | ||
} | ||
try { | ||
let final_url = new URL(dict_link); | ||
popup = popup || final_url.searchParams.has("lwt_popup"); | ||
} catch (err) { | ||
if (!(err instanceof TypeError)) { | ||
throw err; | ||
} | ||
} | ||
if (popup) { | ||
owin(createTheDictUrl( | ||
dict_link, $(this).parent().prev().text() | ||
)); | ||
} else { | ||
window.parent.frames['ru'].location.href = createTheDictUrl( | ||
dict_link, $(this).parent().prev().text() | ||
); | ||
} | ||
$('[name="WoTranslation"]') | ||
.attr('name',$('[name="WoTranslation"]') | ||
.attr('data_name')); | ||
el = $(this).parent().parent().next().children(); | ||
el.attr('data_name', el.attr('name')); | ||
el.attr('name','WoTranslation'); | ||
} | ||
clickDictionary | ||
).on( | ||
'click', | ||
'.del_trans', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/check__text_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/check-text.html | ||
* @since 1.0.3 | ||
*/ | ||
|
||
|
@@ -74,7 +74,7 @@ function change_textboxes_language() { | |
$('#TxText').attr('lang', language_data[lid]); | ||
} | ||
|
||
$(document).ready(ask_before_exiting); | ||
$(document).ready(lwt_form_check.askBeforeExit); | ||
$(document).ready(change_textboxes_language); | ||
</script> | ||
<form class="validate" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* @package Lwt | ||
* @author HugoFara <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/database__wizard_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/database-wizard.html | ||
* @since 2.5.0-fork | ||
*/ | ||
|
||
|
@@ -27,7 +27,7 @@ | |
* @package Lwt | ||
* @author HugoFara <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/database__wizard_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/database-wizard.html | ||
*/ | ||
class Database_Connection | ||
{ | ||
|
@@ -140,16 +140,18 @@ function writeToFile($conn) | |
function doOperation($op) | ||
{ | ||
$message = null; | ||
$dbname = null; | ||
$passwd = null; | ||
$server = null; | ||
$socket = null; | ||
$userid = null; | ||
$passwd = null; | ||
$dbname = null; | ||
$socket = null; | ||
if ($op == "Autocomplete") { | ||
$_SERVER['SERVER_ADDR']; | ||
$_SERVER['SERVER_NAME']; | ||
$server = (string) $_SERVER['SERVER_ADDR']; | ||
$userid = ""; | ||
$passwd = ""; | ||
$dbname = (string) $_SERVER['SERVER_NAME']; | ||
$socket = ""; | ||
} else if ($op == "Check") { | ||
//require_once 'inc/database_connect.php'; | ||
$server = getreq("server"); | ||
$userid = getreq("userid"); | ||
$passwd = getreq("passwd"); | ||
|
@@ -183,11 +185,11 @@ function doOperation($op) | |
} | ||
} | ||
} else if ($op == "Change") { | ||
getreq("server"); | ||
getreq("userid"); | ||
getreq("passwd"); | ||
getreq("dbname"); | ||
getreq("socket"); | ||
$server = getreq("server"); | ||
$userid = getreq("userid"); | ||
$passwd = getreq("passwd"); | ||
$dbname = getreq("dbname"); | ||
$socket = getreq("socket"); | ||
} | ||
$conn = new Database_Connection( | ||
$server, $userid, $passwd, $dbname, $socket | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/delete__mword_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/delete-mword.html | ||
* @since 1.0.3 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/display__impr__text_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/display-impr-text.html | ||
* @since 1.5.0 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/display__impr__text__header_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/display-impr-text-header.html | ||
* @since 1.5.0 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/display__impr__text__text_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/display-impr-text-text.html | ||
* @since 1.5.0 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/do__test_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/do-test.html | ||
* @since 1.0.3 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/do__test__header_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/do-test-header.html | ||
* @since 1.0.3 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/do__test__table_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/do-test-table.html | ||
* @since 1.5.4 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package Lwt | ||
* @author LWT Project <[email protected]> | ||
* @license Unlicense <http://unlicense.org/> | ||
* @link https://hugofara.github.io/lwt/docs/html/do__test__test_8php.html | ||
* @link https://hugofara.github.io/lwt/docs/php/files/do-test-test.html | ||
* @since 1.0.3 | ||
*/ | ||
|
||
|
@@ -702,9 +702,14 @@ function do_test_test_interaction_globals($wb1, $wb2, $wb3) | |
*/ | ||
function do_test_test_javascript_clickable($wo_record, $solution) | ||
{ | ||
global $tbpref; | ||
$wid = $wo_record['WoID']; | ||
$abbr = getLanguageCode($wo_record['WoLgID'], LWT_LANGUAGES_ARRAY); | ||
$phoneticText = phonetic_reading($wo_record['WoText'], $abbr); | ||
$voiceApi = get_first_value( | ||
"SELECT LgTTSVoiceAPI AS value FROM {$tbpref}languages | ||
WHERE LgID = " . $wo_record['WoLgID'] | ||
); | ||
?> | ||
<script type="text/javascript"> | ||
/** | ||
|
@@ -721,6 +726,7 @@ function read_word() { | |
|
||
SOLUTION = <?php echo prepare_textdata_js($solution); ?>; | ||
WID = <?php echo $wid; ?>; | ||
LWT_LANG_DATA.tpVoiceApi = <?php echo json_encode($voiceApi); ?>; | ||
|
||
$(document).on('keydown', keydown_event_do_test_test); | ||
$('.word') | ||
|
Oops, something went wrong.