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:
here is a screenshot

now you can use this pic if you would like to or add your own pic.
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.
