Class constructor
void
PolarUpload
(integer $user_id)
-
integer
$user_id: User ID (as in database)
Copy selected files from upload directory to user data directory
If there is some problem with creating files, try to create in temp directory of web server. Copy one by one (option : 10 by 10)
data directory structure is : <user_id>/<year>. Directory are created if needed.
integer
copy_selected_files
(array $files, array $selection)
-
array
$files: Contains information on uploaded files. See gen_files_status() for structure.
-
array
$selection: Array of selected files in $files to copy
Display HTML table / form to copy uploaded files
boolean
display_table
(array $files, array $person, array $days)
-
array
$files: Contains information on uploaded files. See gen_files_status() for structure.
-
array
$person: Index of ppd file in $files if any
-
array
$days: Array indexed by day 'YYYYMMDD' which contains information for every day: 'info': day information, 'exes': exercises. 'info' structure :
- 'f_ind' : Index to pdd file in $files
- 'description' : Day comment
'exes' structure : - 'f_ind' : Index to hrm file in $files
- 'title' : Exercise title
- 'sport_id' : Sport ID (user specific)
- 'start_time' : Start time (HHMM)
- 'total_time' : Duration of exercise in seconds * 10
- 'real_distance' : Distance in meters
- 'ascend' : Ascend in meters
- 'description' : Exercise comment
Generate array of uploaded files with status and some data
array
gen_files_status
(array $jupload_tab, array &$person, array &$days)
-
array
$jupload_tab: Array of files ($_SESSION['juvar.files'])
-
array
&$person: Structure with person data (if any)
-
array
&$days: Array of days and exercises
Display multiple selection row
void
_action_row
()
Get localized strings common to all types of files and return file size
integer
_get_file_strings
(integer $f_ind, array $file, string &$type, string &$status, string &$checkbox, array &$sum_file_by_status, array &$sum_file_by_type)
-
integer
$f_ind: Index of file in files array
-
array
$file: File structure
-
string
&$type: File type
-
string
&$status: File status
-
string
&$checkbox: Checkbox HTML input
-
array
&$sum_file_by_status: in/out : add file size to status
-
array
&$sum_file_by_type: in/out : add file size to type
Display table header or footer
void
_table_header
()