summary refs log tree commit diff stats
path: root/includes
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-08-13 17:46:09 -0400
committerStarla Insigna <hatkirby@fourisland.com>2009-08-13 17:46:09 -0400
commitb5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a (patch)
tree0449277e94a42aa155995a90fd8a89cb3309e7ab /includes
parent6a1d5b60e6ec541a36727b84b71168f62221f7d7 (diff)
downloadfourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.tar.gz
fourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.tar.bz2
fourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.zip
Rewrote Admin panel
The following database changes must be made:

* A TEXT column called "text" must be added to the end of "polloftheweek"
* The transferPollRss.php script must be run
* The "pollrss" table must be dropped

Closes #113
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