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
[Addon] Add MB and GB from staff panel
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-10-26 14:04:05
This is one of my mods from the premium section which was done Apr 23, 2008. it was originally done for V2.03 so it may need some modding to work on the newer versions.

ok i took a couple of codes here and put them together you may see some things in the code that do not need to be their and that is because when I got it working I did not want to mess with it anymore  :D  what I used was a code from tbdev (i belive it was a code to give out invites or something like that) and part of the casino code. this is just a simple code that lets you add MB or GB per username. maybe one day I will be able to set it in the account-details.php i have tested this on two different sites and it works.

add in admincp.php:

<td align=center><a href=admincp.php?action=addgigs><img src=images/admin/control_bonus.png border=0 width=32 height=32><br><center><b>Add Gigs</center></b></a><BR></td>
add now at the end of your admincp.php:




	

#======================================================================#

# Add Gigs To Users

#======================================================================#

if($action == "addgigs")

{

if ($_SERVER["REQUEST_METHOD"] == "POST")

{

if ($_POST['doit'] == 'yes') {

mysql_query("UPDATE users SET uploaded = uploaded + 2147483648 WHERE status='confirmed'");

stderr("Upload", "2GB upload is sent to everyone...");

die;

}

if ($_POST["username"] == "" || $_POST["gigs"] == "" || $_POST["gigs"] == "")

show_error_msg("Error", "Missing form data.");

$username = sqlesc($_POST["username"]);

$uploaded = sqlesc($_POST["uploaded"]);

$userid = $CURUSER["id"];

$mb_basic=1024*1024;

if(isset($_POST['unit'])){

if ($_POST["unit"] =='1')

$nobits = $gigs*$mb_basic;

if ($_POST["unit"] =='2')

$nobits = $gigs*$mb_basic*1024;

 

}

$modcomment = gmdate("Y-m-d") . " - ".$CURUSER['username']." has given ".mksize($nobits)." to this user.\n " .$modcomment;

mysql_query("UPDATE users SET modcomment = '$modcomment', uploaded=uploaded + $nobits WHERE username=$username") or sqlerr(__FILE__, __LINE__);

$res = mysql_query("SELECT id FROM users WHERE username=$username");

$arr = mysql_fetch_row($res);

if (!$arr)

show_error_msg("Error", "Unable to update account.");

header("Location: $site_config[SITEURL]/account-details.php?id=$arr[0]");

die;

}

stdhead("Update Users Upload Amounts");

navmenu();

begin_frame("Update Users Uploaded Amounts",false,10,false);

echo "<form method=\"post\" action=\"admincp.php?action=addgigs\">";

?>

<center><font color=red size=2><b>To add gigs put in the user's name and amount then choose MB for megabytes or GB for gigabytes.</b></font></center>

<p align=center><table border=0 width=100% cellspacing=0 cellpadding=0>

<tr><td class="rowhead"><b>User name</b></td><td class="row1"><input type="text" name="username" size="40"/></td></tr>

<tr><td class="rowhead"><b>Amount</b></td><td class="row1"><input type="text" name="gigs" size="5"/><select name=unit><option value=1>MB</option><option value=2>GB</option></td></tr>

<tr><td colspan="2" class="row1" align="center"><input type="submit" value="Okay" class="btn"/></td></tr>

</table>

</form>

<?

end_frame();

stdfoot();

}



here is a screenshot



now you can use this pic if you would like to or add your own pic.

post_15715_1208947378.png
post_15715_1208947378.png
Unknown User
2010-10-26 14:07:06
as much as i know it works on v2.06 because here is what tiloup said on the post

Quote:
Thank you! walker1977   :D
v2.06
Unknown User
2010-10-28 20:19:13
Yes it works fine on v 2.6!!

Thank you :D
2010-10-29 00:27:52
Thank you :D
Unknown User
2011-01-22 21:06:07
"drosatos, post: 66800":
Yes it works fine on v 2.6!!
Thank you  ;)


Perfect Thanks :rolleyes:
Unknown User
2011-01-23 14:20:09
Perfect Thks!
Unknown User
2011-01-24 16:58:48
thanks walker
Unknown User
2011-04-03 20:07:47
How to add send pm to reciever from system with , how much was given and by whom please , and maybe a post in site log with same ....many thanks
Unknown User
2011-08-19 17:10:51
"SJC2TK, post: 71822":
How to add send pm to reciever from system with , how much was given and by whom please , and maybe a post in site log with same ....many thanks

Hi Guys

I am totally in  the same way of SCJ2TK and I would add something to search for a member... instead of trying many times to get their alias name correctly typed!

:angry:

Thanx. Regards.
Unknown User
2011-08-19 17:27:46
if($action == "addgigs")

{

if ($_SERVER["REQUEST_METHOD"] == "POST")

{

if ($_POST['doit'] == 'yes') {

mysql_query("UPDATE users SET uploaded = uploaded + 2147483648 WHERE status='confirmed'");

stderr("Upload", "2GB upload is sent to everyone...");

die;

}

if ($_POST["username"] == "" || $_POST["gigs"] == "" || $_POST["gigs"] == "")

show_error_msg("Error", "Missing form data.");

$username = sqlesc($_POST["username"]);

$uploaded = sqlesc($_POST["uploaded"]);

$userid = $CURUSER["id"];

$mb_basic=1024*1024;

if(isset($_POST['unit'])){

if ($_POST["unit"] =='1')

$nobits = $gigs*$mb_basic;

if ($_POST["unit"] =='2')

$nobits = $gigs*$mb_basic*1024;

 

}

$modcom = mysql_fetch_row(mysql_query("SELECT modcomment FROM users WHERE username=$username LIMIT 1"));

$modcomment = sqlesc(gmdate("Y-m-d") . " - ".$CURUSER['username']." has given ".mksize($nobits)." to this user.\n " .$modcom[0]);

mysql_query("UPDATE users SET modcomment = $modcomment, uploaded=uploaded + $nobits WHERE username=$username") or sqlerr(__FILE__, __LINE__);

$res = mysql_query("SELECT id FROM users WHERE username=$username");

$arr = mysql_fetch_row($res);

if (!$arr)

show_error_msg("Error", "Unable to update account.");

header("Location: $site_config[SITEURL]/account-details.php?id=$arr[0]");

die;

}

stdhead("Update Users Upload Amounts");

navmenu();

begin_frame("Update Users Uploaded Amounts",false,10,false);

echo "<form method=\"post\" action=\"admincp.php?action=addgigs\">";

?>

<center><font color=red size=2><b>To add gigs put in the user's name and amount then choose MB for megabytes or GB for gigabytes.</b></font></center>

<p align=center><table border=0 width=100% cellspacing=0 cellpadding=0>

<tr><td class="rowhead"><b>User name</b></td><td class="row1"><input type="text" name="username" size="40"/></td></tr>

<tr><td class="rowhead"><b>Amount</b></td><td class="row1"><input type="text" name="gigs" size="5"/><select name=unit><option value=1>MB</option><option value=2>GB</option></td></tr>

<tr><td colspan="2" class="row1" align="center"><input type="submit" value="Okay" class="btn"/></td></tr>

</table>

</form>

<?

end_frame();

stdfoot();

}


my old one with mod comment for v2.5  :angry:

stop those casino gamblers
Unknown User
2011-08-19 18:14:28
Hi Thedarklord,

Can I know what is the previous CODE,  this does the same THING as the first post, nothing has been updated for are request from ME and SCJ2TK.

Thanx. Regards.
Unknown User
2011-08-19 18:39:54
ill check it but im sure it used to write into the mod comment box in account details unless im thinking of the donate upload credits mod

no mods installed v2.07 the code i posted see screen

Untitled.jpg
Untitled.jpg
Unknown User
2011-08-19 19:20:40
"thedarklord, post: 74191":
ill check it but im sure it used to write into the mod comment box in account details unless im thinking of the donate upload credits mod

no mods installed v2.07 the code i posted see screen

Hi The Darklord,

Many thanks for replying but we were thinking about adding these features to this MOD to finish it:

1) Send a PM to the member that received the GIGS and by WHO from the staff? Eventlually the PM should include the STAFF MEMBER NAME who add the gigs and the amount!

2) Site Log add up?

3) Lastly, a drop down or a search option?  It happened to often to type wrongly the MEMBER NAME.

And yes, to answer your question, this MOD adds the informatoin in the comment box... and that's all it does.

Thanx. Regards.
Unknown User
2011-08-19 19:42:09
Quote:
QUOTE (thedarklord @ Aug 19 2011, 02:39 PM) ill check it but im sure it used to write into the mod comment box in account details unless im thinking of the donate upload credits mod

no mods installed v2.07 the code i posted see screen

Hi The Darklord,

Many thanks for replying but we were thinking about adding these features to this MOD to finish it:

1) Send a PM to the member that received the GIGS and by WHO from the staff? Eventlually the PM should include the STAFF MEMBER NAME who add the gigs and the amount!

2) Site Log add up?

3) Lastly, a drop down or a search option? It happened to often to type wrongly the MEMBER NAME.

And yes, to answer your question, this MOD adds the informatoin in the comment box... and that's all it does.

Thanx. Regards.
try this:

find:

mysql_query("UPDATE users SET modcomment = '$modcomment', uploaded=uploaded + $nobits WHERE username=$username") or sqlerr(__FILE__, __LINE__);





underneath add:



write_log("$CURUSER[username] has given ".mksize($nobits)." to ".$username."");





find:



if (!$arr)

show_error_msg("Error", "Unable to update account.");





replace by :



if (!$arr)	{

show_error_msg("Error", "Unable to update account.");

}else{

$msg ="$CURUSER[username] has given ".mksize($nobits)." to you";



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

}





find:



<tr><td class="rowhead"><b>User name</b></td><td class="row1"><input type="text" name="username" size="40"/></td></tr>





replace by :



<?php

$res = mysql_query("SELECT username FROM users ORDER BY username");

  $pseudo = "<select name=\"username\">\n";

while ($arr = mysql_fetch_assoc($res))

$pseudo .= "<option value=\"$arr[username]\">$arr[username]</option>\n";

$pseudo .= "</select>\n";

 

  ?>

  <tr>

  <td class="rowhead"><b>User name</b></td>

<td class="row1"><?php echo $pseudo;?></td>

</tr>
Unknown User
2011-08-19 19:42:42
delete this dubble post sorry  :angry:
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728