View Single Post
  #86  
Old 19th November 2014, 18:33
naotem's Avatar
naotem naotem is offline
Member
 
Join Date: Feb 2009
Brazil
Posts: 11
Default
What's the solution?

Quote:
Originally Posted by Caterpillar View Post
TU Error comes from one file - announce.php - by this cyclopic MySQL query (lines 164-178)


Code:
  ($Query = mysql_query ('
                    SELECT t.id as tid, t.name, t.category, t.size, t.added, t.visible, t.banned, t.free, t.silver, t.doubleupload,
                    u.id as userid, u.enabled, u.uploaded, u.downloaded, u.usergroup, u.birthday, u.ip,
                    g.isbanned, g.candownload, g.canviewviptorrents, g.isvipgroup, g.canfreeleech, g.waitlimit, g.slotlimit,
                    c.vip as isviptorrent
                     FROM torrents t
                    INNER JOIN users u ON (u.passkey = ' . sqlesc ($passkey) . ')
                    INNER JOIN usergroups g ON (u.usergroup = g.gid)
                    LEFT JOIN categories c ON (t.category=c.id)
                    WHERE (t.info_hash = ' . sqlesc ($info_hash) . ' OR t.info_hash = ' . sqlesc (preg_replace ('' . '/ *$/s', '', $info_hash)) . ')
                    LIMIT 1') OR stop ($l['sqlerror'] . ' TU1'));
  if ((((!$Result = mysql_fetch_assoc ($Query) OR !$Tid = $Result['tid']) OR $Result['enabled'] != 'yes') OR !$Result['userid']))
  {
    stop ($l['tuerror']);
  }
Indents and linebreaks retained as is.


Banned Client detection -- OFF
Reply With Quote