$UserID = $LoggedUser['ID'];
$PermID = $LoggedUser['PermissionID'];
if (!$LoggedUser['DisablePoints']) {
$PointsRate = 0;
$getTorrents = $DB->query("
SELECT um.BonusPoints,
COUNT(DISTINCT x.fid) AS Torrents,
SUM(t.Size) AS Size,
SUM(xs.seedtime) AS Seedtime,
SUM(t.Seeders) AS Seeders
FROM users_main AS um
LEFT JOIN users_info AS i on um.ID = i.UserID
LEFT JOIN xbt_files_users AS x ON um.ID=x.uid
LEFT JOIN torrents AS t ON t.ID=x.fid
LEFT JOIN xbt_snatched AS xs ON x.uid=xs.uid AND x.fid=xs.fid
WHERE
um.ID = ?
AND um.Enabled = '1'
AND x.active = 1
AND x.completed = 0
AND x.Remaining = 0
GROUP BY um.ID", $UserID);
if ($DB->has_results()) {
list($BonusPoints, $NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record();
$PointsRate = (0.5 + (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3)))**0.95;
}
$PointsRate = intval(max(min($PointsRate, ($PointsRate * 2) - ($BonusPoints/1440)), 0));
$PointsPerHour = number_format($PointsRate) . " ".BONUS_POINTS."/hour";
$PointsPerDay = number_format($PointsRate*24) . " ".BONUS_POINTS."/day";
} else {
$PointsPerHour = "0 ".BONUS_POINTS."/hour";
$PointsPerDay = BONUS_POINTS." disabled";
}
//Include the header
View::show_header('Store');
?>
Store
You have =number_format($LoggedUser['BonusPoints'])?> =BONUS_POINTS?> to spend
You're making =$PointsPerHour?> (=$PointsPerDay?>)
Item |
Cost |
Description |
1GiB Upload
|
1,300 =BONUS_POINTS?>
|
Purchase 1GiB of upload
|
10GiB Upload
|
13,000 =BONUS_POINTS?>
|
Purchase 10GiB of upload
|
100GiB Upload
|
130,000 =BONUS_POINTS?>
|
Purchase 100GiB of upload
|
1,000GiB Upload
|
1,300,000 =BONUS_POINTS?>
|
Purchase 1,000GiB of upload
|
1,000 =BONUS_POINTS?>
|
1.3GiB Upload
|
Purchase 1,000 =BONUS_POINTS?>
|
10,000 =BONUS_POINTS?>
|
13GiB Upload
|
Purchase 10,000 =BONUS_POINTS?>
|
100,000 =BONUS_POINTS?>
|
130GiB Upload
|
Purchase 100,000 =BONUS_POINTS?>
|
1,000,000 =BONUS_POINTS?>
|
1,300GiB Upload
|
Purchase 1,000,000 =BONUS_POINTS?>
|
Freeleechize
|
20,000 =BONUS_POINTS?>
|
Make a torrent freeleech (to everyone) for 24 hours
|
Custom Title
|
50,000 =BONUS_POINTS?>
|
Purchase a custom title
|
Invite
|
100,000 =BONUS_POINTS?>
|
Purchase an invite for your friend
|
switch ($PermID) {
case USER:
$To = array('Modest Mounds', '1,000');
break;
case MEMBER:
$To = array('Well Endowed', '10,000');
break;
case POWER:
$To = array('Bombshell', '30,000');
break;
case ELITE:
$To = array('Top Heavy', '60,000');
break;
case TORRENT_MASTER:
$To = array('Titty Monster', '100,000');
break;
}
if (isset($To)) { ?>
Promotion
|
=$To[1]." ".BONUS_POINTS?>
|
Get promoted to =$To[0]?>
|
} ?>
Become Admin
|
4,294,967,296 =BONUS_POINTS?>
|
Have your class changed to Sysop
|
Freeleech Pool
|
|
Make a donation to the Freeleech Pool
|
Badges
Badge |
Cost |
$DB->query("
SELECT ID AS BadgeID, Name, Description
FROM badges
WHERE ID IN (100, 101, 102, 103, 104, 105, 106, 107)");
if ($DB->has_results()) {
$Badges = $DB->to_array();
foreach ($Badges as $ID => $Badge) {
?>
if (($ID == 0 || Badges::has_badge($LoggedUser['ID'], $Badges[$ID-1]['BadgeID'])) && !Badges::has_badge($LoggedUser['ID'], $Badge['BadgeID']))
$BadgeText = ''.$Badge['Name'].'';
else
$BadgeText = $Badge['Name']
?>
=Badges::display_badge($Badge['BadgeID'])?>=$BadgeText?> |
=$Badge['Description']?> |
}
}
$DB->query("
SELECT ID AS BadgeID, Name, Description
FROM badges
WHERE Name='Oppaicoin'");
if ($DB->has_results()) {
$CoinBadge = $DB->to_array()[0];
$BadgeText = ''.$CoinBadge['Name'].'';
?>
=Badges::display_badge($CoinBadge['BadgeID'])?>=$BadgeText?> |
=$CoinBadge['Description']?> |
} ?>
View::show_footer(); ?>