Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader > Mods & Themes
Reply
  #1  
Old 23rd September 2008, 10:41
Grom's Avatar
Grom Grom is offline
Senior Member
 
Join Date: Aug 2008
Posts: 73
Default Donations in admincp
Donations in admincp
Add sql
PHP Code:
CREATE TABLE `site_settings` (
  `
donationsint(5unsigned NOT NULL default '0',
  `
requireddonationsint(5unsigned NOT NULL default '0',
  `
donatepagelongtext collate latin1_german2_ci NOT NULL
ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci;

--
-- 
Contenu de la table `site_settings`
--

INSERT INTO `site_settingsVALUES(00'<CENTER>\r\n<IFRAME SRC="dons.html" NAME="main" HEIGHT="670" WIDTH="600"></IFRAME>\r\n</CENTER>'); 
create file called dons.html and paste your code paypal or other
create file donate.php and paste this code
This code works for me u may need to edit a few things to suit ur donation links

PHP Code:
<?
begin_block
("Donate");
print(
"<CENTER>")
?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="your email">
<input type="hidden" name="item_name" value="Name your Site">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="bn" value="PP-DonationsBF">


Please enter the amount you would like to give.<br>
Select a currency&nbsp;
<select name="currency_code" size="1">
<option value="USD">US dollar</option>
<option value="GBP">GB pound</option>
<option value="EUR">Euro</option>
<option value="JPY">Yen</option>
<option value="CAD">Canadian $</option>
<option value="AUD">Australian $</option>
</select><br>
Amount:&nbsp;
<input type="text" name="amount" value="" size="10">
<input type="submit" alt="currency" value="Donate!" class="button">
</form>
<?
end_block
();
?>
AND moneybookers
PHP Code:
<?
begin_block
("Donate");
print(
"<CENTER>")
?>
<form action="https://www.moneybookers.com/app/payment.pl" method="post" target="_blank">
<input type="hidden" name="pay_to_email" value="Your E-Mail Id Here">
<input type="hidden" name="status_url" value="Your E-mail To get Notification of Transaction">

<input type="hidden" name=\"language\" value="EN" class="ddl">Select a currency&nbsp;
<select name="currency" size="1">
<option value="USD">US dollar</option>
<option value="GBP">GB pound</option>
<option value="EUR">Euro</option>
<option value="JPY">Yen</option>
<option value="CAD">Canadian $</option>
<option value="AUD">Australian $</option>

</select><br>
Amount:&nbsp;
<input type="hidden" name="detail1_description" value="Donation to xxx">
<input type="hidden" name="detail1_text" value="Donation to xxx">

<input type="text" name="amount" value="" size="10">
<input type="image" name="submit" src="http://www.moneybookers.com/images/logos/additional_logos/orange_donate_with.gif" border=0></a>
</form>
<b>Donate,Help xxx Now and Get Vip Status - Send Your Transaction id to (xxx) after donation to get your status updated</b></CENTER>
<?
end_block
();
?>
__________________
Hello All
Reply With Quote
  #2  
Old 28th August 2011, 14:13
xDev xDev is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 158
Question
will this update the account-details on money sent and class and upload if not as i can see not goood
<b>Donate,Help xxx Now and Get Vip Status - Send Your Transaction id to (xxx) after donation to get your status updated</b></CENTER>
Reply With Quote
  #3  
Old 28th August 2011, 15:00
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
he did not post paypal.php so I would have to so it dose not notify you on any thing.
It relly's on the user to do that.
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #4  
Old 28th August 2011, 21:55
xDev xDev is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 158
Question
Quote:
Originally Posted by joeroberts View Post
he did not post paypal.php so I would have to so it dose not notify you on any thing.
It relly's on the user to do that.
i have this not working at all update the account-details

PHP Code:
if ($payment_amount == || $payment_amount == 10 || $payment_amount == 20 || $payment_amount == 30 || $payment_amount == 40 || $payment_amount == 50 ) {
if (
$class <= 4){
    
$class 4;
}
  
$query "UPDATE users SET donated = donated + '$payment_amount', class=$class, warned ='no', invites = invites + $invites, uploaded = uploaded + $donb where id='$clid'";
  
$result mysql_query($query);
}
}


}
else if (
strcmp ($res"INVALID") == 0) {
header("Refresh: 4;url=account-details.php?id=$clid");
}
}
fclose ($fp);
}
?> 
Reply With Quote
  #5  
Old 28th August 2011, 22:26
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
you would need something like this and you need to setup IPN in your paypal
this is a code from my phpMyBitTorrent
PHP Code:
<?php
// 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$errstr30);

// 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'];

if (!
$fp) {
// HTTP ERROR
} else {
fputs ($fp$header $req);
while (!
feof($fp)) {
$res fgets ($fp1024);
if (
strcmp ($res"VERIFIED") == 0) {
if (
$receiver_email == $paypal_email){
 
# $query = "UPDATE ".$db_prefix."_users SET donated = donated + '$payment_amount' where id='$clid'";
 # $result = mysql_query($query);
  
$query "UPDATE ".$db_prefix."_paypal SET reseaved_donations = reseaved_donations + '$payment_amount' ";
  
$result mysql_query($query);
}


header("Location: ".$siteurl."");
}
else if (
strcmp ($res"INVALID") == 0) {
}
}
fclose ($fp);
}
?>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #6  
Old 28th August 2011, 23:09
xDev xDev is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 158
Question
Quote:
Originally Posted by joeroberts View Post
you would need something like this and you need to setup IPN in your paypal
this is a code from my phpMyBitTorrent
PHP Code:
<?php
// 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$errstr30);

// 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'];

if (!
$fp) {
// HTTP ERROR
} else {
fputs ($fp$header $req);
while (!
feof($fp)) {
$res fgets ($fp1024);
if (
strcmp ($res"VERIFIED") == 0) {
if (
$receiver_email == $paypal_email){
 
# $query = "UPDATE ".$db_prefix."_users SET donated = donated + '$payment_amount' where id='$clid'";
 # $result = mysql_query($query);
  
$query "UPDATE ".$db_prefix."_paypal SET reseaved_donations = reseaved_donations + '$payment_amount' ";
  
$result mysql_query($query);
}


header("Location: ".$siteurl."");
}
else if (
strcmp ($res"INVALID") == 0) {
}
}
fclose ($fp);
}
?>

PHP Code:
<?
require "backend/functions.php";
dbconn(true);

// 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$errstr30);

// 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'];
$paypal_email $site_config['PAYPALEMAIL']; 
$clid $_POST['custom'];

if (!
$fp) {
// HTTP ERROR
} else {
fputs ($fp$header $req);
while (!
feof($fp)) {
$res fgets ($fp1024);
if (
strcmp ($res"VERIFIED") == 0) {



if (
$receiver_email == $paypal_email && $payment_status == "Completed"){
if (
$payment_amount == 5)
{
$donb 5368709120; }
elseif (
$payment_amount == 10)
{
$donb 10737418240; }
elseif (
$payment_amount == 20)
{
$donb 21474836480; }
elseif (
$payment_amount == 30)
{
$donb 32212254720; }
elseif (
$payment_amount == 40)
{
$donb 42949672960; }
elseif (
$payment_amount == 50)
{
$donb 53687091200; }
elseif (
$payment_amount == 100)
{
$donb 161061273600; }
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 2;
}
elseif (
$payment_amount == 30){
    
$invites 3;
}
elseif (
$payment_amount == 40){
    
$invites 4;
}
elseif (
$payment_amount == 50){
    
$invites 5;
}
elseif (
$payment_amount == 100){
    
$invites 10;
}
else {
$invites 0;
}
if (
$payment_amount == || $payment_amount == 10 || $payment_amount == 20 || $payment_amount == 30 || $payment_amount == 40 || $payment_amount == 50 ) {
if (
$class <= 4){
    
$class 4;
}
  
$query "UPDATE users SET donated = donated + '$payment_amount', class=$class, warned ='no', invites = invites + $invites, uploaded = uploaded + $donb where id='$clid'";
  
$result mysql_query($query);
}
}


}
else if (
strcmp ($res"INVALID") == 0) {
header("Refresh: 4;url=account-details.php?id=$clid");
}
}
fclose ($fp);
}
?>
this $db_prefix i do not have joe
Reply With Quote
  #7  
Old 29th August 2011, 00:12
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
of course you don't your using TT witch don't use a data base prefix
I would say you need to make sure you have IPN active in your paypal and make sure it is pointing to the right location.
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #8  
Old 29th August 2011, 00:26
xDev xDev is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 158
Question
Quote:
Originally Posted by joeroberts View Post
of course you don't your using TT witch don't use a data base prefix
I would say you need to make sure you have IPN active in your paypal and make sure it is pointing to the right location.
ok im in there now
Notification URL would you tell me what i need to put in is it my site link ? joe
or is it paypal link i have in site_config ?
Reply With Quote
  #9  
Old 29th August 2011, 01:03
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
Quote:
Originally Posted by Developer View Post
ok im in there now
Notification URL would you tell me what i need to put in is it my site link ? joe
or is it paypal link i have in site_config ?
it is the link to the paypal.php on your site
Quote:
yoursite.com/paypal.php
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #10  
Old 29th August 2011, 01:24
xDev xDev is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 158
Default
Quote:
Originally Posted by joeroberts View Post
it is the link to the paypal.php on your site
many thanks done
Reply With Quote
Reply

Tags
admincp , donations

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[xbtit] Add New User in Admincp by Lupin Desert Cheetah Mods & Themes 5 15th January 2013 18:50
Donations needed !!! mrdecoder Template Shares 44 2nd March 2011 11:24
admincp.php question jdh428 Torrent Strike 0 27th June 2009 11:15
Reseting donations Syn Template Shares 0 3rd June 2009 13:26
cannot login to admincp after fresh install savito Torrent Strike 1 4th February 2009 00:52



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