Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Free Torrent Source (http://www.bvlist.com/forumdisplay.php?f=25)
-   -   mod progression donation (http://www.bvlist.com/showthread.php?t=10134)

ADRIEN69 30th November 2014 16:16

mod progression donation
 
hello,
I want to put a donation system better than on my site.

example:

-progress bar
- amount paid by the members
- Maximum amount of donation

could someone explain to me the process please

thank you to you

my donate_block.php :
PHP Code:

<?php
begin_block
(T_("DONATE"));
$totalneeded "100"//=== set this to your monthly wanted amount
$totalneeded3 ="$".sprintf("%01.2f"$totalneeded);
$month1 sqlesc(gmdate("m"));
$year1 sqlesc(gmdate("Y"));
$total_funds1 SQL_Query_exec("SELECT sum(cash) as total_funds FROM `funds` WHERE month=$month1 && year = $year1");
$arr_funds mysql_fetch_array($total_funds1);
$funds_so_far $arr_funds["total_funds"];
$funds_difference $totalneeded $funds_so_far;
$Progress_so_far $funds_so_far $totalneeded 100;

$Percent $Progress_so_far;
$Percent floor(($Percent) * 100 .5) * .01;

if(
$Progress_so_far >= $totalneeded)
$Progress_so_far "100";
$Progress_so_far2 $Progress_so_far;
if (
$funds_so_far <= 300){
$pic "images/donate/loadbarred.gif";
$Progress_so_far2 20;
}
elseif (
$funds_so_far <= 500)
$pic "images/donate/loadbaryellow.gif";
else 
$pic "images/donate/loadbargreen.gif";
if(
$totalneeded >= $funds_so_far) {
$monthly_goal "[ ".round($Progress_so_far)."%";
$monthly_goal22 " of monthly goal.]";
}
else
$monthly_goal "[ Monthly goal met! ]";


print(
"<center><table cellpadding=3 class=main border=0>".
"<td class=row3 align=center><p align=center>"."<table width=175 hight=17 border=2><td width=$Progress_so_far2% height=15 background=$pic align=center valign=middle>".
"$monthly_goal</td><td style='padding: 0px; background-image: 
url(images/donate/loadbarbg.gif); background-repeat: repeat-x'>"
.
"$monthly_goal22</td></tr></table> ".
"<a href=\"donate.php\"><img src=\"images/donate/donate.gif\"></a>");

print(
"</td></tr></table></center>");
end_block();
?>

my image : http://nsa34.casimages.com/img/2014/...3164636201.png

thank you for your answer

matranalexoficial 19th January 2015 13:23

scheme sql
 
add scheme sql

BamBam0077 19th January 2015 20:15

Change This:

Code:


$totalneeded
= "100"; #
Maximum amount of donation




You Edit:
Progress Bar
Code:

print("
".
"

"."

$Progress_so_far2% height=15 background=$pic align=center valign=middle>".
"$monthly_goal
".
"$monthly_goal22
".
"");

print(
"
");




Quote:

amount paid by the members
Paste Your Donation Page Please
Good Luck!




All times are GMT +2. The time now is 23:19.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.