Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent)
Reply
  #1  
Old 24th August 2009, 10:29
wMan's Avatar
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default Log full with error messages
Code:
Data base sql error

 Error Executing SQL Query 
Error ID: 1064
Error Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND active = '1' AND warned = '0'' at line 1
still this one found a fix but fix didn't kinda fix it any way if someone knows hove to fix it let me know
Reply With Quote
  #2  
Old 24th August 2009, 15:14
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,063
Default
include/functions.php
replace the bonouse function with this
Code:
function bonouse(){
    global $db, $db_prefix;
                        $bon = "SELECT active, seeding, by_torrent FROM ".$db_prefix."_bonus_points ;";
                        $bonset = $db->sql_query($bon);
                        list ($active, $seeding_point, $by_torrent) = $db->sql_fetchrow($bonset);
                        $db->sql_freeresult($bonset);
                        if($by_torrent == 1)$point_per = true;
                        else
                        $point_per = false;
if($active=='true')
{

//=== Update seeding bonus  
    /******************************************************
    Use ONLY one of the two options below... 
    the first is per torrents seeded, the second will only give the bonus for ONE torrent no matter how many are seeded.
    
    also you will have to play with how much bonus you want to give...
    ie: seedbonus+0.0225 = 0.25 bonus points per hour
        seedbonus+0.125 = 0.5 bonus points per hour
        seedbonus+0.225 = 1 bonus point per hour
    *****************************************************/
    //======use this part to give seeding bonus per torrent    
if($point_per)
{
   $res = $db->sql_query("SELECT DISTINCT uid FROM ".$db_prefix."_peers WHERE seeder = 'yes'");
   if ($db->sql_numrows($res) > 0)
   {
       while ($arr = $db->sql_fetchrow($res))
       {
       $work = $db->sql_query("select count(*) from torrent_peers WHERE seeder ='yes' AND uid = $arr[userid]");
       $row_count = mysql_result($work,0,"count(*)");
       $seedbonus = $seeding_point*$row_count;
       $db->sql_query("UPDATE ".$db_prefix."_users SET seedbonus = seedbonus + '".$seedbonus."' WHERE id = $arr[userid] AND active = '1' AND warned = 'no'") or sqlerr(__FILE__, __LINE__);
       }
   }
}else{   //==use this part to only give seeding bonus for 1 torrent no matter how many are being seeded
   $res = $db->sql_query("SELECT DISTINCT uid FROM ".$db_prefix."_peers WHERE seeder = 'yes'");
   if ($db->sql_numrows($res) > 0)
   {
       while ($arr = $db->sql_fetchrow($res))
       {

       //$bonus2 = 0.250;
       //$useridb = $arr['userid'];
       $db->sql_query("UPDATE ".$db_prefix."_users SET seedbonus = seedbonus + '".$seeding_point."' WHERE id = $arr[uid] AND active = '1' AND warned = 'no'");
       }
   }
   }
}
}
__________________
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
  #3  
Old 24th August 2009, 17:15
wMan's Avatar
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
keeps trashing
my functions.php
[php]<?php
/*
*----------------------------phpMyBitTorrent V 2.0-----------------------------*
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent Management System) ---*
*-------------- Created By Antonio Anzivino (aka DJ Echelon) --------------*
*------------- http://www.p2pmania.it -------------*
*------------ Based on the Bit Torrent Protocol made by Bram Cohen ------------*
*------------- http://www.bittorrent.com -------------*
*------------------------------------------------------------------------------*
*------------------------------------------------------------------------------*
*-- This program is free software; you can redistribute it and/or modify --*
*-- it under the terms of the GNU General Public License as published by --*
*-- the Free Software Foundation; either version 2 of the License, or --*
*-- (at your option) any later version. --*
*-- --*
*-- This program is distributed in the hope that it will be useful, --*
*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*
*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*
*-- GNU General Public License for more details. --*
*-- --*
*-- You should have received a copy of the GNU General Public License --*
*-- along with this program; if not, write to the Free Software --*
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --*
*-- --*
*------------------------------------------------------------------------------*
*------
Reply With Quote
  #4  
Old 25th August 2009, 01:24
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,063
Default
try this one sorry got from wrong file
PHP Code:
function bonouse(){
    global 
$db$db_prefix;
                        
$bon "SELECT active, seeding, by_torrent FROM ".$db_prefix."_bonus_points ;";
                        
$bonset $db->sql_query($bon);
                        list (
$active$seeding_point$by_torrent) = $db->sql_fetchrow($bonset);
                        
$db->sql_freeresult($bonset);
                        if(
$by_torrent == 1)$point_per true;
                        else
                        
$point_per false;
if(
$active=='true')
{

//=== Update seeding bonus  
    /******************************************************
    Use ONLY one of the two options below... 
    the first is per torrents seeded, the second will only give the bonus for ONE torrent no matter how many are seeded.
    
    also you will have to play with how much bonus you want to give...
    ie: seedbonus+0.0225 = 0.25 bonus points per hour
        seedbonus+0.125 = 0.5 bonus points per hour
        seedbonus+0.225 = 1 bonus point per hour
    *****************************************************/
    //======use this part to give seeding bonus per torrent    
if($point_per)
{
   
$res $db->sql_query("SELECT DISTINCT uid FROM ".$db_prefix."_peers WHERE seeder = 'yes'");
   if (
$db->sql_numrows($res) > 0)
   {
       while (
$arr $db->sql_fetchrow($res))
       {
       
$work $db->sql_query("select count(*) from torrent_peers WHERE seeder ='yes' AND uid = $arr[uid]");
       
$row_count mysql_result($work,0,"count(*)");
       
$seedbonus $seeding_point*$row_count;
       
$db->sql_query("UPDATE ".$db_prefix."_users SET seedbonus = seedbonus + '".$seedbonus."' WHERE id = $arr[uid] AND active = '1' AND warned = '0'") or sqlerr(__FILE____LINE__);
       }
   }
}else{   
//==use this part to only give seeding bonus for 1 torrent no matter how many are being seeded
   
$res $db->sql_query("SELECT DISTINCT uid FROM ".$db_prefix."_peers WHERE seeder = 'yes'");
   if (
$db->sql_numrows($res) > 0)
   {
       while (
$arr $db->sql_fetchrow($res))
       {

       
//$bonus2 = 0.250;
       //$useridb = $arr['userid'];
       
$db->sql_query("UPDATE ".$db_prefix."_users SET seedbonus = seedbonus + '".$seeding_point."' WHERE id = $arr[uid] AND active = '1' AND warned = '0'");
       }
   }
   }
}

__________________
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/

Last edited by joeroberts; 25th August 2009 at 01:43.
Reply With Quote
Reply

Tags
error , full , log , messages

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Messages to-from Xam Djburn Template Shares 18 25th October 2009 21:32
I Got Problem Again, Some Error messages Vald0 Torrent Strike 5 17th January 2009 18:55
[Template edit help]User Menu & messages to the right! koolfire Yuna Scatari Edition (YSE) 2 29th June 2008 08:30
Messages kp380lv Yuna Scatari Edition (YSE) 0 20th June 2008 20:59
BitTorrent Client Error Messages Fynnon Community Cafe 0 27th May 2008 03:13



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