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)

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 10:11.

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