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
Upload Manager
Controls ·  Search New posts · Mark unread

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

Unknown User
2013-02-11 17:20:54
This is the code:



#-----------------------------------------------

# DEDUCT

#-----------------------------------------------

if($_POST['gig2'])

{

if ( !is_numeric($_POST['class']))

{

$res = SQL_Query_exec("SELECT id,uploaded FROM users");

$arr1[0] = T_("ALL1");

}

else

{

$res = SQL_Query_exec("SELECT id,uploaded FROM users WHERE class=".$_POST['class']." AND status = 'confirmed'");

$res1 = SQL_Query_exec("SELECT level FROM groups WHERE group_id=".$_POST['class']."");

$arr1 = mysql_fetch_row($res1);

}



$sender = ( $_POST["fromsystem"] == "yes" ) ? "0" : $CURUSER["id"];

$subject = T_("SUBJECT_DED");

$msg = sprintf( T_("MSG_DED"), $_POST['gig2'], $arr1[0]);



while($arr = mysql_fetch_row($res))

{

$up_value = strtobytes($_POST['gig2']);

if (($arr[1]-$up_value) >= 0)

SQL_Query_exec("UPDATE users SET uploaded = uploaded - ".$up_value." WHERE id=".$arr[0]." AND status = 'confirmed'");

else

SQL_Query_exec("UPDATE users SET uploaded = 0 WHERE id=".$arr[0]." AND status = 'confirmed'");



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

}



write_log( sprintf(T_("UP_DEDUCTED"), class_user($CURUSER["username"]), $_POST['gig2'], htmlspecialchars($arr1[0])) );

autolink("upload-bonus.php", T_("UP_UPDATED"));

}



without that line.
Unknown User
2013-02-11 17:58:39
that above line in theory should work. I never tested it.. I think its evil to global take away people hard earned upload..
Unknown User
2013-02-12 02:48:44
[size=18px]I don't ever liked to see default values into a mod like this, so I decided to do something like that:[/size]

In english.php replace the old code for this mod with this one:



# Upload Manager

$LANG["INFO_UP_BONUS"] = "<p style='margin-top:10px; margin-bottom:20px' align='center'>

Choose the class at you want to modify the upload or preserves <b>To all members</b><br />

Write a value for the option which you have chosen and click on <b>Submit</b> button.<br />

Marks <b>System</b> if you want that it be the sender of messages.

</p>";



$LANG["UP_MANAGER"] = "Upload Manager";

$LANG["UP_UPDATED"] = "Operation performed successfully.";

$LANG["UP_ADD"] = "<b>ADD</b> to current upload:";

$LANG["UP_DED"] = "<b>DEDUCT</b> from current upload:";

$LANG["UP_MUL"] = "<b>MULTIPLY</b> current upload by:";

$LANG["UP_DIV"] = "<b>DIVIDE</b> current upload by:";

$LANG["UP_REP"] = "<b>REPLACE</b> current upload with:";

$LANG["UP_ADDED"] ="%s added %s GB Upoad to all members from class: %s";

$LANG["UP_DEDUCTED"] ="%s deducted %s GB Upoad to all members from class: %s";

$LANG["UP_MULTIPLIED"] ="%s multiplied by %s Upoad to all members from class: %s";

$LANG["UP_DIVIDED"] ="%s divided by %s Upoad to all members from class: %s";

$LANG["UP_REPLACED"] ="%s replaced with %s Upoad to all members from class: %s";

$LANG["TO_ALL_MEMBERS"] = "To all Members";

$LANG["ALL1"] = "All";



$LANG["SUBJECT_ADD"] = "We have added GB Upload to your account";

$LANG["MSG_ADD"] = "Hey, we have added %s upload to your account!

Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...

So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s.";



$LANG["SUBJECT_DED"] = "We have deducte GB Upload to your account";

$LANG["MSG_DED"] = "Hey, we have deducte %s upload to your account!

Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...

So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s.";



$LANG["SUBJECT_MUL"] = "We have MULTIPLIED your upload";

$LANG["MSG_MUL"] = "Hey, we have MULTIPLIED your upload by %s!

Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...

So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s";



$LANG["SUBJECT_DIV"] = "We have DIVIDED your upload";

$LANG["MSG_DIV"] = "Hey, we have DIVIDED your upload by %s!

Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...

So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s";



$LANG["SUBJECT_REP"] = "We have REPLACED your upload";

$LANG["MSG_REP"] = "Hey, we have REPLACED your upload with %s!

Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...

So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s";



Extract files from attached archive and upload them in your root.

For the options ADD, DEDUCT and REPLACE you must write something like that: 10 GB or 10240 MB (can include decimals).

For MULTIPLY and DIVIDE enter only a number, also can include decimals.

[size=18px]I've tested it and I had no problem, working properly.[/size]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6575"]Upload_Manager.zip[/url]

Upload_Manager.zip
Download
upl_manager.png
upl_manager.png
Unknown User
2013-02-12 02:59:22
wow nice one ;)
Unknown User
2013-02-12 08:28:41
Nice job BigMax1!

THANKS
2013-02-13 00:36:38
Coollll, big thanks!!
Unknown User
2013-08-05 21:46:02
Thanks, nice work  :)
Unknown User
2013-08-06 11:40:15
"BigMax1, post: 88771":

[size=18px]I don't ever liked to see default values into a mod like this, so I decided to do something like that:[/size]

In english.php replace the old code for this mod with this one:

# Upload Manager
$LANG["INFO_UP_BONUS"] = "<p style='margin-top:10px; margin-bottom:20px' align='center'>
Choose the class at you want to modify the upload or preserves <b>To all members</b><br />
Write a value for the option which you have chosen and click on <b>Submit</b> button.<br />
Marks <b>System</b> if you want that it be the sender of messages.
</p>";

$LANG["UP_MANAGER"] = "Upload Manager";
$LANG["UP_UPDATED"] = "Operation performed successfully.";
$LANG["UP_ADD"] = "<b>ADD</b> to current upload:";
$LANG["UP_DED"] = "<b>DEDUCT</b> from current upload:";
$LANG["UP_MUL"] = "<b>MULTIPLY</b> current upload by:";
$LANG["UP_DIV"] = "<b>DIVIDE</b> current upload by:";
$LANG["UP_REP"] = "<b>REPLACE</b> current upload with:";
$LANG["UP_ADDED"] ="%s added %s GB Upoad to all members from class: %s";
$LANG["UP_DEDUCTED"] ="%s deducted %s GB Upoad to all members from class: %s";
$LANG["UP_MULTIPLIED"] ="%s multiplied by %s Upoad to all members from class: %s";
$LANG["UP_DIVIDED"] ="%s divided by %s Upoad to all members from class: %s";
$LANG["UP_REPLACED"] ="%s replaced with %s Upoad to all members from class: %s";
$LANG["TO_ALL_MEMBERS"] = "To all Members";
$LANG["ALL1"] = "All";

$LANG["SUBJECT_ADD"] = "We have added GB Upload to your account";
$LANG["MSG_ADD"] = "[size=10px]Hey, we have added %s upload to your account![/size]
Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...
So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s.";

$LANG["SUBJECT_DED"] = "We have deducte GB Upload to your account";
$LANG["MSG_DED"] = "[size=10px]Hey, we have deducte %s upload to your account![/size]
Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...
So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s.";

$LANG["SUBJECT_MUL"] = "We have MULTIPLIED your upload";
$LANG["MSG_MUL"] = "[size=10px]Hey, we have MULTIPLIED your upload by %s![/size]
Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...
So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s";

$LANG["SUBJECT_DIV"] = "We have DIVIDED your upload";
$LANG["MSG_DIV"] = "[size=10px]Hey, we have DIVIDED your upload by %s![/size]
Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...
So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s";

$LANG["SUBJECT_REP"] = "We have REPLACED your upload";
$LANG["MSG_REP"] = "[size=10px]Hey, we have REPLACED your upload with %s![/size]
Please do not think this is a time to not seed. The same rules as always apply and we hate leechers...
So, if you're not a leecher, download something nice and enjoy!nClass Concerned: %s";

Extract files from attached archive and upload them in your root.

For the options ADD, DEDUCT and REPLACE you must write something like that: 10 GB or 10240 MB (can include decimals).

For MULTIPLY and DIVIDE enter only a number, also can include decimals.

[size=18px]I've tested it and I had no problem, working properly.[/size]
nice work but I'm having a little problem,
localhost ---> Fatal error: Call to undefined function class_user () in C:  wamp  www  home  send bonus.php on line 47

host -> gets a white screen ..
could help?
Unknown User
2013-08-06 17:36:47
You must to replace class_user($CURUSER["username"]) with $CURUSER["username"] because you haven't installed class_user function.

Or you can install this mod from here: [url="https://www.torrenttrader.org/topic/17452-class-colors-function-for-208"]https://www.torrenttrader.org/topic/17452-class-colors-function-for-208[/url]
Unknown User
2013-08-07 04:04:47
"BigMax1, post: 91682":

You must to replace class_user($CURUSER["username"]) with $CURUSER["username"] because you haven't installed class_user function.

Or you can install this mod from here: [url="https://www.torrenttrader.org/topic/17452-class-colors-function-for-208"]https://www.torrenttrader.org/topic/17452-class-colors-function-for-208[/url]
excuse my ignorance as I am new to php.
and what file should I do this?
could put here the files I have to put this code?
Unknown User
2013-08-20 18:49:25
[url="https://www.torrenttrader.org/user/53126-bigmax1/"]BigMax1[/url]
You are the best
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