Learning with Texts - Fork 2.9.0-fork
Learn foreign languages with texts
Loading...
Searching...
No Matches
Functions | Variables
upload_words.php File Reference

Import terms from file or Text area. More...

Functions

 my_str_getcsv ($input)
 
 upload_words_import_simple ( $lang, $fields, $columns, $tabs, $file_name, $status)
 
 upload_words_import_complete ( $lang, $fields, $columns, $tabs, $file_name, $status, $overwrite)
 
 upload_words_handle_multiwords ($lang, $last_update)
 
 upload_words_import_terms ($fields, $tabs, $file_upl, $col, $lang)
 
 display_imported_terms ($last_update, $rtl)
 
 upload_words_import_tags ($fields, $tabs, $file_upl)
 
 upload_words_import ()
 
 upload_words_display ()
 

Variables

if(isset($_REQUEST['op'])) else
 

Detailed Description

Import terms from file or Text area.

Call: upload_words.php?.... ... op=Import ... do the import

PHP version 8.1

Function Documentation

◆ display_imported_terms()

display_imported_terms (   $last_update,
  $rtl 
)

Navigation header for the imported terms.

Parameters
{JSON}data Data object for navigation.
{string}last_update Terms import timestamp for SQL
{bool}rtl If text is right-to-left

Create the rows with the imported terms.

Parameters
{JSON}data Data object containing terms.
{bool}rtl If text is right-to-left.
Returns
{string} HTML-formated rows to display

Display page content based on raw server answer.

Parameters
{JSON}data Data object for navigation.
{string}last_update Terms import timestamp for SQL
{bool}rtl If text is right-to-left

Show the terms imported.

Parameters
{string}last_update Last update date in SQL compatible format
{bool}rtl If text is right-to-left
{int}count Number of terms imported
{int}page Current page number

◆ my_str_getcsv()

my_str_getcsv (   $input)

Get the CSV from a string.

Parameters
string$inputInput string.
Returns
(null|string)[]|false|null

@psalm-return false|non-empty-list<null|string>|null

Deprecated:
2.9.0 This function is no longer used and will be removed

◆ upload_words_display()

upload_words_display ( )

Display the main for adding new words.

Returns
void

Show a supplementary field depending on long text import mode.

◆ upload_words_import()

upload_words_import ( )

Import terms of tags to the database.

Returns
void

@global string $tbpref Database table prefix

◆ upload_words_import_tags()

upload_words_import_tags (   $fields,
  $tabs,
  $file_upl 
)

Import term tags only to the database.

Parameters
array$fieldsFields indexes
string$tabsColumns separator
bool$file_uplIf the input text is an uploaded file
Returns
void

@global string $tbpref Database table prefix

◆ upload_words_import_terms()

upload_words_import_terms (   $fields,
  $tabs,
  $file_upl,
  $col,
  $lang 
)

Import terms to the database.

Parameters
array$fieldsFields indexes
string$tabsColumns separator
bool$file_uplIf the input text is an uploaded file
array<int,string>$col Columns names
int$langLanguage ID
Returns
string Last word update timestamp

@global string $tbpref Database table prefix

Variable Documentation

◆ else

if (isset( $_REQUEST[ 'op'])) else
Initial value:
{
upload_words_display()
Definition: upload_words.php:974