Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #21  
Old 8th March 2016, 21:35
Napon Napon is offline
Banned
 
Join Date: Feb 2016
P2P
Posts: 522
Default
this it on 116

Code:
    $md5ip = md5($octet[0].$TBDev['mysql_user'].$row['passhash'].$TBDev['mysql_host'].$octet[1]);
    if( !get_mycookie('ipcheck') OR (get_mycookie('ipcheck') !== $md5ip) )
      return;
}

Last edited by Napon; 26th March 2016 at 23:16.
Reply With Quote
  #22  
Old 26th March 2016, 18:29
Viny Viny is offline
Senior Member
 
Join Date: Sep 2012
P2P
Posts: 23
Default
the button "proceed" is not available

Quote:
Warning! The following errors must be rectified before continuing!

This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged. About Magic Quotes
i need make downgrade php version? how make?

Click the image to open in full size.
Reply With Quote
  #23  
Old 26th March 2016, 18:39
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
Just disable Magic Quotes
http://php.net/manual/en/security.ma....disabling.php
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
The Following User Says Thank You to joeroberts For This Useful Post:
Viny (28th March 2016)
  #24  
Old 26th March 2016, 19:46
Viny Viny is offline
Senior Member
 
Join Date: Sep 2012
P2P
Posts: 23
Default
Quote:
Originally Posted by joeroberts View Post
it worked, thank you man
Reply With Quote
  #25  
Old 26th March 2016, 23:13
Napon Napon is offline
Banned
 
Join Date: Feb 2016
P2P
Posts: 522
Thumbs up
@RootDir

Replace in side the htaccess the below


PHP Code:
php_value magic_quotes_gpc 0
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime off
######################
#ErrorPages
ErrorDocument 400 /error.php?400
ErrorDocument 401 
/error.php?401
ErrorDocument 403 
/error.php?403
ErrorDocument 404 
/error.php?404
ErrorDocument 500 
/error.php?500
################################################## 
Reply With Quote
  #26  
Old 30th March 2016, 20:48
Viny Viny is offline
Senior Member
 
Join Date: Sep 2012
P2P
Posts: 23
Default
i just installed

/mybonus.php
Click the image to open in full size.
Reply With Quote
  #27  
Old 10th April 2016, 21:18
Napon Napon is offline
Banned
 
Join Date: Feb 2016
P2P
Posts: 522
Thumbs up mybonus
mybonus fix

Code:
<?php
/*
+------------------------------------------------
|   BitTorrent Tracker PHP
|   =============================================
|   by Cod3r
|   (c) 2015 - 2016 torrentstrike.net
|   http://torrentstrike.net
|   =============================================
|   Licence Info: GPL
+------------------------------------------------
*/
require_once "include/bittorrent.php";
require_once "include/user_functions.php";
dbconn();
loggedinorreturn();
$lang = array_merge( load_language('global'), load_language('mybonus') );
$HTMLOUT ='';
                function I_smell_a_rat($var){
                       if ((0 + $var) == 1)
                                $var = 0 + $var;
                                else
                        stderr("Error", "I smell a rat!");
}
                                $bonus = htmlspecialchars($CURUSER['seedbonus'], 1);
                      switch (true){
                        case ($_GET['up_success']):
                             I_smell_a_rat($_GET['up_success']);
                             $amt = (int)$_GET['amt'];
                      switch ($amt) {
                       case $amt == 75.0:
                            $amt = '1 GB';
                            break;
                       case $amt == 150.0:
                            $amt = '2.5 GB';
                            break;
                          default:
                            $amt = '5 GB';
}

$HTMLOUT .='<table width="80%"><tr><td class="colhead" align="left" colspan="2"><h1>Success !</h1></td></tr><tr>'.'<td class="colhead" align="left"><img src=pic/smilies/karma.gif alt=good_karma></td>'.'<td class="colhead" align="left"><b>Congratulations ! </b>'.$CURUSER['username'].' you have just increased your upload amount !'.' <img src=pic/smilies/w00t.gif alt=w00t><br /><br /><br /><br /> click to go back to your '.'<a class=altlink href=mybonus.php>Karma Bonus Point</a> page.<br /><br /></td></tr></table>';
            print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
            die;
}
            if ($_GET['exchange']){
            I_smell_a_rat($_GET['exchange']);
                $userid = 0 + $CURUSER['id'];
            if (!is_valid_id($userid))
                stderr("Error", "That is not your user ID!");
                $option = 0 + $_POST['option'];
                $res_points = mysql_query("SELECT * FROM bonus WHERE id =" . sqlesc($option));
                $arr_points = mysql_fetch_assoc($res_points);
                $art = $arr_points['art'];
                $points = $arr_points['points'];
            if ($points == 0)
                stderr("Error", "I smell a rat!");
                $seedbonus = htmlspecialchars($bonus-$points,1);
                $upload = $CURUSER['uploaded'];
                $bonuscomment = $CURUSER['bonuscomment'];
                $bpoints = $CURUSER['seedbonus'];
            if ($bonus < $points)
                stderr("Sorry", "you do not have enough Karma points!");
        switch ($art){
        case 'traffic':
                $up = $upload + $arr_points['menge'];
                $bonuscomment = gmdate("Y-m-d") . " - " .$points. " Points for upload bonus.\n " .$bonuscomment;
                mysql_query("UPDATE users SET uploaded = $upload + $arr_points[menge], seedbonus = '$seedbonus', bonuscomment = '$bonuscomment' WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
                header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?up_success=1&amt=$points");
                die;
                break;
                }
}
$HTMLOUT .='<table align=center width="100%"  border="0"  cellspacing="0" cellpadding="5"><tr><td class="colhead" colspan="4">'.'<h1>'.$SITENAME.' Karma Bonus Point system:</h1></td></tr><tr><td align="center" colspan="4"  class="colhead">'.'Exchange your <a class=altlink href=mybonus.php>Karma Bonus Points</a> [ current '.$bonus.' ] for goodies!'.'<br /><br />[ If no buttons appear, you have not earned enough bonus points to trade. ]<br /><br /><tr>'.'<td class="colhead" align="left">Description</td>'.'<td class="colhead" align="center">Points</td><td class="colhead" align="center">Trade</td></tr>';
            $res = mysql_query("SELECT * FROM bonus ORDER BY id ASC");
     while ($gets = mysql_fetch_assoc($res)){
            $count1= (++$count1)%2;
            $class = 'clearalt'.($count1==0?'6':'7');
$HTMLOUT .='<form action=mybonus.php?exchange=1 method=post>';
     switch (true){
     case ($gets['id'] == 5):
           break;
           default:
$HTMLOUT .='<tr><td class="colhead" align="left" class='.$class.'><h1><font color="#2682ff">'.$gets['bonusname'].'</font></h1>'.$gets['description'].'</td><td class="colhead" align="center" class='.$class.'>'.$gets['points'].'</td>';
}
$HTMLOUT .='<input type=hidden name=option value='.$gets['id'].'> <input type=hidden name=art value='.$gets['art'].'>';
            if($bonus >= $gets['points']) {
            switch (true){
            case ($gets['id'] == 7):
$HTMLOUT .='<td class="colhead" class='.$class.'><input class=button type=submit name=submit value="Karma Gift!"></form></td>';
            break;
            default:
$HTMLOUT .='<td class="colhead" class='.$class.'><input class=button type=submit name=submit value="Exchange!"></form></td>';
}
            }else
$HTMLOUT .='<td class="colhead" class='.$class.' align=center><b>more points needed</b></form></td>';
}
$HTMLOUT .='</table><br /><br /><br /><table width=100%><tr><td class="colhead"><h1>What the hell are these Karma Bonus points,'.' and how do I get them?</h1></td></tr><tr><td class="colhead">- For every hour that you seed a torrent, you are awarded with 1'.' Karma Bonus Point... <br />If you save up enough of them, you can trade them in for goodies like bonus GB(s) to '.'your upload<br /> stats,getting more invites, or doing the real Karma booster... give them to another user!<br />'.'and yes! this is awarded on a per torrent basis (max of 5) even if there are no leechers on the Torrent you are seeding! <br />'.'<h1>Other things that will get you karma points:</h1><ul><li>uploading a new torrent = 15 points</li><li>'.'uploading a new subtitle = 10 points</li><li>comment on torrent = 3 points</li>'.'<li>saying thanks = 2 points</li><li>making a post = 1 point</li>'.'<li>starting a topic = 1 point</li><li>voting on poll = 1 point</li><li>filling a request = 10 points</li>'.'</ul><h1>Some things that will cost you karma points:</h1><ul>'.'<li>upload credit</li><li>custom title</li>'.'<li>a 1:1 ratio on a torrent</li>'.'<li>buying off your warning</li><li>one month custom smilies for the forums and comments</li>'.'<li>getting extra invites</li><li>giving a gift of karma points to another user</li>'.'<li>asking for a re-seed</li><li>making a request</li></ul><p>But keep in mind that everything that can get'.' you karma can also be lost, <br />ie:if you up a torrent then delete it, you will gain and then lose 10 points, <br />'.'making a post and having it deleted will do the same<br /><br />... and there are other hidden bonus karma points all '.'over the site.<br /><br />Yet another way to help out your ratio! </p><p>*please note, staff can give or take away '.'points for breaking the rules, or doing good for the community.</p></td></tr></table>';
            print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
?>
Reply With Quote
  #28  
Old 22nd April 2016, 13:56
Viny Viny is offline
Senior Member
 
Join Date: Sep 2012
P2P
Posts: 23
Default
Quote:
Originally Posted by Napon View Post
mybonus fix

Code:
<?php
/*
+------------------------------------------------
|   BitTorrent Tracker PHP
|   =============================================
|   by Cod3r
|   (c) 2015 - 2016 torrentstrike.net
|   http://torrentstrike.net
|   =============================================
|   Licence Info: GPL
+------------------------------------------------
*/
require_once "include/bittorrent.php";
require_once "include/user_functions.php";
dbconn();
loggedinorreturn();
$lang = array_merge( load_language('global'), load_language('mybonus') );
$HTMLOUT ='';
                function I_smell_a_rat($var){
                       if ((0 + $var) == 1)
                                $var = 0 + $var;
                                else
                        stderr("Error", "I smell a rat!");
}
                                $bonus = htmlspecialchars($CURUSER['seedbonus'], 1);
                      switch (true){
                        case ($_GET['up_success']):
                             I_smell_a_rat($_GET['up_success']);
                             $amt = (int)$_GET['amt'];
                      switch ($amt) {
                       case $amt == 75.0:
                            $amt = '1 GB';
                            break;
                       case $amt == 150.0:
                            $amt = '2.5 GB';
                            break;
                          default:
                            $amt = '5 GB';
}

$HTMLOUT .='<table width="80%"><tr><td class="colhead" align="left" colspan="2"><h1>Success !</h1></td></tr><tr>'.'<td class="colhead" align="left"><img src=pic/smilies/karma.gif alt=good_karma></td>'.'<td class="colhead" align="left"><b>Congratulations ! </b>'.$CURUSER['username'].' you have just increased your upload amount !'.' <img src=pic/smilies/w00t.gif alt=w00t><br /><br /><br /><br /> click to go back to your '.'<a class=altlink href=mybonus.php>Karma Bonus Point</a> page.<br /><br /></td></tr></table>';
            print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
            die;
}
            if ($_GET['exchange']){
            I_smell_a_rat($_GET['exchange']);
                $userid = 0 + $CURUSER['id'];
            if (!is_valid_id($userid))
                stderr("Error", "That is not your user ID!");
                $option = 0 + $_POST['option'];
                $res_points = mysql_query("SELECT * FROM bonus WHERE id =" . sqlesc($option));
                $arr_points = mysql_fetch_assoc($res_points);
                $art = $arr_points['art'];
                $points = $arr_points['points'];
            if ($points == 0)
                stderr("Error", "I smell a rat!");
                $seedbonus = htmlspecialchars($bonus-$points,1);
                $upload = $CURUSER['uploaded'];
                $bonuscomment = $CURUSER['bonuscomment'];
                $bpoints = $CURUSER['seedbonus'];
            if ($bonus < $points)
                stderr("Sorry", "you do not have enough Karma points!");
        switch ($art){
        case 'traffic':
                $up = $upload + $arr_points['menge'];
                $bonuscomment = gmdate("Y-m-d") . " - " .$points. " Points for upload bonus.\n " .$bonuscomment;
                mysql_query("UPDATE users SET uploaded = $upload + $arr_points[menge], seedbonus = '$seedbonus', bonuscomment = '$bonuscomment' WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
                header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?up_success=1&amt=$points");
                die;
                break;
                }
}
$HTMLOUT .='<table align=center width="100%"  border="0"  cellspacing="0" cellpadding="5"><tr><td class="colhead" colspan="4">'.'<h1>'.$SITENAME.' Karma Bonus Point system:</h1></td></tr><tr><td align="center" colspan="4"  class="colhead">'.'Exchange your <a class=altlink href=mybonus.php>Karma Bonus Points</a> [ current '.$bonus.' ] for goodies!'.'<br /><br />[ If no buttons appear, you have not earned enough bonus points to trade. ]<br /><br /><tr>'.'<td class="colhead" align="left">Description</td>'.'<td class="colhead" align="center">Points</td><td class="colhead" align="center">Trade</td></tr>';
            $res = mysql_query("SELECT * FROM bonus ORDER BY id ASC");
     while ($gets = mysql_fetch_assoc($res)){
            $count1= (++$count1)%2;
            $class = 'clearalt'.($count1==0?'6':'7');
$HTMLOUT .='<form action=mybonus.php?exchange=1 method=post>';
     switch (true){
     case ($gets['id'] == 5):
           break;
           default:
$HTMLOUT .='<tr><td class="colhead" align="left" class='.$class.'><h1><font color="#2682ff">'.$gets['bonusname'].'</font></h1>'.$gets['description'].'</td><td class="colhead" align="center" class='.$class.'>'.$gets['points'].'</td>';
}
$HTMLOUT .='<input type=hidden name=option value='.$gets['id'].'> <input type=hidden name=art value='.$gets['art'].'>';
            if($bonus >= $gets['points']) {
            switch (true){
            case ($gets['id'] == 7):
$HTMLOUT .='<td class="colhead" class='.$class.'><input class=button type=submit name=submit value="Karma Gift!"></form></td>';
            break;
            default:
$HTMLOUT .='<td class="colhead" class='.$class.'><input class=button type=submit name=submit value="Exchange!"></form></td>';
}
            }else
$HTMLOUT .='<td class="colhead" class='.$class.' align=center><b>more points needed</b></form></td>';
}
$HTMLOUT .='</table><br /><br /><br /><table width=100%><tr><td class="colhead"><h1>What the hell are these Karma Bonus points,'.' and how do I get them?</h1></td></tr><tr><td class="colhead">- For every hour that you seed a torrent, you are awarded with 1'.' Karma Bonus Point... <br />If you save up enough of them, you can trade them in for goodies like bonus GB(s) to '.'your upload<br /> stats,getting more invites, or doing the real Karma booster... give them to another user!<br />'.'and yes! this is awarded on a per torrent basis (max of 5) even if there are no leechers on the Torrent you are seeding! <br />'.'<h1>Other things that will get you karma points:</h1><ul><li>uploading a new torrent = 15 points</li><li>'.'uploading a new subtitle = 10 points</li><li>comment on torrent = 3 points</li>'.'<li>saying thanks = 2 points</li><li>making a post = 1 point</li>'.'<li>starting a topic = 1 point</li><li>voting on poll = 1 point</li><li>filling a request = 10 points</li>'.'</ul><h1>Some things that will cost you karma points:</h1><ul>'.'<li>upload credit</li><li>custom title</li>'.'<li>a 1:1 ratio on a torrent</li>'.'<li>buying off your warning</li><li>one month custom smilies for the forums and comments</li>'.'<li>getting extra invites</li><li>giving a gift of karma points to another user</li>'.'<li>asking for a re-seed</li><li>making a request</li></ul><p>But keep in mind that everything that can get'.' you karma can also be lost, <br />ie:if you up a torrent then delete it, you will gain and then lose 10 points, <br />'.'making a post and having it deleted will do the same<br /><br />... and there are other hidden bonus karma points all '.'over the site.<br /><br />Yet another way to help out your ratio! </p><p>*please note, staff can give or take away '.'points for breaking the rules, or doing good for the community.</p></td></tr></table>';
            print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
?>
the problem has decreased but still remains
Code:
Notice: Undefined index: up_success in /home/vinyg365/public_html/monkeyz/mybonus.php on line 27

Notice: Undefined index: exchange in /home/vinyg365/public_html/monkeyz/mybonus.php on line 45

Notice: Undefined variable: SITENAME in /home/vinyg365/public_html/monkeyz/mybonus.php on line 73

Notice: Undefined variable: count1 in /home/vinyg365/public_html/monkeyz/mybonus.php on line 76
Reply With Quote
  #29  
Old 7th May 2016, 19:19
bbta bbta is offline
Member
 
Join Date: May 2016
Posts: 1
Default
I am also having this problem
Reply With Quote
  #30  
Old 7th May 2016, 20:52
Napon Napon is offline
Banned
 
Join Date: Feb 2016
P2P
Posts: 522
Thumbs up
PHP Code:
<?php
    
require_once("include/bittorrent.php");
    require_once(
"include/user_functions.php");
    
//require_once("include/bbcode_functions.php");
    
dbconn(false);

    
loggedinorreturn();
    
$lang array_mergeload_language('global'), load_language('mybonus') );
    
$HTMLOUT ='';
    function 
I_smell_a_rat($var){
if ((
$var) == 1)
    
$var $var;
    else
    
stderr("{$lang['bonus_error_msg']}""{$lang['bonus_rat_msg']}");
}
    
$bonus htmlspecialchars($CURUSER['seedbonus'], 1);
    switch (
true){
    case (isset(
$_GET['up_success'])):
    
I_smell_a_rat($_GET['up_success']);
    
$amt = (int)$_GET['amt'];
    switch (
$amt) {
    case 
$amt == 75.0:
       
$amt '1 GB';
       break;
    case 
$amt == 150.0:
       
$amt '2.5 GB';
       break;
    default:
       
$amt '5 GB';
}
    
$HTMLOUT .= "<table align='center' width='80%'>
    <tr>
    <td class='colhead' align='left' colspan='2'><h1>
{$lang['bonus_success']}</h1></td>
    </tr><tr>
    <td class='colhead' align='left'><img src='
{$TBDEV['pic_base_url']}smilies/karma.gif' alt='{$lang['bonus_img_karma']}' title='{$lang['bonus_img_karma']}' /></td>
    <td class='colhead' align='left'><b>
{$lang['bonus_congrat']}</b>".$CURUSER['username']."{$lang['bonus_uploadinc']}".$amt."!
    <img src='
{$TBDEV['pic_base_url']}smilies/w00t.gif' alt='{$lang['bonus_img_woot']}' title='{$lang['bonus_img_woot']}' /><br /><br /><br /><br />{$lang['bonus_goback']}<br /><br /></td>
    </tr>
    </table>"
;
    print 
stdhead('Bonus Karma') . $HTMLOUT stdfoot();
    die;
    case (isset(
$_GET['class_success'])):
    
I_smell_a_rat($_GET['class_success']);
    
$HTMLOUT .="<table align='center' width='80%'><tr><td class='colhead' align='left' colspan='2'><h1>{$lang['bonus_success']}</h1></td></tr>
    <tr><td align='left' class='colhead'><img src='
{$TBDEV['pic_base_url']}smilies/karma.gif' alt='{$lang['bonus_img_karma']}' title='{$lang['bonus_img_karma']}' /></td><td align='left' class='colhead'>
    <b>
{$lang['bonus_congrat']}</b>".$CURUSER['username']."{$lang['bonus_vip']}<img src='{$TBDEV['pic_base_url']}smilies/w00t.gif' alt='{$lang['bonus_img_woot']}' title='{$lang['bonus_img_woot']}' /><br />
    <br />
{$lang['bonus_goback']}<br /><br /></td></tr></table>";
    print 
stdhead('Karma Bonus') . $HTMLOUT stdfoot();
    die;

    case (isset(
$_GET['warning_success'])):
    
I_smell_a_rat($_GET['warning_success']);
    
$HTMLOUT .="<table align='center' width='80%'><tr><td class='colhead' align='left' colspan='2'><h1>{$lang['bonus_success']}</h1></td></tr>
    <tr><td align='left' class='colhead'><img src='
{$TBDEV['pic_base_url']}smilies/karma.gif' alt='{$lang['bonus_img_karma']}' title='{$lang['bonus_img_karma']}' /></td><td align='left' class='colhead'>
    <b>
{$lang['bonus_congrat']}</b>".$CURUSER['username']."{$lang['bonus_warning']}<img src='{$TBDEV['pic_base_url']}smilies/w00t.gif' alt='{$lang['bonus_img_woot']}' title='{$lang['bonus_img_woot']}' /><br />
    <br />
{$lang['bonus_goback']}<br /><br /></td></tr></table>";
    print 
stdhead('Karma Bonus') . $HTMLOUT stdfoot();
    die;
    case (isset(
$_GET['invite_success'])):
    
I_smell_a_rat($_GET['invite_success']);
    
$HTMLOUT .="<table align='center' width='80%'><tr><td class='colhead' align='left' colspan='2'><h1>{$lang['bonus_success']}</h1></td></tr><tr><td align='left' class='colhead'>
    <img src='
{$TBDEV['pic_base_url']}smilies/karma.gif' alt='{$lang['bonus_img_karma']}' title='{$lang['bonus_img_karma']}' /></td><td align='left' class='colhead'>
    <b>
{$lang['bonus_congrat']}</b>".$CURUSER['username']."{$lang['bonus_invites']}<img src='{$TBDEV['pic_base_url']}smilies/w00t.gif' alt='{$lang['bonus_img_woot']}' title='{$lang['bonus_img_woot']}' /><br /><br />{$lang['bonus_goback']}<br /><br /></td></tr></table>";
    print 
stdhead('Karma Bonus') . $HTMLOUT stdfoot();
    die;
}
if (isset(
$_GET['exchange'])){
    
I_smell_a_rat($_GET['exchange']);
    
$userid $CURUSER['id'];
    if (!
is_valid_id($userid))
    
stderr("{$lang['bonus_error_msg']}""{$lang['bonus_notid_msg']}");
    
$option $_POST['option'];
    
$res_points mysql_query("SELECT * FROM bonus WHERE id =" sqlesc($option));
    
$arr_points mysql_fetch_assoc($res_points);
    
$art $arr_points['art'];
    
$points $arr_points['points'];
if (
$points == 0)
    
stderr("{$lang['bonus_error_msg']}""{$lang['bonus_rat_msg']}");
    
$seedbonus=htmlspecialchars($bonus-$points,1);
    
$upload $CURUSER['uploaded'];
    
$download $CURUSER['downloaded'];
    
$bonuscomment $CURUSER['bonuscomment'];
    
$bpoints $CURUSER['seedbonus'];
if(
$bonus $points)
    
stderr("{$lang['bonus_sorry']}""{$lang['bonus_notenough_msg']}");
    switch (
$art){
    case 
'traffic':
    
$up $upload $arr_points['menge'];
    
$bonuscomment get_datetime(), 'DATE') . " - " .$points" Points for upload bonus.\n " .$bonuscomment;
    
mysql_query("UPDATE users SET uploaded = $upload + $arr_points[menge], seedbonus = '$seedbonus', bonuscomment = '$bonuscomment' WHERE id = '$userid'") or sqlerr(__FILE____LINE__);
    
header("Refresh: 0; url='{$TBDEV['baseurl']}/mybonus.php?up_success=1&amt=$points'");
    die;
     break;
    case 
'traffic2':
    case 
'ratio':
    
$torrent_number $_POST['torrent_id'];
    
$res_snatched mysql_query("SELECT s.uploaded, s.downloaded, t.name FROM snatched AS s LEFT JOIN torrents AS t ON t.id = s.torrentid WHERE s.userid = '$userid' AND torrentid = ".sqlesc($torrent_number)." LIMIT 1") or sqlerr(__FILE____LINE__);
    
$arr_snatched mysql_fetch_assoc($res_snatched);
if (
$arr_snatched['name'] == '')
    
stderr("{$lang['bonus_error_msg']}""{$lang['bonus_notorrent_msg']}");
if (
$arr_snatched['uploaded'] >= $arr_snatched['downloaded'])
    
stderr("{$lang['bonus_error_msg']}""{$lang['bonus_fineratio_msg']}");
    
mysql_query("UPDATE snatched SET uploaded = '$arr_snatched[downloaded]' WHERE userid = '$userid' AND torrentid = ".sqlesc($torrent_number)) or sqlerr(__FILE____LINE__);
    
$difference $arr_snatched['downloaded'] - $arr_snatched['uploaded'];
    
$bonuscomment get_datetime(), 'DATE') . " - " .$points" Points for 1 to 1 ratio on torrent: ".$arr_snatched['name']." ".$torrent_number.", ".$difference." added .\n " .$bonuscomment;
    
mysql_query("UPDATE users SET uploaded = $upload + $difference, bonuscomment = '$bonuscomment', seedbonus = '$seedbonus' WHERE id = '$userid'") or sqlerr(__FILE____LINE__);
    
header("Refresh: 0; url='{$TBDEV['baseurl']}/mybonus.php?ratio_success=1'");
    die;
     break;
     case 
'warning':
if (
$CURUSER['warned'] == 'no')
    
stderr("{$lang['bonus_error_msg']}""{$lang['bonus_notthere_msg']}");
    
$bonuscomment get_datetime(), 'DATE') . " - " .$points" Points for removing warning.\n " .$bonuscomment;
    
$res_warning mysql_query("SELECT modcomment FROM users WHERE id = '$userid'") or sqlerr(__FILE____LINE__);
    
$arr mysql_fetch_assoc($res_warning);
    
$modcomment htmlspecialchars($arr['modcomment']);
    
$modcomment get_datetime(), 'DATE') . " - Warning removed by - Bribe with Karma.\n"$modcomment;
    
$modcom sqlesc($modcomment);
    
mysql_query("UPDATE users SET warned = 'no', warneduntil = '0', seedbonus = '$seedbonus', bonuscomment = '$bonuscomment', modcomment = $modcom WHERE id = '$userid'") or sqlerr(__FILE____LINE__);
    
$dt sqlesc(time());
    
$subject sqlesc("Warning removed by Karma.");
    
$msg sqlesc("Your warning has been removed by the big Karma payoff... Please keep on your best behaviour from now on.\n");
    
mysql_query("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $userid$dt$msg$subject)") or sqlerr(__FILE____LINE__);
    
header("Refresh: 0; url='{$TBDEV['baseurl']}/mybonus.php?warning_success=1'");
    die;
     break;
     case 
'invite':
    
$invites $CURUSER['invites'];
    
$inv $invites+$arr_points['menge'];
    
$bonuscomment get_datetime(), 'DATE') . " - " .$points" Points for invites.\n " .$bonuscomment;
    
mysql_query("UPDATE users SET invites = '$inv', seedbonus = '$seedbonus', bonuscomment = '$bonuscomment' WHERE id = '$userid'") or sqlerr(__FILE____LINE__);
    
header("Refresh: 0; url='{$TBDEV['baseurl']}/mybonus.php?invite_success=1'");
     die;
     break;
    }
}
          
$HTMLOUT .="<div class='roundedCorners' style='text-align:left;width:80%;border:1px solid black;padding:5px;'><div style='background:transparent;height:25px;'><span style='font-weight:bold;font-size:12pt;'>{$lang['bonus_system']}</span></div>";
          
$HTMLOUT .="<table align='center' width='100%' border='1' cellspacing='0' cellpadding='5'><tr><td align='center' colspan='4' style='background:transparent;height:25px;'>{$lang['bonus_exchangepoints']}".$bonus."{$lang['bonus_goodies']}<br /><br />{$lang['bonus_no_buttons']}<br /><br /></td></tr><tr><td style='background:transparent;height:25px;' align='left'>{$lang['bonus_head_descr']}</td><td style='background:transparent;height:25px;' align='center'>{$lang['bonus_head_points']}</td><td style='background:transparent;height:25px;' align='center'>{$lang['bonus_head_trade']}</td></tr>";
          
$res mysql_query("SELECT * FROM bonus ORDER BY id ASC");
    while (
$gets mysql_fetch_assoc($res)){
          
$count1='';
          
$count1= (++$count1)%2;
          
$class 'clearalt'.($count1==0?'6':'7');
          
$otheroption "<table class='colhead' align='center' width='100%'><tr><td class='".$class."'><b>{$lang['bonus_op_username']}</b><input type='text' name='username' size='20' maxlength='24' /></td><td class='".$class."'> <b>{$lang['bonus_op_given']}</b><select name='bonusgift'> <option value='100.0'> 100.0</option> <option value='200.0'> 200.0</option> <option value='300.0'> 300.0</option> <option value='400.0'> 400.0</option><option value='500.0'> 500.0</option><option value='666.0'> 666.0</option></select>{$lang['bonus_op_karma']}</td></tr></table>";
    switch (
true){
    case (
$gets['id'] == 5):
           
$HTMLOUT .="<tr><td class='colhead'align='left' class='".$class."'><form action='{$TBDEV['baseurl']}/mybonus.php?exchange=1' method='post'><input type='hidden' name='option' value='".$gets['id']."' /> <input type='hidden' name='art' value='".$gets['art']."' /><h1><font color='#CECFF3'>".$gets['bonusname']."</font></h1>".$gets['description']."<br /><br />{$lang['bonus_op_title']}<input type='text' name='title' size='30' maxlength='30' />{$lang['bonus_op_click']}</td><td align='center' class='".$class."'>".$gets['points']."</td>";
    break;
     case (
$gets['id'] == 7):
           
$HTMLOUT .="<tr><td class='colhead'align='left' class='".$class."'><form action='{$TBDEV['baseurl']}/mybonus.php?exchange=1' method='post'><input type='hidden' name='option' value='".$gets['id']."' /> <input type='hidden' name='art' value='".$gets['art']."' /><h1><font color='#CECFF3'>".$gets['bonusname']."</font></h1>".$gets['description']."<br /><br />{$lang['bonus_op_username2']}<br />".$otheroption."</td><td align=center class='".$class."'>{$lang['bonus_op_min']}<br />".$gets['points']."<br />{$lang['bonus_op_max']}<br />666</td>";
    break;
     case (
$gets['id'] == 9):
           
$HTMLOUT .="<tr><td class='colhead'align='left' class='".$class."'><form action='{$TBDEV['baseurl']}/mybonus.php?exchange=1' method='post'><input type='hidden' name='option' value='".$gets['id']."' /> <input type='hidden' name='art' value='".$gets['art']."' /><h1><font color='#CECFF3'>".$gets['bonusname']."</font></h1>".$gets['description']."</td><td align='center' class='".$class."'>{$lang['bonus_op_min']}<br />".$gets['points']."</td>";
    break;
     case (
$gets['id'] == 10):
           
$HTMLOUT .="<tr><td class='colhead'align='left' class='".$class."'><form action='{$TBDEV['baseurl']}/mybonus.php?exchange=1' method='post'><input type='hidden' name='option' value='".$gets['id']."' /> <input type='hidden' name='art' value='".$gets['art']."' /><h1><font color='#CECFF3'>".$gets['bonusname']."</font></h1>".$gets['description']."<br /><br />{$lang['bonus_op_idnum']}<input type='text' name='torrent_id' size='4' maxlength='8' />{$lang['bonus_op_idnum2']}</td><td align='center' class='".$class."'>{$lang['bonus_op_min']}<br />".$gets['points']."</td>";
    break;
    default:
          
$HTMLOUT .="<tr><td class='colhead'align='left' class='".$class."'><form action='{$TBDEV['baseurl']}/mybonus.php?exchange=1' method='post'><input type='hidden' name='option' value='".$gets['id']."' /> <input type='hidden' name='art' value='".$gets['art']."' /><h1><font color='#CECFF3'>".$gets['bonusname']."</font></h1>".$gets['description']."</td><td align='center' class='".$class."'>".$gets['points']."</td>";
}
    if(
$bonus >= $gets['points']) {
          switch (
true){
    case (
$gets['id'] == 7):
          
$HTMLOUT .="<td class='colhead' class='".$class."'><input class='button' type='submit' name='submit' value='Karma Gift!' /></td></form>";
    break;
    default:
          
$HTMLOUT .="<td class='colhead' class='".$class."'><input class='button' type='submit' name='submit' value='Exchange!' /></td></form>";
}
          } else
          
$HTMLOUT .="<td class='colhead' class='".$class."' align='center'>{$lang['bonus_op_more']}</td></form>";
}
           
$HTMLOUT .="</tr></table>
                <div style='background:transparent;height:25px;'>
                <span style='font-weight:bold;font-size:12pt;'>
{$lang['bonus_table_hell']}</span></div>
                <table align='center' width='100%'>
                <tr>
                <td class='colhead'>
{$lang['bonus_table_rest_of']}
                <div align='center'><br />
                <a class='altlink' href='
{$TBDEV['baseurl']}/index.php'><b>{$lang['bonus_table_go_back']}</b></a></div></td></tr></table></div>";
    print 
stdhead('Karma Bonus Page') . $HTMLOUT stdfoot();
?>
lang_mybonus

PHP Code:
    <?php

    $lang 
= array(

    
#bonus errors
    
'bonus_error_msg' => "Error",
    
'bonus_rat_msg' => "I smell a rat!",
    
'bonus_nouser_msg' => " No User with that username ",
    
'bonus_notid_msg' => "That is not your user ID!",
    
'bonus_notthere_msg' => "How can we remove a warning that isn't there?<br />go back to your <a class='altlink' href='{$TBDEV['baseurl']}/mybonus.php'>Karma Bonus Point</a> page and think that one over.",
    
'bonus_lower_msg' => "Now why would you want to lower yourself to VIP?<br />go back to your <a class='altlink' href='{$TBDEV['baseurl']}/mybonus.php'>Karma Bonus Point</a> page and think that one over.",
    
'bonus_notorrent_msg' => "No torrent with that ID!<br />Back to your <a class='altlink' href='{$TBDEV['baseurl']}/mybonus.php'>Karma Bonus Point</a> page.",
    
'bonus_notenough_msg' => " you don\'t have enough Karma points.",
    
'bonus_fineratio_msg' => "Your ratio on that torrent is fine, you must have selected the wrong torrent ID.<br />Back to your <a class='altlink' href='{$TBDEV['baseurl']}/mybonus.php'>Karma Bonus Point</a> page.",


    
#bonus message
    
'bonus_system' => " Karma Bonus Point's system :",
    
'bonus_goodies' => " ] for goodies!",
    
'bonus_no_buttons' => "[ If no buttons appear, you have not earned enough bonus points to trade. ]",
    
'bonus_exchangepoints' => "Exchange your <a class='altlink' href='{$TBDEV['baseurl']}/mybonus.php'>Karma Bonus Points</a> [ current ",
    
'bonus_success' => "Success!",
    
'bonus_sorry' => "Sorry",
    
'bonus_karma' => "Karma Bonus",
    
'bonus_congrat' => "Congratulations! ",
    
'bonus_by' => "</b> Karma points by ",
    
'bonus_also' => "You may also ",
    
'bonus_send' => "send ",
    
'bonus_orgoback' => " a message as well</a>, or go back to your <a class='altlink' href='mybonus.php'>Karma Bonus Point</a> page.",
    
'bonus_spread' => "you have spread the Karma well.<br /><br />Member <b>",
    
'bonus_love' => " will be pleased with your kindness!<br /><br />This is the message that was sent:<br /><b>Subject:</b> Someone Loves you!<br /> <p>You have been given a gift of <b>",
    
'bonus_fancy' => "Not so fast there Mr. fancy pants!",
    
'bonus_cannot' => " you can not spread the karma to yourself...<br />If you want to spread the love, pick another user! ",
    
'bonus_uploadinc' => " you have just increased your upload amount by ",
    
'bonus_smilies' => " you have got yourself a set of custom smilies for one month! ",
    
'bonus_warning' => " you have removed your warning for the low price of 1000 points!! ",
    
'bonus_invites' => " you have got your self 3 new invites! ",
    
'bonus_knownas' => " you are now known as ",
    
'bonus_ratio' => " you have gained a 1 to 1 ratio on the selected torrent, and the difference in MB has been added to your total upload! ",
    
'bonus_vip' => " you have got yourself VIP Status for one month! ",
    
'bonus_goback' => " Click to go back to your <a class='altlink' href='{$TBDEV['baseurl']}/mybonus.php'>Karma Bonus Point</a> page.",
     
    
#bonus img alternates
    
'bonus_img_karma' => "Good Karma",
    
'bonus_img_bad' => "Bad Karma",
    
'bonus_img_woot' => "wOOt",

    
#bonus headers
    
'bonus_head_descr' => "Description",
    
'bonus_head_points' => "Points",
    
'bonus_head_trade' => "Trade",
     
    
#bonus options
    
'bonus_op_username' => "Username:",
    
'bonus_op_username2' => "Enter the <b>username</b> of the person you would like to send karma to, and select how many points you want to send and click Exchange!",
    
'bonus_op_given' => "to be given: ",
    
'bonus_op_karma' => " Karma Points!",
    
'bonus_op_title' => "Enter the <b>Special Title</b> you would like to have ",
    
'bonus_op_click' => " click Exchange! ",
    
'bonus_op_min' => "min.",
    
'bonus_op_max' => "max.",
    
'bonus_op_idnum' => "Enter the <b>ID number of the Torrent:</b> ",
    
'bonus_op_idnum2' => " you would like to buy a 1 to 1 ratio on.</b> ",
    
'bonus_op_more' => "<b>more points needed</b>",
     
    
#bonus table
    
'bonus_table_hell' => "What the hell are these Karma Bonus points, and how do I get them?",
    
'bonus_table_rest_of' => "For every hour that you seed a torrent, you are awarded with 1
      Karma Bonus Point... <br />If you save up enough of them, you can trade them in for goodies like bonus GB(s) to 
      your upload<br /> stats,getting more invites, or doing the real Karma booster... give them to another user!<br />
      and yes! this is awarded on a per torrent basis (max of 5) even if there are no leechers on the Torrent you are seeding! <br />
      <h1>Other things that will get you karma points : </h1>
      - Uploading a new torrent = 15 points
      <br />- Putting up an offer = 10 points
      <br />- Filling a request = 10 points
      <br />- Comment on torrent = 3 points
      <br />- Saying thanks = 2 points
      <br />- Rating a torrent = 2 points
      <br />- Making a post = 1 point
      <br />- Starting a topic = 2 points 
      <br />
      <h1>Some things that will cost you karma points:</h1>
      <br />- Upload credit
      <br />- Custom title
      <br />- One month VIP status
      <br />- A 1:1 ratio on a torrent
      <br />- Buying off your warning
      <br />- One month custom smilies for the forums and comments
      <br />- Getting extra invites
      <br />- Giving a gift of karma points to another user
      <br />- Asking for a re-seed
      <br />- Making a request
      <br />- But keep in mind that everything that can get
      you karma can also be lost, <br />ie : if you up a torrent then delete it, you will gain and then lose 15 points, <br />
      making a post and having it deleted will do the same<br /><br />... and there are other hidden bonus karma points all 
      over the site.<br /><br />Yet another way to help out your ratio! 
      <br />- *please note, staff can give or take away 
      points for breaking the rules, or doing good for the community.
      <br />"
,
    
'bonus_table_go_back' => "Back to homepage",
     
     
    
#bonus page name
    
'bonus_page_name' => "Karma Bonus Points page",
     
    );
     
    
?>
PHP Code:
    CREATE TABLE `bonus` (
     `
idINT(5NOT NULL AUTO_INCREMENT,
     `
bonusnameVARCHAR(50NOT NULL DEFAULT '',
     `
pointsDECIMAL(10,1NOT NULL DEFAULT '0.0',
     `
descriptiontext NOT NULL,
     `
artVARCHAR(10NOT NULL DEFAULT 'traffic',
     `
mengeBIGINT(20UNSIGNED NOT NULL DEFAULT '0',
     
PRIMARY KEY (`id`)
ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
PHP Code:
INSERT INTO `bonusVALUES (1'1.0GB Uploaded'75.0'With enough bonus points acquired, you are able to exchange them for an Upload Credit. The points are then removed from your Bonus Bank and the credit is added to your total uploaded amount.''traffic'1073741824);
INSERT INTO `bonusVALUES (2'2.5GB Uploaded'150.0'With enough bonus points acquired, you are able to exchange them for an Upload Credit. The points are then removed from your Bonus Bank and the credit is added to your total uploaded amount.''traffic'2684354560);
INSERT INTO `bonusVALUES (3'5GB Uploaded'250.0'With enough bonus points acquired, you are able to exchange them for an Upload Credit. The points are then removed from your Bonus Bank and the credit is added to your total uploaded amount.''traffic'5368709120);
INSERT INTO `bonusVALUES (4'3 Invites'20.0'With enough bonus points acquired, you are able to exchange them for a few invites. The points are then removed from your Bonus Bank and the invitations are added to your invites amount.''invite'3);
INSERT INTO `bonusVALUES (5'Remove Warning'1000.0'With enough bonus points acquired... So you''ve been naughty... tsk tsk Yep now for the Low Low price of only 1000 points you can have that warning taken away lol.!''warning'1); 
PHP Code:
ALTER TABLE `usersADD `seedbonusdecimal(10,1NOT NULL DEFAULT '200.0'
PHP Code:
ALTER TABLE `usersADD `bonuscommenttext
Find
@userdetails.php
PHP Code:
$modcomment htmlspecialchars($user["modcomment"]); 
under Add

PHP Code:
        $bonuscomment htmlspecialchars($user["bonuscomment"]);
        
$HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_bonus_comment']}</td><td class='col1' colspan='2' align='left'><textarea cols='60' rows='6' name='bonuscomment' readonly='readonly' style='background:purple;color:yellow;'>$bonuscomment</textarea></td></tr>\n"
modtask Add

PHP Code:
          if ((isset($_POST['seedbonus'])) && (($seedbonus $_POST['seedbonus']) != $user['seedbonus']))
         {
         
$modcomment get_datetime(), 'DATE') . " - Seeding bonus set to $seedbonus by " $CURUSER['username'] . ".\n" $modcomment;
         
$updateset[] = "seedbonus = " sqlesc($seedbonus);
         } 
you will have to set all css to your needs

Last edited by Napon; 8th May 2016 at 20:51.
Reply With Quote
Reply

Tags
16 , 2016 , tbdev , tbdev16 , tbdev2016

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 17:07. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.