diff --git a/afanasy/statistics/favicon.ico b/afanasy/statistics/favicon.ico new file mode 100644 index 000000000..1b8ae5e86 Binary files /dev/null and b/afanasy/statistics/favicon.ico differ diff --git a/afanasy/statistics/index.html b/afanasy/statistics/index.html index e109a24bb..6b722d520 100644 --- a/afanasy/statistics/index.html +++ b/afanasy/statistics/index.html @@ -3,10 +3,8 @@ AFANASY Statistics - - + - diff --git a/afanasy/statistics/server.php b/afanasy/statistics/server.php index f9533acd0..0d0ca607a 100644 --- a/afanasy/statistics/server.php +++ b/afanasy/statistics/server.php @@ -236,7 +236,8 @@ function get_jobs_table( $i_args, &$o_out) } pg_free_result($sub_result); $line['fav_name'] = $sub_name; - $line['fav_percent'] = $sub_favourite/$sub_total; + if ($sub_total > 0) + $line['fav_percent'] = $sub_favourite/$sub_total; $o_out['table'][] = $line; } @@ -304,7 +305,8 @@ function get_tasks_folders( $i_args, &$o_out) } pg_free_result($sub_result); $line['fav_service'] = $sub_name; - $line['fav_service_percent'] = $sub_favourite/$sub_total; + if ($sub_total > 0) + $line['fav_service_percent'] = $sub_favourite/$sub_total; # Get folder favorite user: $sub_query=" @@ -331,7 +333,8 @@ function get_tasks_folders( $i_args, &$o_out) } pg_free_result($sub_result); $line['fav_user'] = $sub_name; - $line['fav_user_percent'] = $sub_favourite/$sub_total; + if ($sub_total > 0) + $line['fav_user_percent'] = $sub_favourite/$sub_total; $o_out['table'][] = $line; } @@ -399,7 +402,8 @@ function get_tasks_table( $i_args, &$o_out) } pg_free_result($sub_result); $line['fav_name'] = $sub_name; - $line['fav_percent'] = $sub_favourite/$sub_total; + if ($sub_total > 0) + $line['fav_percent'] = $sub_favourite/$sub_total; $o_out['table'][] = $line; }