Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   Donations Page with Auto Paypal Mod (http://www.bvlist.com/showthread.php?t=524)

D3SI 27th June 2008 22:36

Donations Page with Auto Paypal Mod
 
1 Attachment(s)
ScreenShot of Donate Page

Attachment 920

Files:

donate.php
Updated
Code:

require 'include/bittorrent.php';
dbconn();
loggedinorreturn();
$nick = ($CURUSER ? $CURUSER['username'] : ('Guest' . rand(1000, 9999)));
stdhead('Donate');
#Last Update: 29-06-2008

#Easy Configuration
#Added by D3SI
#Start
#Set Donations Amount here [ use same in Paypal.php]
$amount5 = 5; # For 5
$amount10 = 10;# For 10 Etc....
$amount20 = 20;
$amount30 = 60;
$amount40 = 40;
$amount50 = 50;
$amount100 = 150;

#Set the length [Same in Paypal.php]
$length5 = 1;
$length10 = 1;
$length20= 2;
$length30 = 6;
$length40= 4;
$length50= 5;
$length100= 10;

#Set the Currency Type
$currencytype = 'Euro'; #For Fonts
$currencytype2 = '€'; #For Sign
$currencytype3 = 'EUR'; #Main Currency for Donations

#Set the Class for Donations
$class5 = 'VIP';
$class10 = 'VIP';
$class20 = 'VIP';
$class30 = 'VIP';
$class40 = 'VIP';
$class50 = 'PLATINIUM';
$class100 = 'PLATINIUM';

#Donate Email
$DONATEMAIL = 'Email-here'; #Your Paypal email address here. Same in paypal.php

#End
?>


Thank You for visiting Donations page



Special Offers









#Start?>


#End?>


#Start?>




#Finish?>


#Start?>
















Donate 5

Donate 5 and  receive:[*]GB Upload Credits[*] Week .[*]Custom Title.[*]No Ads.[*]Donor Star.











'>

*/?>









Donate 10


Donate 10 and  receive:[*]GB Upload Credits[*] Week .[*]Custom Title.[*]No Ads.[*]Donor Star.













'>


*/?>







#End?>


#Start?>



Donate 20

Donate 20 and  receive:[*]GB Upload Credits[*] Weeks .[*]Custom Title.[*]No Ads.[*]Donor Star.










'>








*/?>







Donate 30

Donate 30 and  receive:[*]GB Upload Credits[*]Custom Title.[*] Weeks .[*]No Ads.[*]Donor Star.










'>









*/?>







Donate 40

Donate 40 and  receive:[*]GB Upload Credits[*] Week [*]Custom Title.[*]No Ads .[*]4 Invites.[*]Donor Star.










'>







*/?>






Donate 50

Donate 50 and  receive:[*]GB Upload Credits[*] Week [*]All Torrents Free[*]Custom Title.[*]No Ads .[*]Donor Star.










'>







*/?>






Donate 100

Donate 100 and  receive:[*]GB Upload Credits[*] Week [*]All Torrents Free[*]Custom Title.[*]No Ads .[*]Donor Star.










'>







*/?>






Default for All Donations

When you Donate you get[*]Custom Title.[*]No Ads .[*]Donor Star.[*]Invites.[*]Access to
 VIP Forum.[*]No wait time restrictions,
 regardless your ratio.[*]Immunity to the auto-ban
 because of low ratio.







     
     
       
     
     
       
     
     
IMPORTANT NOTES:

       
         
         
       
       
[*]Donations DO NOT exempt you from the rules or from being banned.[*]Donations will increase your ratio, but normal ratio rules will still apply.
                    #[*]If you have any problems with your donation or you have not recieved proper credit, send D3SI a PM.?>
         

          All donations will be processed with Paypal IPN, this means that right after you will complete the donation process, it will instantly credit your account.
       

       

     



stdfoot();
?>

Note: Remember to change
Code:

http://www.yoursite.com/paypal.php
to your site's link and
Code:

$DONATEMAIL
can be setup in bittorrent.php

like this:
Code:

////////Site donation email
$DONATEMAIL = "youremailadress.com";


paypal.php:
Code:

require "include/bittorrent.php";
dbconn();
#Working and Tested by D3SI
$donb=0;
// read the post from PayPal system and add 'cmd'
$req = 'cmd=_notify-validate';
foreach ($_POST as $key => $value)
{
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}
// post back to PayPal system to validate
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
// assign posted variables to local variables
$item_name = $_POST['item_name'];
$item_number = $_POST['item_number'];
$payment_status = $_POST['payment_status'];
$payment_amount = $_POST['mc_gross'];
$payment_currency = $_POST['mc_currency'];
$txn_id = $_POST['txn_id'];
$receiver_email = $_POST['receiver_email'];
$payer_email = $_POST['payer_email'];
$clid = $_POST['custom'];
$payment_type = $_POST['payment_type'];


// block pending echecks. paypal posts payments again when echecks clear, blocks double credits.
if ($payment_type == "echeck" && $payment_status == "Pending") die;

if (!$fp)
{}
else
{
fputs ($fp, $header . $req);
while (!feof($fp))
{
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0)
{
// process payment
if ($receiver_email == "email_here") #Your Paypal Emial here
{
settype($payment_amount, "float");
settype($payment_amount, "string");

$donated_time = get_date_time();

///Sort Upload and Donor time amounts
if ($payment_amount == 5)
{$days = 1*1;}
elseif ($payment_amount == 10)
{$days = 1*1;}
elseif ($payment_amount == 20)
{$days = 1*2;}
elseif ($payment_amount == 30)
{$days = 1*3;}
elseif ($payment_amount == 40)
{$days = 1*4;}
elseif ($payment_amount == 50)
{$days = 1*5;}
elseif ($payment_amount == 100)
{$days = 1*10;}
else {$days = 1*1;}

//set donor upload upgrade
if ($payment_amount == 5)
{$donb = 21474836480; }
#{$donb = 5368709120; }
elseif ($payment_amount == 10)
{$donb = 53687091200; }
#{$donb = 10737418240; }
elseif ($payment_amount == 20)
{$donb = 150323855360; }
#{$donb = 21474836480; }
elseif ($payment_amount == 30)
{$donb = 42949672960; }
elseif ($payment_amount == 40)
{$donb = 64424509440; }
elseif ($payment_amount == 50)
{$donb = 75161927680; }
elseif ($payment_amount == 100)
{$donb = 128849018880; }
else {
$donb = 1073741824*$payment_amount;}

//Set User Invites
if ($payment_amount == 5)
{$invites = 1; }
elseif ($payment_amount == 10)
{$invites = 1; }
elseif ($payment_amount == 20)
{$invites = 1; }
elseif ($payment_amount == 30)
{$invites = 1; }
elseif ($payment_amount == 40)
{$invites = 4; }
elseif ($payment_amount == 50)
{$invites = 4; }
elseif ($payment_amount == 100)
{$invites = 4; }
else {
$invites = 0;}

//get user information from DB
$query = "SELECT * FROM users WHERE id='".$clid."'";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$username = $row['username'];
$old=date($row['donoruntil']);
$class = $row['class'];
$dona = $row['uploaded'];

//Set class to VIP if lower then VIP
if ($payment_amount == 5 || $payment_amount == 10 || $payment_amount == 20 || $payment_amount == 30 || $payment_amount == 40 || $payment_amount == 50 ) {
if ($class <= 30)
{$class = 30;}}

$r = @mysql_query("SELECT * FROM users WHERE id=$clid") or sqlerr();
$user = mysql_fetch_array($r) or bark("No user with ID.");
//Reset download upload post and reset to zero H&R's
$query = "UPDATE users SET donor='yes', class=$class, warned ='no', invites=$invites WHERE id='".$clid."'";
$result = mysql_query("$query");

//Get Donor time if already some left from before
If ($old<>"0000-00-00 00:00:00")
{
$old1=strtotime($old)- gmtime();
$donateuntil = get_date_time((gmtime()  $days * 604800)  $old1);
}
else
{$donateuntil = get_date_time(gmtime()  $days * 604800);}
//add Upload bonus for amount given at 1Gb per


Fynnon 28th June 2008 00:47

Re: New Donations Page with Auto Paypal Mod
 
awesome, thank you !

:friend:

koolfire 28th June 2008 03:44

Re: New Donations Page with Auto Paypal Mod
 
man atleast tell wht is this for?!!!! TS OR TBDEV OR WHAT?!

Kotafi 28th June 2008 07:15

Re: New Donations Page with Auto Paypal Mod
 
Quote:

Originally Posted by koolfire
man atleast tell wht is this for?!!!! TS OR TBDEV OR WHAT?!

TBDEV and there are few others based on that :D:

D3SI 30th June 2008 19:00

Re: [TBDEV]Donations Page with Auto Paypal Mod
 
A small update:

instead of changing every line when you do special offers with more gigs and more weeks VIP i added a small bit at the top to change it easily

for example you make new offer on 5 USD and need to change the amount from 5 to 10GB
Code:

[*]5GB Upload Credits
New
Code:

[*]10GB Upload Credits
etc etc

same for class and Length.


Code:

$amount5 = 5; # For 5

#Set the length [Same in Paypal.php]
$length5 = 1;

#Set the Currency Type
$currencytype = 'Euro'; #For Fonts

#Set the Class for Donations
$class5 = 'VIP';

#Donate Email
$DONATEMAIL = 'Email-here'; #Your Paypal email address here. Same in paypal.php
?>

Whole new code for Donate page

donate.php
Code:

require 'include/bittorrent.php';
dbconn();
loggedinorreturn();
$nick = ($CURUSER ? $CURUSER['username'] : ('Guest' . rand(1000, 9999)));
stdhead('Donate');
#Last Update: 29-06-2008

#Easy Configuration
#Added by D3SI
#Start
#Set Donations Amount here [ use same in Paypal.php]
$amount5 = 5; # For 5
$amount10 = 10;# For 10 Etc....
$amount20 = 20;
$amount30 = 60;
$amount40 = 40;
$amount50 = 50;
$amount100 = 150;

#Set the length [Same in Paypal.php]
$length5 = 1;
$length10 = 1;
$length20= 2;
$length30 = 6;
$length40= 4;
$length50= 5;
$length100= 10;

#Set the Currency Type
$currencytype = 'Euro'; #For Fonts
$currencytype2 = '€'; #For Sign
$currencytype3 = 'EUR'; #Main Currency for Donations

#Set the Class for Donations
$class5 = 'VIP';
$class10 = 'VIP';
$class20 = 'VIP';
$class30 = 'VIP';
$class40 = 'VIP';
$class50 = 'PLATINIUM';
$class100 = 'PLATINIUM';

#Donate Email
$DONATEMAIL = 'Email-here'; #Your Paypal email address here. Same in paypal.php

#End
?>


Thank You for visiting Donations page



Special Offers









#Start?>


#End?>


#Start?>




#Finish?>


#Start?>
















Donate 5

Donate 5 and  receive:[*]GB Upload Credits[*] Week .[*]Custom Title.[*]No Ads.[*]Donor Star.











'>

*/?>









Donate 10


Donate 10 and  receive:[*]GB Upload Credits[*] Week .[*]Custom Title.[*]No Ads.[*]Donor Star.













'>


*/?>







#End?>


#Start?>



Donate 20

Donate 20 and  receive:[*]GB Upload Credits[*] Weeks .[*]Custom Title.[*]No Ads.[*]Donor Star.










'>








*/?>







Donate 30

Donate 30 and  receive:[*]GB Upload Credits[*]Custom Title.[*] Weeks .[*]No Ads.[*]Donor Star.










'>









*/?>







Donate 40

Donate 40 and  receive:[*]GB Upload Credits[*] Week [*]Custom Title.[*]No Ads .[*]4 Invites.[*]Donor Star.










'>







*/?>






Donate 50

Donate 50 and  receive:[*]GB Upload Credits[*] Week [*]All Torrents Free[*]Custom Title.[*]No Ads .[*]Donor Star.










'>







*/?>






Donate 100

Donate 100 and  receive:[*]GB Upload Credits[*] Week [*]All Torrents Free[*]Custom Title.[*]No Ads .[*]Donor Star.










'>







*/?>






Default for All Donations

When you Donate you get[*]Custom Title.[*]No Ads .[*]Donor Star.[*]Invites.[*]Access to
 VIP Forum.[*]No wait time restrictions,
 regardless your ratio.[*]Immunity to the auto-ban
 because of low ratio.







     
     
       
         
         
       
     
     
IMPORTANT NOTES:

       
         
         
                 
       
[*]Donations DO NOT exempt you from the rules or from being banned.[*]Donations will increase your ratio, but normal ratio rules will still apply.
                    #[*]If you have any problems with your donation or you have not recieved proper credit, send D3SI a PM.?>
         

          All donations will be processed with Paypal IPN, this means that right after you will complete the donation process, it will instantly credit your account.
                 

       

     



stdfoot();
?>

No changes needed in paypal.php just update this. :)

First Post Updated

NatashaRhea 28th August 2008 01:30

works great thanks
:drink:

Dymo 9th September 2008 01:47

thx mate :dance:


But can you fix it soo it lock like the picture ?

Tony 3rd January 2009 16:54

are you sure the paypal.php code above is the full code since just looking at the end bit it doesnt seem like its finished code at the end ???

//add Upload bonus for amount given at 1Gb per

wheres the code for the bonus updating ?

DarkK1d 20th June 2009 16:39

Cool mod, works :-).

dudu_dudu 1st July 2009 20:19

verry nice thx :ok:

Extreme86 15th November 2009 22:36

How can i change the time for VIP?
I see here in your screenshot *1 Week 5 euro etc.
I want make , exemple 5 Weeks 5 euro...How can i change this?

Cody 16th November 2009 00:00

why i take this error? :(((((((((((((((((

Quote:

Fatal error: Call to undefined function format_comment() in /home/dreamert/domains/MYDOMAIN.COM/public_html/themes/dotBlue/stdhead.php on line 506
please help me

Tony 18th November 2009 05:55

does anybody use google for help these days >_<

undefined function ( !!!!google it!!!! )

Im not going to tell you what it means but this is something you will come across ALOT so its now time for you to learn what it means :P

joeroberts 18th November 2009 06:25

Just a small input here.
Y do you have sooooo many unneeded open/close of php and you should make sure you use full php tag and not short tags
short tag
PHP Code:

<?

full tag
PHP Code:

<?php

If your going to tell me it is because you added comments I'm not buying it because you only need to add
HTML Code:

<!-- this is what I did-->
this way you don't have to open close open close :unknown:
I count 25 short tags in donate.php alone and you open php 84 times

soluicius 7th April 2010 21:25

I'm getting this error


Code:

Fatal error:  Call to undefined function get_reputation() in /home/hosting/soluiciusx/mysite/include/bittorrent.php  on line 933

Bump: <<<@!1!@>>>

I fix it :)


cop1976 10th November 2010 02:02

Exactly, there is not completed paypal.php code.
Can someone write the full script here?

d6bmg 14th November 2010 08:49

thanks!!!

johny85 16th November 2010 14:34

problem,help
 
For me the paypal.php writes this:

Code:

Parse error:  syntax error, unexpected T_VARIABLE in D:\xampp\htdocs\paypal.php on line 132
The bittorrent.php where it is necessary to load this up punctually:

Code:

////////Site donation email
$DONATEMAIL = "youremailadress.com"

answers ahead thanks.

joeroberts 16th November 2010 17:06

I dont know how anyone is able to get this to work with out Throwing Tons of errors
Not sure if it is the Moving the code from one site to the other But what Im looking at here is wayy off the mark.

paypal.php does not even close
the last 3 lines of code are
PHP Code:

else
{
$donateuntil get_date_time(gmtime()   $days 604800);}
//add Upload bonus for amount given at 1Gb per 

see No
PHP Code:

?> 

@johny85
Code:

////////Site donation email
$DONATEMAIL = "youremailadress.com"

You for got to put the ; at the end Bro like so
Code:

////////Site donation email
$DONATEMAIL = "youremailadress.com";


NatashaRhea 8th April 2011 19:31

can u please post the rar to this
 
hi there great mod i was wondering if you could please post the rar to this

many thanks

wongsa 10th July 2011 04:35

Hi Paypal in TBDev 2009
 
Quote:

Originally Posted by D3SI (Post 2114)
Donate Page

Code:

Fatal error: Call to undefined function get_reputation() in /home/xxxxx/domains/xxxxxx/public_html/include/bittorrent.php on line 869
I installed it on TBDev 2009 Error on this.
I need this script here.

:wallbash:

PHP Code:

####This bittorrent.php line869
/////////////// REP SYSTEM /////////////
//$CURUSER['reputation'] = 49;

line869 >>    $member_reputation get_reputation($CURUSER1);
////////////// REP SYSTEM END ////////// 


DND 7th December 2011 09:28

just remove the reputation system ..
but i don't think this mod works for 09 source

ratza 4th August 2013 21:43

Can anybody finish the paypal.php page?

Ripparinn 4th August 2013 21:58

Thank you!

ratza 6th August 2013 04:34

I think this is the paypal.php page (it wasn't finished):

Code:


require "include/bittorrent.php";

dbconn(false);
$donb=0;
// read the post from PayPal system and add 'cmd'
$req = 'cmd=_notify-validate';

while (list($key, $value) = each($_POST)) {
    $value = urlencode(stripslashes($value));
    $req .= "&$key=$value";
}

// post back to PayPal system to validate
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);

// assign posted variables to local variables
$item_name = (isset($_POST['item_name']) ? htmlspecialchars($_POST['item_name']) : '');
$item_number = (isset($_POST['item_number']) ? htmlspecialchars($_POST['item_number']) : '');
$payment_status = (isset($_POST['payment_status']) ? htmlspecialchars($_POST['payment_status']) : '');
$payment_amount = (isset($_POST['mc_gross']) ? htmlspecialchars($_POST['mc_gross']) : '');
$payment_currency = (isset($_POST['mc_currency']) ? htmlspecialchars($_POST['mc_currency']) : '');
$txn_id = (isset($_POST['txn_id']) ? htmlspecialchars($_POST['txn_id']) : '');
$receiver_email = (isset($_POST['receiver_email']) ? htmlspecialchars($_POST['receiver_email']) : '');
$payer_email = (isset($_POST['payer_email']) ? htmlspecialchars($_POST['payer_email']) : '');
$clid = (isset($_POST['custom']) ? htmlspecialchars($_POST['custom']) : '');


// block pending echecks. paypal posts payments again when echecks clear, blocks double credits.
if ($payment_type == "echeck" && $payment_status == "Pending") die;

if (!$fp)
{}
else
{
fputs ($fp, $header . $req);
while (!feof($fp))
{
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0)
{
// process payment
if ($receiver_email == "ratzax13@yahoo.com")
{
settype($payment_amount, "float");
settype($payment_amount, "string");
///Lottery system add tickets

/*
If ($payment_amount >= 1)
{
$tickets = $payment_amount;
for ($i = 0; $i < $tickets; $i++)
{mysql_QUERY("INSERT INTO tickets(user) VALUES('$clid')");}
*/

$donated_time = get_date_time();


///Sort Upload and Donor time amounts
if ($payment_amount == 50)
{$months = 4.3*6;}
elseif ($payment_amount == 30)
{$months = 4.3*4;}
elseif ($payment_amount == 15)
{$months = 4.3*2;}
elseif ($payment_amount == 10)
{$months = 4.3*1;}

else {$months = 4.3*0.5;}




//set donor upload upgrade
if ($payment_amount == 50)
{$donb = 161061273600; }
elseif ($payment_amount == 30)
{$donb = 75161927680; }
elseif ($payment_amount == 15)
{$donb = 32212254720; }

else {
$donb = 2147483648*$payment_amount;}

if ($payment_amount == 50)
{$invites = 5; }
elseif ($payment_amount == 30)
{$invites = 3; }
elseif ($payment_amount == 15)
{$invites = 1; }

else {
$invites = 0;}


//get user information from DB
$query = "select * from users where id='".$clid."'";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
//$tmp_max = $row['maxtorrents'];
$username = $row['username'];
$old=date($row['donoruntil']);
$class = $row['class'];
$dona = $row['uploaded'];

//Set class to VIP if lower then VIP
if ($payment_amount == 50 || $payment_amount == 30 || $payment_amount == 15 || $payment_amount == 10 || $payment_amount == 5) {
if ($class <= 2)
{$class = 2;}}

$r = @mysql_query("SELECT * FROM users WHERE id=$clid") or sqlerr();
$user = mysql_fetch_array($r) or bark("No user with ID $clid.");
//Reset download upload post and reset to zero H&R's
$query = "update users set donor='yes', class=$class, warned ='no', invites=$invites where id='".$clid."'";
$result = mysql_query("$query");

//Get Donor time if already some left from before
If ($old<>"0000-00-00 00:00:00")
{
$old1=strtotime($old)- gmtime();
$donateuntil = get_date_time((gmtime() + $months * 604800) +$old1);
}
else
{$donateuntil = get_date_time(gmtime() + $months * 604800);}
//add Upload bonus for amount given at 1Gb per Ł1
$bonus = $donb + $dona;
$donordif =strtotime($donateuntil)- gmtime();
//add to mod comment for staff to check if payment made via here
$modcomment = gmdate("Y-m-d") . " Donor Status Given. ($donb) Bonus Granted. ($donordif) Donator Time Added\n";
$modcom = sqlesc($modcomment);
//update users total and bonus totals
$query = "update users set uploaded='".$bonus."', modcomment = CONCAT($modcom,modcomment), donoruntil='$donateuntil', donated=$payment_amount, total_donated=total_donated+$payment_amount where id='".$clid."'";
$result = mysql_query($query);
//log donations
$donlog = "User: $username | Amount : $payment_amount";
$donlog = sqlesc($donlog);
$added = sqlesc(get_date_time());
mysql_query("INSERT INTO donatelog (added, txt) VALUES($added, $donlog)") or sqlerr(__FILE__, __LINE__);

}}}}
//update donation totals for counter
$query = "select cash,user from funds";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$money = $payment_amount;
$query = "INSERT INTO funds (cash,user,added) VALUES ($money, $clid, $added)";
$result = mysql_query($query);
write_log("Donation From ".$CURUSER['username']." ID: ".$userid." for ".$payment_amount." on ".$donated_time." and donor till ".$donateuntil." upgraded by system");
// Notify user
$msg = sqlesc("User ."]".$CURUSER['username']." donated amount of ".$payment_amount." on ".$donated_time." for VIP status, Go and check it out!");
$added = sqlesc(get_date_time());
mysql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES(0, 1, $msg, $added)") or sqlerr(__FILE__, __LINE__);

header("Location: http://network.fnatic.ro/");

fclose ($fp);
stdfoot();
?>

I havent tested it cuz i don't have paypal so.... let me know if it works

Demon-Cod3rs 7th May 2015 20:40

this needs alot of work to get it to work

DND 7th May 2015 22:06

http://i.imgur.com/qZfglTq.png

something similar, yet different altogether.

Demon-Cod3rs 7th May 2015 23:48

yes looks cool but i reworked this mod to work and set vip on dons on payments and demote on ending too

DND 8th May 2015 01:54

same here :) also integrated my own download credits system/free slot

Demon-Cod3rs 8th May 2015 07:42

cool


All times are GMT +2. The time now is 18:45.

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