Пример #1
0
    $dictionary->add_ignored_word($dictionary->get_current_word());
    $dictionary->find_next_word();
} else {
    if (isset($_POST['add'])) {
        // User wants to add the current word to his dictionary
        if (isset($_POST['word']) && strlen(trim($_POST['word'])) > 0) {
            $t_custom_word = trim($_POST['word']);
            $dictionary->add_custom_word($t_custom_word);
        }
        $dictionary->find_next_word();
    } else {
        if (isset($_POST['change'])) {
            // User has selected to change the current word
            if (isset($_POST['change_to']) && strlen(trim($_POST['change_to'])) > 0) {
                $t_change_to = trim($_POST['change_to']);
                $dictionary->correct_current_word($t_change_to);
            }
            $dictionary->find_next_word();
        } else {
            if (isset($_POST['changeall'])) {
                // User has selected to change the current word
                if (isset($_POST['change_to']) && strlen(trim($_POST['change_to'])) > 0) {
                    $t_change_to = trim($_POST['change_to']);
                    $dictionary->correct_all_word_matches($t_change_to);
                }
                $dictionary->find_next_word();
            } else {
                if (isset($_POST['suggest'])) {
                    // Get more suggestions for the current word
                    $dictionary->get_more_suggestions();
                } else {