Any update for the moment, I will wait an other donation to verify
Thanks Artic :)
Thanks Artic :)
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
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'
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>
"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!!!!!!!!!!!!!!!
//=== 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]
//===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
"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
$secs = date('t') * 86400;
$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")); No users online
Torrents
Members
Online