Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Basic Donation Addon
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-05-06 07:57:06
Any update for the moment, I will wait an other donation to verify

Thanks Artic :)
Unknown User
2012-05-06 13:57:33
class sets fine.. if your class is above well 2 stock then well of-course it will not demote you to vip LOL

Quote:
Dear testie :wave: Thanks for your support to ! Your donation helps us in the costs of running the site! As a donor, you are given some bonus gigs 100.00 GB added to your uploaded amount, the status of VIP, and the warm fuzzy feeling you get inside for helping to support this site that we all know and love :smile: so, thanks again, and enjoy!cheers,  Staff

Downloaded: 859.52 MB

Uploaded: 107.40 GB

Class: VIP

anyway this works fine on my sites for setting donations that dont auto credit for what ever stupid reason like not changing donated email address, $DONATEMAIL dont match you real sites donated address..............

in account-details.php

find



   if($CURUSER["delete_users"] == "yes"){

       print("<hr><center><form method=post action=admin-modtasks.php>n");

       print("<input type=hidden name='action' value='deleteaccount'>n");

add before






if ($CURUSER["class"] == "7") {

   begin_frame("VIP Donation Fix");

   print("<form method=post action=admin-modtasks.php>n");

   print("<input type=hidden name='action' value='donater_fix'>n");

   print("<input type=hidden name='userid' value='$id'>n");

   echo "<br /><br /><center><table border=0>";

   echo "<tr><td align=right class=table_col1><b>" . T_("REASON") . ":</b> </td><td align=left class=table_col1><textarea cols=40 rows=5 name=reason></textarea></td></tr>";

   echo "<tr><td align=right class=table_col1><b>Transaction ID (req):</b> </td><td align=left class=table_col1><input type=text size=30 name=txn_id></td></tr>";

   echo "<tr><td align=right class=table_col1><b>Money (req):</b> </td><td align=left class=table_col1><input type=text size=10 name=money></td></tr>";

   echo "<tr><td colspan=2 align=center class=table_col1><input type=submit class=btn_big value='Add Donation'></td></tr></table></center></form>";

   end_frame();

} //$CURUSER["class"] == "7"




then in admin-modtasks

add before





if ($action == "deleteaccount"){




add





if ($action == 'donater_fix') {

   if ($CURUSER["class"] <= "6") //only allow admins to delete users

   show_error_msg(T_("ERROR"), "Only Owners can do this", 1);

   $clid = (int) $_POST["userid"];

   $payment_amount = mysql_real_escape_string($_POST["money"]);

   $txn_id = mysql_real_escape_string($_POST["txn_id"]);

   $reason = mysql_real_escape_string($_POST["reason"]);

   if (!is_valid_id($clid))

   show_error_msg(T_("EDITING_FAILED"), T_("INVALID_USER_ID"), 1);

   if (!$txn_id || !$payment_amount) {

   show_error_msg(T_("ERROR"), T_("MISSING_FORM_DATA") . ".", 1);

   } //!$txn_id || $payment_amount

   $donated_time = get_date_time();

   ///Sort Upload and Donor time amounts

   if ($payment_amount == 5) {

   $days = 1 * 4;

   } //$payment_amount == 5

   elseif ($payment_amount == 10) {

   $days = 1 * 8;

   } //$payment_amount == 10

   elseif ($payment_amount == 20) {

   $days = 1 * 16;

   } //$payment_amount == 20

   elseif ($payment_amount == 30) {

   $days = 1 * 24;

   } //$payment_amount == 30

   else {

   $days = 1 * 1;

   }

   //set donor upload upgrade

   if ($payment_amount == 5) {

   $donb = 107374182400;

   } //$payment_amount == 5

   //{$donb = 5368709120; }

   elseif ($payment_amount == 10) {

   $donb = 214748364800;

   } //$payment_amount == 10

   //{$donb = 10737418240; }

   elseif ($payment_amount == 20) {

   $donb = 429496729600;

   } //$payment_amount == 20

   //{$donb = 21474836480; }

   elseif ($payment_amount == 30) {

   $donb = 644245094400;

   } //$payment_amount == 30

   else {

   $donb = 1073741824 * $payment_amount;

   }

   //Set User Invites

   if ($payment_amount == 5) {

   $invites = 2;

   } //$payment_amount == 5

   elseif ($payment_amount == 10) {

   $invites = 4;

   } //$payment_amount == 10

   elseif ($payment_amount == 20) {

   $invites = 8;

   } //$payment_amount == 20

   elseif ($payment_amount == 30) {

   $invites = 12;

   } //$payment_amount == 30

   else {

   $invites = 0;

   }

   //get user information from DB

   if ($clid > 0) {

   $query = "SELECT * FROM users WHERE id='" . $clid . "'";

   $result = SQL_Query_exec($query);

   $row = mysql_fetch_array($result);

   $username = $row['username'];

   $old = date($row['donoruntil']);

   $class = $row['class'];

   $dona = $row['uploaded'];

   $modcomment = $row['modcomment'];

   } //$clid > 0

   else {

   $username = 'Guest' . rand(1000, 9999);

   $class = 1;

   }

   //Set class to VIP if lower then VIP

   if ($clid > 0) {

   if ($class <= 3) {

   $class = 3;

   } //$class <= 3

   $r = @SQL_Query_exec("SELECT * FROM users WHERE id=$clid");

   $user = mysql_fetch_array($r) or show_error_msg(T_("ERROR"), "No user with ID.", 1);

   //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 = SQL_Query_exec("$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);

   } //$old <> "0000-00-00 00:00:00"

   else {

   $donateuntil = get_date_time(gmtime() + $days * 604800);

   }

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

   $bonus = $donb + $dona;

   $donordif = strtotime($donateuntil) - gmtime();

   $don_bonus = mksize($donb);

   //add to mod comment for staff to check if payment made via here

   $modcomment3 = gmdate("Y-m-d") . " Donor Status Given. ($don_bonus) Bonus Granted. Reason: $reason. ($donordif) Donator Time Added. n";

   $modcomment = $modcomment3 . "n" . $modcomment;

   $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 = SQL_Query_exec($query);

   $newclass_name = get_user_class_name('3');

   //Send Message to User That Donated

   $msg = sqlesc("Dear $username :wave: Thanks for your support to $SITENAME! Your donation helps us in the costs of running the site! As a donor, you are given some bonus gigs $don_bonus added to your uploaded amount, the status of " . $newclass_name . ", and the warm fuzzy feeling you get inside for helping to support this site that we all know and love :smile: so, thanks again, and enjoy!cheers, $SITENAME Staffn");

   $subject = sqlesc("Thank You for Your Donation!");

   $added = sqlesc(get_date_time());

   if ($clid > 0)

   SQL_Query_exec("INSERT INTO messages (sender, subject, receiver, msg, added) VALUES (0, $subject, $clid, $msg, $added)");

   } //$clid > 0

   //Send Message to Site Owners

   $sysop = SQL_Query_exec("SELECT id FROM users WHERE class=7");

   while ($sysopid = mysql_fetch_assoc($sysop)) {

   $subject = "New Donation Manually Credited";

   $sysopmsg = $subject." | User: $username | Amount : $payment_amount | txn_id: $txn_id | New Class: $newclass_name";

   $sysopmsg .= "nNew Modcomment: ".$modcomment3;

   SQL_Query_exec("INSERT INTO messages (poster, sender, receiver, added, subject, msg) VALUES(0, 0, " . $sysopid['id'] . ", '" . get_date_time() . "', " . sqlesc($subject) . ", " . sqlesc($sysopmsg) . ")");

   } //$sysopid = mysql_fetch_assoc($sysop)

   //update donation totals for counter

   $added = sqlesc(get_date_time());

   $month1 = sqlesc(gmdate("m"));

   $year1 = sqlesc(gmdate("Y"));

   $query = "INSERT INTO funds (cash,user,added,month,year) VALUES ($payment_amount, $clid, $added,$month1,$year1)";

   $result = SQL_Query_exec($query);

   write_log($CURUSER['username']." has manual donation for user: <a href='account-details.php?id=$clid'>$clid</a> $modcomment3");

   autolink("account-details.php?id=$clid","Donation Added For $username Class: $newclass_name");

   die;

} //$action == 'donater_fix'



Then well edit the user that donated.. but again if I have to tell you this well should not be running an site EVIL GRIN

you should have the transaction # in the email you got about the donation.. in theory you could put anything in the space.
Unknown User
2012-05-06 14:20:46
Yes !!

You're the best

I've received the message, the block's info is updated, the account to...

Many thanks !!!
Unknown User
2012-05-07 00:58:03
thanks again, is there away to show the donor until in account and account details?
Unknown User
2012-05-07 03:53:33
Its not hard

in account-details

find



if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes")) {

after add




//Donor count down

if ($user[donor] && $CURUSER[id] == $user[id] || $CURUSER["class"] >= 6)

   {

   $donoruntil = $user['donoruntil'];

   if ($donoruntil != '0000-00-00 00:00:00')

   {

   print("<b><p>Donated Status Until - $donoruntil");

   if ($CURUSER["class"] < 6)

   print(" [ " . mkprettytime(strtotime($donoruntil) - gmtime()) . " ] to go...</b><font size="-2"> to re-new donation click <a class=altlink href=donate.php>here</a>.</font></p>n");

   else

   print(" [ " . mkprettytime(strtotime($donoruntil) - gmtime()) . " ] to go...</b></p>n");

   }

 }

//====end






then in account

find





   <b><?php echo T_("PASSKEY"); ?>:</b> <?php echo $CURUSER["passkey"]; ?><br />




after add





   <b>Last <?php echo T_("DONATED"); ?>:</b> <?php echo $site_config['currency_symbol']; ?><?php echo number_format($CURUSER["donated"], 2); ?><br>

   <b>Total <?php echo T_("DONATED"); ?>:</b> <?php echo $site_config['currency_symbol']; ?><?php echo number_format($CURUSER["total_donated"], 2); ?><br>

   <?php if ($CURUSER['donoruntil']<>"0000-00-00 00:00:00 && ".htmlspecialchars($CURUSER['donor'])." == 'yes'")

   echo "<b>Donor Until: </b> ".$CURUSER['donoruntil']." [ ".mkprettytime(strtotime($CURUSER['donoruntil']) - gmtime()); ?> ] to go...<br>




I of the other addons about donor stuff here has the cleanup to reset to power user once it expires.. use the search thats whats it here for!!!!!!!!!!!!!!!
Unknown User
2012-05-07 07:05:27
"ArcticWolf, post: 82900":
I of the other addons about donor stuff here has the cleanup to reset to power user once it expires.. use the search thats whats it here for!!!!!!!!!!!!!!!


would you write me the clean up code if i pay you?

or if not you could someone else?
Unknown User
2012-05-11 00:39:42
cleanup to remove old donators?
Unknown User
2012-05-21 16:02:26
I use in bottom of cleanup.php this code:



       //=== Remove donor status if time up and set class to power user ===//

       $res = SQL_Query_exec("SELECT id, modcomment FROM users WHERE donor='yes' AND donoruntil < NOW() AND donoruntil <> '0000-00-00 00:00:00'");

       if (mysql_num_rows($res) > 0)

       {

       $dt = sqlesc(get_date_time());

       $subject = sqlesc("VIP status removed by System.");

       $msg = sqlesc("Your VIP status has timed out and has been auto-removed by the System. We would like to thank you once again for supporting ".$site_config['SITENAME'].". If you wish to re-new your VIP, you can do so by clicking [url=".%24site_config%5B"]."/donate.php]HERE[/url]. Cheers!n");

       while ($arr = mysql_fetch_assoc($res))

       {

       ///--- Autosystem modcomment ---//

       $modcomment = htmlspecialchars($arr["modcomment"]);

       $modcomment = gmdate("Y-m-d H:i") . " - VIP status removed by System.n". $modcomment;

       $modcom = sqlesc($modcomment);

       SQL_Query_exec("UPDATE users SET class = '2', donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");

       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject, poster) VALUES(0, $arr[id], $dt, $msg, $subject, 0)");

       }

       }

[/code]
and works fine.
Unknown User
2012-05-22 14:41:39
Thanks guys, i found that code too  :)

also for reset funds per month



//===clear funds after one month

 

$secs = 28*86400;

$dt = sqlesc(get_date_time(gmtime() - $secs));

SQL_Query_exec("DELETE FROM funds WHERE added < $dt");



 //===end

Unknown User
2012-07-04 21:53:36
Hello, I've a problem with my VIP's

I've installed this mod but the amount of download continues to be add in the VIP's account...

Do you have a solution?

thanks in advance :)
Unknown User
2012-07-08 02:33:57
how change : Donné: $5.00

$ for € ?
Unknown User
2012-07-08 05:25:38
List Of Most Reg Currencys

// List Of Most Reg Currencys

// Euro &euro; EUR

// British Pound &pound; GBP

// Canadian Dollar $ CAD

// Polish Zloty $ PLN

// U.S. Dollar $ USD
Unknown User
2012-07-08 12:27:23
"sammysung, post: 83177":
Thanks guys, i found that code too  :)

also for reset funds per month



//===clear funds after one month



$secs = 28*86400;

$dt = sqlesc(get_date_time(gmtime() - $secs));

SQL_Query_exec("DELETE FROM funds WHERE added < $dt");



//===end





If you want to be more accurate maybe use






That should return the number of days in the correct month.



$secs = date('t') * 86400;

Unknown User
2012-07-08 14:18:22
well tech you dont have to reset it each month anyway..

$month5 = sqlesc(gmdate("m")); 
sets the current month auto and


$year5 = sqlesc(gmdate("Y"); 

sets the current year auto

+ it only looks up the current month and year lol

 $month_mas = sqlesc(gmdate("mY"));  


I guess tech you could make something to display all the months but thats outside the "basic" addon..
Unknown User
2012-07-14 14:29:49
hey mate everything is okay and when i click on the donate button i'm getting a error in the paypal site as.

please help me guys..

paypal.jpg
paypal.jpg
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728