summary refs log tree commit diff stats
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/functions.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/functions.php b/includes/functions.php index 090e9d0..b0b28d5 100755 --- a/includes/functions.php +++ b/includes/functions.php
@@ -65,7 +65,14 @@ function dispIfNotOld($datTim)
65function getpercent($getpoll3,$num) 65function getpercent($getpoll3,$num)
66{ 66{
67 $maxper = ($getpoll3['clicks1'] + $getpoll3['clicks2'] + $getpoll3['clicks3'] + $getpoll3['clicks4']); 67 $maxper = ($getpoll3['clicks1'] + $getpoll3['clicks2'] + $getpoll3['clicks3'] + $getpoll3['clicks4']);
68 $percent = round(($getpoll3['clicks' . $num] / $maxper) * 100); 68
69 if ($maxper == 0)
70 {
71 return 0;
72 } else {
73 $percent = round(($getpoll3['clicks' . $num] / $maxper) * 100);
74 }
75
69 return($percent); 76 return($percent);
70} 77}
71 78