Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Napon Modded TBDev (http://www.bvlist.com/showthread.php?t=10735)

fireknight 16th May 2017 13:19

M1601

Napon has not been seen for 6 months now.
And TBH I do not expect him to return ( well not using that name anyway )
Even if he did return, I doubt that he will fix the problem.
He normally brags that he has that problem sorted months ago, but never posts the code.

You would be better off, ditching this code and move onto something else here that will give you better support.

Chez 17th May 2017 09:23

Quote:

Originally Posted by M1601 (Post 50209)
Notice: Undefined index: up_success in D:\Ampps\www\mybonus.php on line 33

Notice: Undefined index: class_success in D:\Ampps\www\mybonus.php on line 50

Notice: Undefined index: smile_success in D:\Ampps\www\mybonus.php on line 56

Notice: Undefined index: warning_success in D:\Ampps\www\mybonus.php on line 62

Notice: Undefined index: invite_success in D:\Ampps\www\mybonus.php on line 68

Notice: Undefined index: title_success in D:\Ampps\www\mybonus.php on line 74

Notice: Undefined index: ratio_success in D:\Ampps\www\mybonus.php on line 80

Notice: Undefined index: gift_fail in D:\Ampps\www\mybonus.php on line 86

Notice: Undefined index: gift_fail_user in D:\Ampps\www\mybonus.php on line 92

Notice: Undefined index: gift_fail_points in D:\Ampps\www\mybonus.php on line 98

Notice: Undefined index: gift_success in D:\Ampps\www\mybonus.php on line 104

Notice: Undefined index: exchange in D:\Ampps\www\mybonus.php on line 111

Notice: Undefined variable: SITENAME in D:\Ampps\www\mybonus.php on line 246

Notice: Undefined variable: count1 in D:\Ampps\www\mybonus.php on line 249


Pls fix this



Try using isset on every INDEX error you have and for the VARIABLES they are missing or not recognized.

PHP Code:

case (isset($_GET['up_success'])): 


XGODY 24th May 2017 13:21

Mybonus
DB

Code:

$INSERT[] = "INSERT INTO bonus (id, bonusname, points, description, art, menge) VALUES
(1, '1.0GB Uploaded', 275.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, 1.0, 'no', 275),
(2, '2.5GB Uploaded', 350.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, 1.0, 'no', 350),
(3, '5GB Uploaded', 550.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, 1.0, 'no', 550),
(4, 'Custom Title!', 50.0, 'For only 50.0 Karma Bonus Points you can buy yourself a custom title. the only restrictions are no foul or offensive language or userclass can be entered. The points are then removed from your Bonus Bank and your special title is changed to the title of your choice', 'title', 1, 1.0, 'yes', 50),
(5, 'VIP Status', 5000.0, 'With enough bonus points acquired, you can buy yourself VIP status for one month. The points are then removed from your Bonus Bank and your status is changed.', 'class', 1, 1.0, 'yes', 5000),
(6, 'Give A Karma Gift', 100.0, 'Well perhaps you dont need the upload credit, but you know somebody that could use the Karma boost! You are now able to give your Karma credits as a gift! The points are then removed from your Bonus Bank and added to the account of a user of your choice!\r\n\r\nAnd they recieve a PM with all the info as well as who it came from...', 'gift_1', 1073741824, 1.0, 'no', 100),
(7, 'Custom Smilies', 300.0, 'With enough bonus points acquired, you can buy yourself a set of custom smilies for one month! The points are then removed from your Bonus Bank and with a click of a link, your new smilies are available whenever you post or comment!', 'smile', 1, 1.0, 'yes', 300),
(8, 'Remove Warning', 1000.0, 'With enough bonus points acquired... So you''ve been naughty... tsk tsk :P Yep now for the Low Low price of only 1000 points you can have that warning taken away lol.!', 'warning', 1, 1.0, 'yes', 1000),
(9, 'Ratio Fix', 500.0, 'With enough bonus points acquired, you can bring the ratio of one torrent to a 1 to 1 ratio! The points are then removed from your Bonus Bank and your status is changed.', 'ratio', 1, 1.0, 'yes', 500),
(10, '200 Bonus Points - Invite trade-in', 1.0, 'If you have 1 invite and dont use them click the button to trade them in for 200 Bonus Points.', 'itrade', 200, 0.0, 'no', 0)";


iforgot 24th May 2017 14:09

Ok, I was wrong about that.

You'd be here all day trying to repair this code, it's probably best to use something later.

';
    break;
    case ($gets['id'] == 7):
    $HTMLOUT .='';
    break;
    case ($gets['id'] == 9):
    $HTMLOUT .='';
    break;
    case ($gets['id'] == 10):
    $HTMLOUT .='';
    break;
    default:
    $HTMLOUT .='';
}
    $HTMLOUT .='';
    if($bonus >= $gets['points']) {
    switch (true){
    case ($gets['id'] == 7):
    $HTMLOUT .='';
    break;
    default:
    $HTMLOUT .='';
}
    }else
    $HTMLOUT .='';
}
    $HTMLOUT .='
XGODY 24th May 2017 17:15

Yep

Mybonus.php

Code:

/*
+------------------------------------------------
|  TBDev.net BitTorrent Tracker PHP
|  =============================================
|  by Cod3r
|  (c) 2010 - 2016 torrentstrike.net/
http://www.tbdev.net
|  =============================================
|  svn: http://sourceforge.net/projects/tbdevnet/
|  Licence Info: GPL
+------------------------------------------------
|  $Date$
|  $Revision$
|  $Author$
|  $URL$
+------------------------------------------------
*/
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 (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 .=''.''.'

Success !

good_karmaCongratulations ! '.$CURUSER['username'].''.$amt.' you have just increased your upload amount !'.' w00t click to go back to your '.'Karma Bonus Point page.
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['class_success'])):
    I_smell_a_rat($_GET['class_success']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .=''.'

Success !

good_karma'.'Congratulations! '.$CURUSER['username'].' you have got yourself VIP Status for one month ! w00t'.' Click to go back to your Karma Points page.
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['smile_success'])):
    I_smell_a_rat($_GET['smile_success']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .=''.'

Success !

good_karma'.'Congratulations! '.$CURUSER['username'].' you have got yourself a set of custom smilies for one month ! w00t'.' Click to go back to your Karma Points page.
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['warning_success'])):
    I_smell_a_rat($_GET['warning_success']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .=''.'

Success !

good_karma'.'Congratulations! '.$CURUSER['username'].' you have removed your warning for the low price of 5000 points!! w00t'.' Click to go back to your Karma Points page.
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['invite_success'])):
    I_smell_a_rat($_GET['invite_success']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .='

Success !

'.'good_karma'.'Congratulations! '.$CURUSER['username'].' you have got your self 3 new invites! w00t'.' click to go back to your Karma Bonus Point page.
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['title_success'])):
    I_smell_a_rat($_GET['title_success']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .=''.'

Success !

good_karma'.'Congratulations! '.$CURUSER['username'].' you are now known as '.$CURUSER['title'].' ! w00t'.' click to go back to your Karma Bonus Point page.
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['gift_fail'])):
    I_smell_a_rat($_GET['gift_fail']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .='

Huh?

'.'good_karmaNot so fast there Mr. fancy pants!'.''.$CURUSER['username'].'... you can not spread the karma to yourself...If you want to spread the love, pick another user! '.' click to go back to your Karma Bonus Point page.
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['gift_fail_user'])):
    I_smell_a_rat($_GET['gift_fail_user']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .='

Error

'.'good_karmaSorry '.$CURUSER['username'].'...'.' No User with that username  click to go back to your Karma Bonus Point page.'.'
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['gift_fail_points'])):
    I_smell_a_rat($_GET['gift_fail_points']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .='

OUPS!

'.'oupsSorry '.$CURUSER['username'].' you don\'t have enough Karma points'.' go back to your Karma Bonus Point page.
';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
    die;
    case (isset($_GET['gift_success'])):
    I_smell_a_rat($_GET['gift_success']);
    stdhead($CURUSER['username'] . "'s Karma Bonus Page");
    $HTMLOUT .='

Success !

'.'good_karmaCongratulations! '.$CURUSER['username'].' '.'you have spread the Karma well.Member '.htmlspecialchars($_GET['usernamegift']).' will be pleased with your kindness!This is the message that was sent:'.'Subject: Someone Loves you!

You have been given a gift of '.(0 + $_GET['gift_amount_points']).' Karma points by '.$CURUSER['username'].'

'.'You may also send '.htmlspecialchars($_GET['usernamegift']).' a message as well, or go back to your Karma Bonus Point page.
';
    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;
    case 'class':
    if ($CURUSER['class'] > UC_VIP)
    stderr("Error", "Now why would you want to lower yourself to VIP?go back to your Karma Bonus Point page and think that one over.");
    $vip_until = get_date_time(gmtime() + 28*86400);
    $bonuscomment = gmdate("Y-m-d") . " - " .$points. " Points for 1 month VIP Status.\n " .$bonuscomment;
    mysql_query("UPDATE users SET class = ".UC_VIP.", vip_added = 'yes', vip_until = '$vip_until', seedbonus = '$seedbonus' WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
    header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?class_success=1");
    die;
    break;
    case 'warning':
    if ($CURUSER['warned'] == 'no')
    stderr("Error", "How can we remove a warning that isn't there?go back to your Karma Bonus Point page and think that one over.");
    $bonuscomment = gmdate("Y-m-d") . " - " .$points. " Points for removing warning.\n " .$bonuscomment;
    $res_warning = mysql_query("SELECT modcomment FROM users WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
    $modcomment = htmlspecialchars($arr['modcomment']);
    $modcomment = gmdate("Y-m-d") . " - warning removed by -Bribe with Karma.\n". $modcomment;
    $modcom = sqlesc($modcomment);
    mysql_query("UPDATE users SET warned = 'no', warneduntil = '0000-00-00 00:00:00', seedbonus = '$seedbonus', bonuscomment = '$bonuscomment', modcomment = $modcom WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
    $dt = sqlesc(get_date_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 'smile':
    $smile_until = get_date_time(gmtime() + 28*86400);
    $bonuscomment = gmdate("Y-m-d") . " - " .$points. " Points for 1 month of custom smilies.\n " .$bonuscomment;
    mysql_query("UPDATE users SET smile_until = '$smile_until', seedbonus = '$seedbonus' WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
    header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?smile_success=1");
    die;
    break;
    case 'invite':
    $invites = $CURUSER['invites'];
    $inv = $invites+$arr_points['menge'];
    $bonuscomment = gmdate("Y-m-d") . " - " .$points. " Points for invites.\n " .$bonuscomment;
    mysql_query("UPDATE users SET invites = '$inv', seedbonus = '$seedbonus' WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
    header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?invite_success=1");
    die;
    break;
    case 'title':
    $title = sqlesc(htmlentities($_POST['title']));
    $words = array('fuck', 'shit', 'Moderator', 'Administrator', 'Admin', 'pussy', 'Sysop', 'cunt', 'nigger', 'VIP', 'Super User', 'Power User', 'ADMIN', 'SYSOP', 'MODERATOR', 'ADMINISTRATOR');
    $title = str_replace($words, "I just wasted my karma", $title);
    $bonuscomment = gmdate("Y-m-d") . " - " .$points. " Points for custom title. old title was $CURUSER[title] new title is $title\n " .$bonuscomment;
    mysql_query("UPDATE users SET title = $title, seedbonus = '$seedbonus' WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
    header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?title_success=1");
    die;
    break;
    case 'gift_1':
    $points = 0 + $_POST['bonusgift'];
    $usernamegift = htmlentities(trim($_POST['username']));
    $res = mysql_query("SELECT id,seedbonus,bonuscomment,username FROM users WHERE username=" . sqlesc($usernamegift));
    $arr = mysql_fetch_assoc($res);
    $useridgift = $arr['id'];
    $userseedbonus = $arr['seedbonus'];
    $bonuscomment_gift = $arr['bonuscomment'];
    $usernamegift = $arr['username'];
    $check_me = array(100,200,300,400,500,5000);
    if (!in_array($points, $check_me))
    stderr("Error", "I smell a rat!");
    if($bonus >= $points){
    $points= htmlspecialchars($points,1);
    $bonuscomment = gmdate("Y-m-d") . " - " .$points. " Points as gift to $usernamegift .\n " .$bonuscomment;
    $bonuscomment_gift = gmdate("Y-m-d") . " - recieved " .$points. " Points as gift from $CURUSER[username] .\n " .$bonuscomment_gift;
    $seedbonus = $bonus-$points;
    $giftbonus1 = $userseedbonus+$points;
    if ($userid==$useridgift){
    header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?gift_fail=1");
    die;
}
    if (!$useridgift){
    header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?gift_fail_user=1");
    die;
}
    mysql_query("SELECT bonuscomment,id FROM users WHERE id = '$useridgift'") or sqlerr(__FILE__, __LINE__);
    mysql_query("UPDATE users SET seedbonus = '$seedbonus', bonuscomment = '$bonuscomment' WHERE id = '$userid'") or sqlerr(__FILE__, __LINE__);
    mysql_query("UPDATE users SET seedbonus = '$giftbonus1', bonuscomment = '$bonuscomment_gift' WHERE id = '$useridgift'");
    $subject = sqlesc("Someone Loves you");
    $added = sqlesc(get_date_time());
    $msg = sqlesc("You have been given a gift of $points Karma points by ".$CURUSER['username']);
    mysql_query("INSERT INTO messages (sender, subject, receiver, msg, added) VALUES(0, $subject, $useridgift, $msg, $added)") or sqlerr(__FILE__, __LINE__);
    header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?gift_success=1&gift_amount_points=$points&usernamegift=$usernamegift&gift_id=$useridgift");
    die;
    }else{
    header("Refresh: 0; url={$TBDEV['baseurl']}/mybonus.php?gift_fail_points=1");
    die;
}
    break;
}
}
    $HTMLOUT .=''.''.'';
    $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');
    $otheroption = "
'.'

'.$SITENAME.' Karma Bonus Point system:

'.'Exchange your Karma Bonus Points [ current '.$bonus.' ] for goodies!'.'[ If no buttons appear, you have not earned enough bonus points to trade. ]
DescriptionPointsTrade
Username: to be given: Karma points!
";
    $otheroption_title = "";
    $HTMLOUT .='
';
    switch (true){
    case ($gets['id'] == 5):
    $HTMLOUT .='

'.$gets['bonusname'].'

'.$gets['description'].'Enter the Special Title you would like to have '.$otheroption_title.' click Exchange!
'.$gets['points'].'

'.$gets['bonusname'].'

'.$gets['description'].'Enter the username of the person you would like to send karma to, and select how many points you want to send and click Exchange!'.$otheroption.'
min.'.$gets['points'].'max.5000

'.$gets['bonusname'].'

'.$gets['description'].'
min.'.$gets['points'].'

'.$gets['bonusname'].'

'.$gets['description'].'Enter the ID number of the Torrent: you would like to buy a 1 to 1 ratio on.
min.'.$gets['points'].'

'.$gets['bonusname'].'

'.$gets['description'].'
'.$gets['points'].' more points needed

What the hell are these Karma Bonus points,'.' and how do I get them?

- For every hour that you seed a torrent, you are awarded with 1'.' Karma Bonus Point... If you save up enough of them, you can trade them in for goodies like bonus GB(s) to '.'your upload stats,getting more invites, or doing the real Karma booster... give them to another user!'.'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! '.'

Other things that will get you karma points:

  • uploading a new torrent = 15 points
  • '.'uploading a new subtitle = 10 points
  • comment on torrent = 3 points
  • '.'
  • saying thanks = 2 points
  • making a post = 1 point
  • '.'
  • starting a topic = 1 point
  • voting on poll = 1 point
  • filling a request = 10 points
  • '.'

Some things that will cost you karma points:

    '.'
  • upload credit
  • custom title
  • '.'
  • a 1:1 ratio on a torrent
  • '.'
  • buying off your warning
  • one month custom smilies for the forums and comments
  • '.'
  • getting extra invites
  • giving a gift of karma points to another user
  • '.'
  • asking for a re-seed
  • making a request

But keep in mind that everything that can get'.' you karma can also be lost, ie:if you up a torrent then delete it, you will gain and then lose 10 points, '.'making a post and having it deleted will do the same... and there are other hidden bonus karma points all '.'over the site.Yet another way to help out your ratio!

*please note, staff can give or take away '.'points for breaking the rules, or doing good for the community.

';
    print stdhead($CURUSER['username'] . "'s Karma Bonus Points Page") . $HTMLOUT . stdfoot();
?>

Chez 24th May 2017 22:04

Briliant :lol: exactly what i've said :wallbash: just use isset when you got index errors. You people are unbelievable.

XGODY 26th May 2017 10:42

Thaxted admin for tags would not work for me

Bump: By the way chez it was more then one error line look at it can you see what else it was apart from isset

Napon 30th September 2017 22:02

Ive done a repo so it will be on here soon with all errors fixed so on

dtorrent 1st December 2017 17:22

error
 
https://tor.pingnova.com/members.php?action=reg

Napon 1st December 2017 17:40

This is old download the new repo from new post

Here http://www.bvlist.com/showthread.php?t=11263


All times are GMT +2. The time now is 22:11.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.