Bravo List
Register
Go Back   > Bravo List > Sourcecode > Free Torrent Source
Reply
  #1  
Old 30-11-14, 16:16
ADRIEN69's Avatar
ADRIEN69 ADRIEN69 is offline
Member
 
Join Date: Nov 2014
Posts: 11
Default 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 : Click the image to open in full size.

thank you for your answer
Reply With Quote
  #2  
Old 19-01-15, 13:23
matranalexoficial's Avatar
matranalexoficial matranalexoficial is offline
Member
 
Join Date: Oct 2014
Posts: 1
Default scheme sql
add scheme sql
Reply With Quote
  #3  
Old 19-01-15, 20:15
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Support
 
Join Date: Jul 2013
P2P
Posts: 229
Default
Change This:

Code:

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



You Edit:
Progress Bar
Code:
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=\"http://www.bvlist.com/images/donate/donate.gif\"></a>"); 

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



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


__________________
"Iíve got a fire in me,
Thereís so much I have to see,
From where I was before,
To how far Iíve yet to go"

Last edited by BamBam0077; 19-01-15 at 20:44.
Reply With Quote
Reply

Tags
donation , mod , progression

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 06:27. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.