Class constructor
void
PolarCalendar
(integer $user_id, [integer $week_nb = null])
-
integer
$user_id: User ID (as in database)
-
integer
$week_nb: Number of weeks to display, take config $GLOBALS['calendar_week_nb'] if null.
Display online exercises and day info summary between 2 dates in HTML array
void
display_html
([string $min_date = NULL], [string $max_date = NULL], string $nickname)
-
string
$min_date: Format YYYY-MM-DD, default: first day of current week - N-1 weeks
-
string
$max_date: Format YYYY-MM-DD, default: min_date + N weeks
-
string
$nickname: User nickname to display
Get online exercises and day info summary between 2 dates
array
get_days
([string $min_date = NULL], [string $max_date = NULL])
-
string
$min_date: Format YYYY-MM-DD, default: first day of current week - N-1 weeks
-
string
$max_date: Format YYYY-MM-DD, default: min_date + N weeks
Get first and last days of a period matching weeks
void
get_week_limits
(string &$min_date, string &$max_date)
-
string
&$min_date: Format YYYY-MM-DD, if NULL: first day of current week - N-1 weeks
-
string
&$max_date: Format YYYY-MM-DD, if NULL: min_date + N weeks
Close a GD graph and create GIF file in TMP directory
string
_close_bar_graph
(handler $img)
-
handler
$img: GD image handler
Display graphical bar graph for heart rate distribution (whole week)
GD library is used.
string
_display_hr_graph_bar
(array $hrs, integer $elapsed, integer $max_elapsed, integer $rest_hr, integer $max_hr, integer &$width, integer &$height)
-
array
$hrs: Array of heart distribution (from stat table)
-
integer
$elapsed: Elapsed time for whole week (seconds x 10)
-
integer
$max_elapsed: Maximum elapsed time for displayed weeks (seconds x 10), used to set bar graph length.
-
integer
$rest_hr: Rest heart rate
-
integer
$max_hr: Maximum heart rate
-
integer
&$width: Image width in pixels
-
integer
&$height: Image height in pixels
Display navigation bar
void
_gen_navigation_bar
(string $min_exe_date, string $max_exe_date, string $min_date)
-
string
$min_exe_date: Date of first exercise for user (format YYYY-MM-DD).
-
string
$max_exe_date: Date of last exercise for user (format YYYY-MM-DD).
-
string
$min_date: Date of first day displayed (must be a monday) (format YYYY-MM-DD).
Get heart rate statistics for exercises within a period
array
_get_exercises_hr_stats
(string $min_day, string $max_day)
-
string
$min_day: First day of period (format : YYYY-MM-DD)
-
string
$max_day: Last day of period (format : YYYY-MM-DD)