Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
Thread Tools
  #1  
Old 28th April 2012, 01:00
gogo999's Avatar
gogo999 gogo999 is offline
Senior Member
 
Join Date: Feb 2012
Korea South
Posts: 140
Default Image damage
Is there a fix over the image to

Click the image to open in full size.
__________________
새로운 트래커를 위한 정보의 포럼
My Trackers : darknesschannel
Reply With Quote
  #2  
Old 28th April 2012, 09:51
x360zone's Avatar
x360zone x360zone is offline
Senior Member
 
Join Date: Jul 2011
United Kingdom
Posts: 915
Default info
right click on where the image is and see where the image should be then add your own
__________________

7.5 tsse
future tracker source & hosting, vps
trackers installs + Themes
http://www.foxyhosting.co.uk
http://www.downmy.top testing zone
offshore vps & cpanel hosting & Shoutcast & VPN
STOP cyberbullying
any setups tracker installs vps hosting vps setups themes mods hit me up
over the last three months ive become a snake breeder,pythons,hogs,boa,corn,rat,king,carpet and what joy it is


Reply With Quote
  #3  
Old 28th April 2012, 15:06
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Quote:
Originally Posted by gogo999 View Post
Is there a fix over the image to

Click the image to open in full size.
What browser you using?? sometimes even if the path is correct Google chrome will show broken image.. I find that the easy way to fix this is to eg.

change something like this

PHP Code:
src=/pic/bottom_right.gif 
to
PHP Code:
src=http://sitename.com/pic/bottom_right.gif 
But check first if the images exists first.
Reply With Quote
  #4  
Old 28th April 2012, 16:25
gogo999's Avatar
gogo999 gogo999 is offline
Senior Member
 
Join Date: Feb 2012
Korea South
Posts: 140
Default
Quote:
Originally Posted by firefly007 View Post
What browser you using?? sometimes even if the path is correct Google chrome will show broken image.. I find that the easy way to fix this is to eg.

change something like this

PHP Code:
src=/pic/bottom_right.gif 
to
PHP Code:
src=http://sitename.com/pic/bottom_right.gif 
But check first if the images exists first.



What do I need to modify the source


Chrome is used
__________________
새로운 트래커를 위한 정보의 포럼
My Trackers : darknesschannel

Last edited by gogo999; 28th April 2012 at 16:42.
Reply With Quote
  #5  
Old 28th April 2012, 16:49
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Quote:
Originally Posted by gogo999 View Post
What do I need to modify the source


Chrome is used
Whats the url to your site so I will have a look.. please give me the direct link to the page where the error/broken image is.
Reply With Quote
  #6  
Old 28th April 2012, 16:59
gogo999's Avatar
gogo999 gogo999 is offline
Senior Member
 
Join Date: Feb 2012
Korea South
Posts: 140
Default
Quote:
Originally Posted by firefly007 View Post
Whats the url to your site so I will have a look.. please give me the direct link to the page where the error/broken image is.

Click the image to open in full size.
Is here

Thank you
__________________
새로운 트래커를 위한 정보의 포럼
My Trackers : darknesschannel
Reply With Quote
  #7  
Old 28th April 2012, 17:27
PAX's Avatar
PAX PAX is offline
Senior Member
 
Join Date: Nov 2010
P2P
Posts: 41
Default
include==>ts_imdb.php

downolad gif


include=> languages=> np. english=> details.lang.php => 'dltorrent'=>'<img src="_image/pobierz.png" alt="" title="" border="0"',//PAX
Attached Files
File Type: php ts_imdb.php (8.7 KB, 7 views)
Reply With Quote
  #8  
Old 28th April 2012, 18:12
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Quote:
Originally Posted by gogo999 View Post
Click the image to open in full size.
Is here

Thank you
Ok you have not done the changes to the source yet you have to do the following..

Look on line 594 in details.php and change it to this and look for an image/icon for you download button and put in pic folder, make sure the correct right are given (755)

Quote:
<td style="padding-left: 5px;" valign="top" width="430"><a href="'.ts_seo($id,$torrent['name'],'d').'" alt="'.$lang->details['dltorrent'].'" title="'.$lang->details['dltorrent'].'"><img src="/pic/download.png"></a></td>
I see you are using localhost if the follow link above does not work change to

Quote:
<td style="padding-left: 5px;" valign="top" width="430"><a href="'.ts_seo($id,$torrent['name'],'d').'" alt="'.$lang->details['dltorrent'].'" title="'.$lang->details['dltorrent'].'"><img src="localhost/pic/download.png"></a></td>
and if that doest work try this, remember to enter your ip where it says your ip :) :)


Quote:
<td style="padding-left: 5px;" valign="top" width="430"><a href="'.ts_seo($id,$torrent['name'],'d').'" alt="'.$lang->details['dltorrent'].'" title="'.$lang->details['dltorrent'].'"><img src="yourip/pic/download.png"></a></td>
You will also need to change this

Quote:
takeedit.php
[code]

find:
PHP Code:
unset ($dict['value'][{'created by'}]);
      unset (
$dict['value'][{'announce-list'}]); 
replace with:
PHP Code:
unset ($dict['value']['created by']);
      unset (
$dict['value']['announce-list']); 
With thx to francisco23 For posting this
__________________



Last edited by firefly007; 28th April 2012 at 18:25.
Reply With Quote
The Following User Says Thank You to firefly007 For This Useful Post:
dandanch (28th April 2012)
  #9  
Old 28th April 2012, 18:42
gogo999's Avatar
gogo999 gogo999 is offline
Senior Member
 
Join Date: Feb 2012
Korea South
Posts: 140
Default
Quote:
Originally Posted by firefly007 View Post
Ok you have not done the changes to the source yet you have to do the following..

Look on line 594 in details.php and change it to this and look for an image/icon for you download button and put in pic folder, make sure the correct right are given (755)


I see you are using localhost if the follow link above does not work change to

and if that doest work try this, remember to enter your ip where it says your ip :) :)


You will also need to change this

.................................................. .................................................. .......


One gets the image of

Still another image was being damaged

Thank you

I'll put a different source


Thank you very much

You are the best


[details.php]

PHP Code:
<?php
/*
************************************************
*==========[TS Special Edition v.5.6]==========*
************************************************
*              Special Thanks To               *
*        DrNet - wWw.SpecialCoders.CoM         *
*          Vinson - wWw.Decode4u.CoM           *
*    MrDecoder - wWw.Fearless-Releases.CoM     *
*           Fynnon - wWw.BvList.CoM            *
*==============================================*
*   Note: Don't Modify Or Delete This Credit   *
*     Next Target: TS Special Edition v5.7     *
*     TS SE WILL BE ALWAYS FREE SOFTWARE !     *
************************************************
*/
require_once('global.php');
require_once(
INC_PATH.'/commenttable.php');
gzip();
dbconn(true);
loggedinorreturn();
maxsysop();
if (!
defined('NcodeImageResizer'))
{
    
define('NcodeImageResizer'true);
}
define('D_VERSION''3.5.5');

if(
$usergroups['candownload'] != 'yes')
{
    
$lang->load('browse');
    
print_no_permission(false,true,sprintf($lang->browse['downloaddisabledmsg'], ''));
}

$id = isset($_GET['id']) ? intval($_GET['id']) : (isset($_POST['id']) ? intval($_POST['id']) : '');
$is_mod is_mod($usergroups);

if (!
is_valid_id($id))
{
    
print_no_permission(true);
}

$tab 'details';
if (isset(
$_GET['tab']) AND $_GET['tab'] != '')
{
    
$tab htmlspecialchars_uni($_GET['tab']);
}

$query sql_query('SELECT t.name, t.allowcomments, t.banned, t.descr, t.category, t.size, t.numfiles, t.anonymous, t.added, t.comments, t.hits, t.times_completed, t.leechers, t.seeders, t.owner, t.free, t.sticky, t.offensive, t.silver, t.t_image, t.t_link, t.isnuked, t.WhyNuked, t.isrequest, t.ts_external, t.doubleupload, t.isScene, n.nfo, c.name as categoryname, c.vip, c.pid, c.type, c.id as categoryid, d.video_info, d.audio_info, u.username, u.donor, u.warned, u.leechwarn, g.namestyle FROM torrents t LEFT JOIN ts_nfo n ON (t.id=n.id) LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN ts_torrents_details d ON (t.id=d.tid) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE t.id = '.sqlesc($id)) or sqlerr(__FILE__,__LINE__);
if (
mysql_num_rows($query) == OR !$query OR !($torrent mysql_fetch_assoc($query)))
{
    
stderr($lang->global['error'], $lang->global['notorrentid']);
}
elseif (
$usergroups['canviewviptorrents'] != 'yes' && $torrent['vip'] == 'yes')
    
stderr($lang->global['error'], $lang->global['viptorrent'], false);
elseif (
$torrent["banned"] == "yes" && !$is_mod)
    
stderr($lang->global['error'], $lang->global['torrentbanned']);
//XXX Torrents Confirm Dialog by Danix
elseif ($torrent["category"] == "34")  
{
    
$alert = ('
                <script type="text/javascript">
                    //<![CDATA[
                    var alert = confirm("'
.$lang->global['xxxtorrent'].'")
                    if (alert)
                    {
                        alert("'
.$lang->global['xxxtorrent'].'")
                    }
                    else
                    {
                        window.location = "'
.$BASEURL.'/";
                    }
                    //]]>
                </script>'
);
    echo 
$alert;
}  


//XXX Torrents free by lafuine
$q mysql_query("SELECT size FROM torrents WHERE id = $id");
    if (
mysql_num_rows($q) > 0)
    {
        
$rf mysql_fetch_array($q);
        
        if (
$rf["size"] >= 18253611008)     /* remplace for auto freeleech 18253611008 octet= 17 go for me. use staff tool calculette ;)*/
        
{
            
mysql_query("UPDATE torrents SET free = 'yes' WHERE id = $id");
        }else{
        if (
$rf["size"] >= 15032385536)   /* remplace for auto silver 15032385536 octet= 14 go for me. use staff tool calculette ;)*/
           
mysql_query("UPDATE torrents SET silver = 'yes' WHERE id = $id");
        }
    }  


$lang->load('details');
$lang->load('upload');
$lang->load('quick_editor');
require_once(
INC_PATH.'/class_tsquickbbcodeeditor.php');
$QuickEditor = new TSQuickBBCodeEditor();
$QuickEditor->ImagePath $BASEURL.'/'.$pic_base_url;
$QuickEditor->SmiliePath $BASEURL.'/'.$pic_base_url.'smilies/';

include(
INC_PATH.'/functions_quick_editor.php');
define('TOTAL_FILES'$torrent['numfiles']);
include(
INC_PATH.'/functions_filelist.php');
require_once(
INC_PATH.'/functions_mkprettytime.php');

if (
$torrent['type'] == 's')
{
    require(
TSDIR.'/'.$cache.'/categories.php');
    foreach (
$_categoriesC as $catarray)
    {
        if (
$catarray['id'] == $torrent['pid'])
        {
            
$parentcategory $catarray['name'];
            
$parentcatid $catarray['id'];
            break;
        }
    }
    if (
$parentcategory && $parentcatid)
    {
        
$seolink ts_seo($parentcatid,$parentcategory,'c');
        
$seolink2 ts_seo($torrent['categoryid'],$torrent['categoryname'],'c');
        
$torrent["categoryname"] = '<a href="'.$seolink.'" target="_self" alt="'.$parentcategory.'" title="'.$parentcategory.'" />'.$parentcategory.'</a> / <a href="'.$seolink2.'" target="_self" alt="'.$torrent['categoryname'].'" title="'.$torrent['categoryname'].'" />'.$torrent['categoryname'].'</a>';
    }
}
else
{
    
$seolink2 ts_seo($torrent['categoryid'],$torrent['categoryname'],'c');
    
$torrent["categoryname"] = '<a href="'.$seolink2.'" target="_self" alt="'.$torrent['categoryname'].'" title="'.$torrent['categoryname'].'" />'.$torrent['categoryname'].'</a>';
}

$isfree = ($torrent['free'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'freedownload.gif" class="inlineimg" />' '');
$issilver = ($torrent['silver'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'silverdownload.gif" class="inlineimg" />' '');
$isdoubleupload = ($torrent['doubleupload'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'x2.gif" class="inlineimg" />' '');

stdhead(sprintf($lang->details['detailsfor'], $torrent['name']), true'supernote','INDETAILS');

$gigs $CURUSER['downloaded'] / (1024*1024*1024);
$ratio = ($CURUSER['downloaded'] > $CURUSER['uploaded'] / $CURUSER['downloaded'] : 0);
$percentage $ratio 100;
if (
$gigs $hitrun_gig AND $ratio <= $hitrun_ratio AND $torrent['owner'] != $CURUSER['id'] AND !$is_mod AND $CURUSER['downloaded'] <> 0)
{
    
$warning_message show_notice(sprintf($lang->details['hitrunwarning'], number_format($ratio2), number_format($percentage3), $hitrun_ratio), true);
}
elseif (
$ratio <= ($hitrun_ratio 0.2) AND $torrent['owner'] != $CURUSER['id'] AND !$is_mod AND $CURUSER['downloaded'] <> 0)
{
    
$warning_message show_notice(sprintf($lang->details['hitrunwarning2'], number_format($ratio2), mksize($percentage), $hitrun_ratio$id), true);
}

if (isset(
$warning_message))
{
    echo 
$warning_message;
}

$sratio $torrent['leechers'] > $torrent['seeders'] / $torrent['leechers'] : 1;
$lratio $torrent['seeders'] > $torrent['leechers'] / $torrent['seeders'] : 1;
$video_info = @explode('~'$torrent['video_info']);
$audio_info = @explode('~'$torrent['audio_info']);

if (
$usergroups['canreport'] == 'yes')
{
    
$lang->load('report');
    
$head $lang->report['report'].' TORRENT';
    
$report '
    '
.($useajax == 'yes' '<script type="text/javascript" src="./scripts/quick_report.js"></script>
    <div id="QuickReportDone" name="QuickReportDone" style="display: none;">'
.$lang->report['done'].'</div>' '').'
    <div id="ShowQuickReport" name="ShowQuickReport" style="display: inline;">
        <form method="post" action="report.php" name="quickreport" id="quickreport">
        <input type="hidden" name="action" value="reporttorrent">
        <input type="hidden" name="do" value="save">
        <input type="hidden" name="siv" value="false">
        <input type="hidden" name="returnto" value="details.php?id='
.$id.'&tab=report&reported=true">
        <input type="hidden" name="reportid" value="'
.$id.'">
        <table border="0" width="100%" cellspacing="0" cellpadding="5">
            <tr>
                <td class="rowhead">'
.$lang->report['reporttype'].'</td>
                <td>'
.$head.'</td>
            </tr>
            <tr>
                <td class="rowhead">'
.$lang->report['reportid'].'</td>
                <td>'
.$id.'</td>
            </tr>
            <tr>
                <td class="rowhead">'
.$lang->report['reason'].'</td>
                <td><textarea name="reason" id="reason" rows="6" cols="90"></textarea><br />
                '
.($useajax == 'yes' '<input type="button" class="button" value="'.$lang->global['buttonreport'].'" name="quickreportbutton" id="quickreportbutton" onclick="javascript:TSajaxquickreport(\''.$id.'\');" />' '<input type="submit" name="submit" value="'.$lang->global['buttonreport'].'" class="button" />').' <img src="'.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" class="inlineimg" border="0" alt="" title="" id="report-loading-layer" style="display:none;" /></td>
            </tr>
        </table>
        </form>
    </div>'
;
}
else
{
    
$report $lang->global['nopermission'];
}
$showcommenttable '';
$count TSRowCount('id''comments''torrent='.$id);
if (!
$count)
{
    
$showcommenttable .= '
    <table class="none" border="0" cellspacing="0" cellpadding="5" width="100%">
        <tr>
            <td>
                <div style="display: block;" id="ajax_comment_preview">'
.$lang->details['nocommentsyet'].'</div>
                <div style="display: block;" id="ajax_comment_preview2"></div>
            </td>
        </tr>
    </table>
    '
;
}
else
{
    list(
$pagertop$pagerbottom$limit) = pager($ts_perpage$count$_SERVER['SCRIPT_NAME'].'?id='.$id.'&tab=comments&', array('lastpagedefault' => '1'), false);
    
$subres sql_query("SELECT c.id, c.torrent as torrentid, c.text, c.user, c.added, c.editedby, c.editedat, c.modnotice, c.modeditid, c.modeditusername, c.modedittime, c.totalvotes, uu.username as editedbyuname, gg.namestyle as editbynamestyle, u.added as registered, u.enabled, u.warned, u.leechwarn, u.username, u.title, u.usergroup, u.last_access, u.options, u.donor, u.uploaded, u.downloaded, u.avatar as useravatar, u.signature, g.title as grouptitle, g.namestyle FROM comments c LEFT JOIN users uu ON (c.editedby=uu.id) LEFT JOIN usergroups gg ON (uu.usergroup=gg.gid) LEFT JOIN users u ON (c.user=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE c.torrent = ".sqlesc($id)." ORDER BY c.id $limit") or sqlerr(__FILE____LINE__);

    
$allrows = array();
    while (
$subrow mysql_fetch_assoc($subres))
    {
        
$allrows[] = $subrow;
    }
    
$showcommenttable .= $pagertop.commenttable($allrows,'','',false,true,true).$pagerbottom;
}

$rowspan 9;
$reseed '';
if (
$torrent['seeders'] == && $torrent['ts_external'] == 'no')
{
    
$reseed '
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['askreseed'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.sprintf($lang->details['askreseed2'], $id).'</td>
    </tr>'
;
    
$rowspan++;
}

if (
$torrent['isScene'] > 0)
{
    
$rowspan++;
    
$isScene '
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->upload['scene'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.$lang->global['greenyes'].'</td>
    </tr>
    '
;
    
$rowspan++;
    
$isScene .= '
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['scene3'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.mkprettytime($torrent['isScene']).'</td>
    </tr>
    '
;
}

if (isset(
$_GET['cerror']))
{
    switch (
$_GET['cerror'])
    {
        case 
1:
            
$cerror $lang->global['notorrentid'];
        break;
        case 
2:
            
$cerror $lang->global['dontleavefieldsblank'];
        break;
        case 
3:
            
$cerror sprintf($lang->global['flooderror'], $usergroups['floodlimit'], $lang->comment['floodcomment'], "-");
        break;
        default:
            
$cerror $lang->global['error'];
        break;
    }
}

if (
$usergroups['canpeers'] != 'yes' OR $torrent['ts_external'] == 'yes')
{
    
$peerstable sprintf($lang->details['peers3'], ts_nf($torrent['seeders']), ts_nf($torrent['leechers']), (ts_nf($torrent['seeders'] + $torrent['leechers']))).($torrent['seeders'] == && $torrent['ts_external'] == 'no' '<br />'.sprintf($lang->details['askreseed2'],$id) : '');
}
else
{
    function 
getagent($httpagent=''$peer_id="")
    {
        global 
$lang;
        return (
$httpagent $httpagent : ($peer_id $peer_id $lang->global['unknown']));
    }

    function 
dltable($name$arr$torrent)
    {
        global 
$CURUSER,$pic_base_url$lang,$usergroups,$is_mod$BASEURL;
        
$totalcount count($arr);
        
$p '<b>'.$totalcount.' '.$name.'</b>';
        if (!
count($totalcount))
            return 
$p;
        
$s '<table width="100%" border="0" cellspacing="0" cellpadding="3">
                    <tr>
                        <td colspan="11" class="thead">'
.$p.'</td>
                    </tr>
                    <tr>
                        <td class="subheader">'
.$lang->details['userip'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['conn'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['up'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['urate'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['down'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['drate'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['ratio'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['done'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['since'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['idle'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['client'].'</td>
                </tr>'
;
        
$now TIMENOW;
        include_once(
INC_PATH.'/functions_ratio.php');
        foreach (
$arr as $e)
        {

            if ((
preg_match('#I3#is'$e['options']) OR preg_match('#I4#is'$e['options'])) AND !$is_mod AND $CURUSER['id'] != $e['id'])
            {
                
$s .= '
                <tr>
                    <td align="center">'
.$lang->global['anonymous'].'</td>
                    '
.str_repeat('<td align="center">---</td>'10).'
                </tr>'
;
                continue;
            }

            if (isset(
$num))
            {
                ++
$num;
            }
            else
            {
                
$num 1;
            }

            
$dnsstuff "<br /><a href=\"http://dnsstuff.com/tools/whois.ch?ip=".htmlspecialchars_uni($e["ip"])."\" target=_blank><font class=\"small\" color=\"brown\"><b>".htmlspecialchars_uni($e["ip"])."</b></font></a>:<u><font class=\"small\" color=\"red\"><b>"$e['port'] . "</b></font></u></td>\n";
            
$pregreplace "<br /><font class=\"small\" color=\"brown\"><b>".preg_replace('/\.\d+\.\d+$/'"***"htmlspecialchars_uni($e["ip"])) . "</b></font></a>:<u><font class=\"small\" color=\"red\"><b>". (int)$e['port'] . "</b></font></u></td>\n";
            
$highlight $CURUSER["id"] == $e["id"] ? " bgcolor=#BBAF9B" "";
            
$s .= "<tr$highlight>\n";
            if (!empty(
$e["username"]))
            {

                if (
$is_mod || $torrent['anonymous'] != 'yes' || $e['id'] != $torrent['owner'])
                {
                    
$s .= "<td style=\"white-space: nowrap; text-align: center;\"><a href=\"".ts_seo($e['userid'], $e['username'])."\"><b>".get_user_color($e["username"],$e["namestyle"])."</b></a>" . ($e["donor"] == "yes" "<img src=".$pic_base_url."star.gif title='".$lang->global['imgdonated']."'>" "") . ($e["enabled"] == "no" "<img src=".$pic_base_url."disabled.gif title=\"".$lang->global['imgdisabled']."\" style='margin-left: 2px'>" : ($e["warned"] == "yes" "<a href=\"rules.php#warning\" class=\"altlink\"><img src=\"".$pic_base_url."warned.gif\" title=\"".$lang->global['imgwarned']."\" border=\"0\"></a>" ""));
                    
$s .= ($is_mod $dnsstuff $pregreplace);
                }
                else
                    
$s .= "<td>".$lang->global['anonymous']."</a></td>\n";
            }
            else
                
$s .= "<td>".$lang->global['unknown']."</td>\n";

            
$secs max(1, ($now $e["st"]) - ($now $e["la"]));
            
$s .= "<td align=\"center\">" . ($e['connectable'] == "yes" "<font color=green>".$lang->details['yes']."</font>" "<font color=red>".$lang->details['no']."</font>") . "</td>\n";
            
$s .= "<td align=\"right\">" mksize($e["uploaded"]) . "</td>\n";
            
$s .= "<td align=\"right\"><span style=\"white-space: nowrap;\">" mksize(($e["uploaded"] - $e["uploadoffset"]) / $secs) . "/s</span></td>\n";
            
$s .= "<td align=\"right\">" mksize($e["downloaded"]) . "</td>\n";
            if (
$e["seeder"] == "no")
                
$s .= "<td align=\"right\"><span style=\"white-space: nowrap;\">" mksize(($e["downloaded"] - $e["downloadoffset"]) / $secs) . "/s</span></td>\n";
            else
                
$s .= "<td align=\"right\"><span style=\"white-space: nowrap;\">" mksize(($e["downloaded"] - $e["downloadoffset"]) / max(1$e["finishedat"] - $e['st'])) .    "/s</span></td>\n";
            if (
$e["downloaded"])
            {
              
$ratio floor(($e["uploaded"] / $e["downloaded"]) * 1000) / 1000;
                
$s .= "<td align=\"right\"><font color=" get_ratio_color($ratio) . ">" number_format($ratio2) . "</font></td>\n";
            }
               else
              if (
$e["uploaded"])
                
$s .= "<td align=\"right\">".$lang->details['inf']."</td>\n";
              else
                
$s .= "<td align=right>---</td>\n";
            
$s .= "<td align=\"right\">" sprintf("%.2f%%"100 * (- ($e["to_go"] / $torrent["size"]))) . "</td>\n";
            
$s .= "<td align=\"right\">" mkprettytime($now $e["st"]) . "</td>\n";
            
$s .= "<td align=\"right\">" mkprettytime($now $e["la"]) . "</td>\n";
            
$s .= "<td align=\"left\">" htmlspecialchars_uni(getagent($e["agent"], $e["peer_id"])) . "</td>\n";
            
$s .= "</tr>\n";
        }
        
$s .= "</table>\n";
        return 
$s;
    }
    
$downloaders = array();
    
$seeders = array();
    
$subres sql_query("SELECT p.seeder, p.finishedat, p.downloadoffset, p.uploadoffset, p.ip, p.port, p.uploaded, p.downloaded, p.to_go, UNIX_TIMESTAMP(p.started) AS st, p.connectable, p.agent, p.peer_id, UNIX_TIMESTAMP(p.last_action) AS la, p.userid,  u.id, u.enabled, u.username, u.options, u.warned, u.donor, g.namestyle FROM peers p LEFT JOIN users u ON (p.userid=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE p.torrent = ".sqlesc($id)) or sqlerr(__FILE__,__LINE__);
    while (
$subrow mysql_fetch_array($subres))
    {
        if (
$subrow["seeder"] == "yes")
            
$seeders[] = $subrow;
        else
            
$downloaders[] = $subrow;
    }

    function 
leech_sort($a,$b)
    {
        if ( isset( 
$_GET["usort"] ) ) return seed_sort($a,$b);
        
$x $a["to_go"];
        
$y $b["to_go"];
        if (
$x == $y)
            return 
0;
        if (
$x $y)
            return -
1;
        return 
1;
    }
    function 
seed_sort($a,$b)
    {
        
$x $a["uploaded"];
        
$y $b["uploaded"];
        if (
$x == $y)
            return 
0;
        if (
$x $y)
            return 
1;
        return -
1;
    }

    
usort($seeders"seed_sort");
    
usort($downloaders"leech_sort");

    
$peerstable dltable($lang->details['seeders2'], $seeders$torrent);
    
$peerstable .= '<br />'.dltable($lang->details['leechers2'], $downloaders$torrent);
}

$QuickEditor->FormName='comment';
$QuickEditor->TextAreaName='message';
$showcommenttable .= '
<br />
<!-- start: BBcode Styles -->
'
.$QuickEditor->GenerateCSS().'
'
.$QuickEditor->GenerateJavascript().'
<!-- start: BBcode Styles -->
'
.(!empty($cerror) ? '<div class="error">'.$cerror.'</div>' '').'
'
.($useajax == 'yes' '<script type="text/javascript" src="'.$BASEURL.'/scripts/quick_comment.js"></script>' '').'
<script type="text/javascript" src="'
.$BASEURL.'/scripts/quick_preview.js"></script>
<form name="comment" id="comment" method="post" action="comment.php?action=add&tid='
.$id.'">
<input type="hidden" name="ctype" value="quickcomment">
<input type="hidden" name="page" value="'
.intval(isset($_GET['page']) ? $_GET['page'] : 0).'">
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr>
            <td class="thead">'
.ts_collapse('quickcomment').'<a name="startquickcomment">'.$lang->details['quickcomment'].'</a></td>
        </tr>
        '
.ts_collapse('quickcomment'2).'
        <tr>
            <td>
                '
.$QuickEditor->GenerateBBCode().'
            </td>
        </tr>
        <tr>
            <td align="center"><textarea name="message" style="width:850px;height:120px;" id="message"></textarea></td>
        </tr>
        <tr>
            <td align="center">
            '
.($useajax == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" class="inlineimg" border="0" alt="" title="" id="loading-layer" style="display:none;" /> <input type="button" class="button" value="'.$lang->global['buttonsubmit'].'" name="quickcomment" id="quickcomment" onclick="javascript:TSajaxquickcomment(\''.$id.'\');" />' '<input type="submit" name="submit" value="'.$lang->global['buttonsubmit'].'" class="button" />').'
            <input type="button" class="button" name="button" value="'
.$lang->global['buttonpreview'].'" onclick="javascript:TSajaxquickpreview();" /> <input type="button" value="'.$lang->global['advancedbutton'].'" class="button" onclick="jumpto(\''.$BASEURL.'/comment.php?action=add&tid='.$id.'\')" />
            </td>
        </tr>
    </table>
</form>'
;

if (
$usergroups['canbookmark'] == 'yes')
{
    
$onclick1 $onclick2 '';
    if (
$useajax == 'yes')
    {
        
$onclick1 ' onclick="TSajaxquickbookmark('.$id.',\'add\'); return false;"';
        
$onclick2 ' onclick="TSajaxquickbookmark('.$id.',\'delete\'); return false;"';
    }
    
$bookmark '
    '
.($useajax == 'yes' '
    <script type="text/javascript" src="./scripts/quick_bookmark.js"></script>' 
'').'
    <p>
    <span id="bookmark-loading-layer" style="display:none; float: left;"><img src="'
.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" border="0" alt="" title="" class="inlineimg"></span>
    <span id="bookmark-done-layer" style="display:none; float: left;"><img src="'
.$BASEURL.'/'.$pic_base_url.'input_true.gif" border="0" alt="" title="" class="inlineimg"></span>
    <a href="'
.$BASEURL.'/bookmarks.php?action=add&torrentid='.$id.'"'.$onclick1.'>'.$lang->details['bookmark'].'</a> - <a href="'.$BASEURL.'/bookmarks.php?action=delete&torrentid='.$id.'"'.$onclick2.'>'.$lang->details['removebookmark'].'</a>
    </p>'
;
}
else
{
    
$bookmark $lang->global['nopermission'];
}

if(
$torrent['anonymous'] == 'yes' AND $torrent['owner'] != $CURUSER['id'] AND !$is_mod)
{
        
$username $lang->global['anonymous'];
}
else
{
    
$username '<a href="'.ts_seo($torrent['owner'], $torrent['username']).'">'.get_user_color($torrent['username'], $torrent['namestyle']).'</a>'.($torrent['donor'] == 'yes' ' <img src="'.$BASEURL.'/'.$pic_base_url.'star.gif" alt="'.$lang->global['imgdonated'].'" title="'.$lang->global['imgdonated'].'">' '').($torrent['warned'] == 'yes' || $torrent['leechwarn'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'warned.gif" alt="'.$lang->global['imgwarned'].'" title="'.$lang->global['imgwarned'].'">' '');
}

if (
$ratingsystem == 'yes' AND $usergroups['canrate'] == 'yes')
{
    require(
'ratings/includes/rating_functions.php');
    
$rating show_rating($id$CURUSER['id']);
}

if (
$thankssystem == 'yes')
{
    
$AllThanks '
    <script type="text/javascript" src="'
.$BASEURL.'/scripts/quick_thanks.js?v='.O_SCRIPT_VERSION.'"></script>
    <img src="'
.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" class="inlineimg" border="0" alt="" title="" id="thanks-loading-layer" style="display:none; float: left;" />
    '
;
    
$IsThanked=false;
    
$ThanksArray=array();
    
$Tquery sql_query('SELECT t.uid, u.username, g.namestyle FROM ts_thanks t LEFT JOIN users u ON (u.id=t.uid) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE t.tid = \''.$id.'\' ORDER BY u.username');
    if (
mysql_num_rows($Tquery) > 0)
    {
        while(
$thanks=mysql_fetch_assoc($Tquery))
        {
            if (
$thanks['uid'] == $CURUSER['id'])
            {
                
$IsThanked=true;
            }
            
$ThanksArray[] = '<a href="'.ts_seo($thanks['uid'], $thanks['username']).'">'.get_user_color($thanks['username'], $thanks['namestyle']).'</a>';
        }
    }

    
$TButton '';
    if (!
$IsThanked AND $torrent['owner'] != $CURUSER['id'])
    {
        
$TButton '<div id="thanks_button"><input type="button" value="'.$lang->global['buttonthanks'].'" onclick="javascript:TSajaxquickthanks('.$id.');" /></div>';
    }
    elseif (
$IsThanked)
    {
        
$TButton '<div id="thanks_button"><input type="button" value="'.$lang->global['buttonthanks2'].'" onclick="javascript:TSajaxquickthanks('.$id.', true);" /></div>';
    }

if (
count($ThanksArray) == 0)
    {
        
$AllThanks $AllThanks.$TButton.'<div id="torrent_thanks" name="torrent_thanks"><b><i>'.$lang->details['nothanksyet'].'</i></b></div>';
    }
    else
    {
        
$AllThanks $AllThanks.$TButton.'<div id="torrent_thanks" name="torrent_thanks">'.implode(', '$ThanksArray).'</div>';
    }
}
////////////// torrent similair /////////////////////
        
$searchname substr($torrent['name'], 08);
        
$query1 str_replace(" ",".",sqlesc("%".$searchname."%"));
        
$query2 str_replace("."," ",sqlesc("%".$searchname."%"));
           
$r mysql_query("SELECT id, name, size, added, seeders, leechers, category FROM torrents WHERE name LIKE {$query1} AND seeders > '0' AND id <> '$id' OR name LIKE {$query2} AND seeders > '0' AND id <> '$id' ORDER BY seeders DESC LIMIT 10") or sqlerr();
            if (
mysql_num_rows($r) > 0)
   {
   
$torrents "\n" .
   
"<td class=subheader align=center>".$lang->details['type']."</td><td class=subheader>".$lang->details['Nom']."</td><td class=subheader align=center>".$lang->details['size']."</td><td class=subheader align=center>".$lang->details['added']."</td><td class=subheader align=center>Seeders</td><td class=subheader align=center>Leechers</td>\n";
   while (
$a mysql_fetch_assoc($r))
   {
   
$r2 mysql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE____LINE__);
    
$a2 mysql_fetch_assoc($r2);
    
$cat "<img src=\"/pic/$a2[image]\" alt=\"$a2[name]\">";

   
$name $a["name"];
   
$torrents .= "<tr><td width=10% align=center><img src=\"/pic/categories/" .$a2["image"]. "\"></td><td class=hoptobutton><a href=details.php?id=" $a["id"] . "&hit=1><b>" htmlspecialchars($name) . "</b></a></td><td class=hoptobutton style='padding: 1px' align=center>"mksize($a[size]) ."</td><td class=hoptobutton style='padding: 1px' align=center>$a[added]</td><td class=hoptobutton style='padding: 1px' align=center>$a[seeders]</td><td class=hoptobutton style='padding: 1px' align=center>$a[leechers]</td></tr>\n";
   }
   
$torrents .= "</table>";
   
$similair1 =("<table width=100% class=main border=1 cellspacing=0 cellpadding=5><td class=thead>".$lang->details['similaire']."</td></table><table width=100% class=main border=1 cellspacing=0 cellpadding=5><tr align=left>$torrents</tr>\n");
   
   }
////////////// Torrent similair /////////////////////  

$ShowTLINK '';
if (!empty(
$torrent['t_link']))
{
    require_once(
INC_PATH.'/functions_imdb_rating.php');
    if (
$IMDBRating TSSEGetIMDBRatingImage($torrent['t_link']))
    {
        
$torrent['t_link'] = str_replace('<b>User Rating:</b>''<b>User Rating:</b> '.$IMDBRating['image'], $torrent['t_link']);
    }
    else
    {
        
$torrent['t_link'] = format_urls(str_replace('"''&quot;'$torrent['t_link']), '_blank');
    }
    
$ShowTLINK '
    <table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr>
            <td class="thead">
                '
.($is_mod '
                <span style="float: right;"><div id="imdbupdatebutton" name="imdbupdatebutton"><a href="#" onclick="TS_IMDB(\''
.$id.'\'); return false;"><b><u><i>'.$lang->global['refresh'].'</i></u></b></a></div></span>' '').$lang->details['t_link'].'
            </td>
        </tr>
        <tr>
            <td>
                <div id="imdbdetails" name="imdbdetails">'
.$torrent['t_link'].'</div>
            </td>
        </tr>
    </table>
    <br />'
;
}

$details '
<table cellspacing="0" border="0" cellpadding="4" width="100%">
    <tr>
        <td colspan="3" class="thead">'
.$isfree.$issilver.$isdoubleupload.' '.htmlspecialchars_uni($torrent['name']).'</td>
    </tr>
    <tr>
        <td rowspan="'
.$rowspan.'" align="center" valign="top" width="175">'.($torrent['t_image'] != '' '<a href="#" onclick="javascript:popImage(\''.$torrent['t_image'].'\',\'Image Preview\')"><img src="'.htmlspecialchars_uni($torrent['t_image']).'" class="glossy" border="0" width="175" height="175">' '<img src="'.$BASEURL.'/'.$pic_base_url.'nopreview.gif" class="glossy" border="0">').'</a>'.($ratingsystem == 'yes' '<br /><br />'.$rating '').'</td>  
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['download'].'</td>
        <td style="padding-left: 5px;" valign="top" width="430"><a href="'
.ts_seo($id,$torrent['name'],'d').'" alt="'.$lang->details['dltorrent'].'" title="'.$lang->details['dltorrent'].'"><img src="/pic/download.png"></a></td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['added'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.my_datee($dateformat$torrent['added']).' '.my_datee($timeformat$torrent['added']).'</td>
    </tr>
    <tr>

        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['type'].'</td>

        <td valign="top" style="padding-left: 5px;">'
.$torrent['categoryname'].'</td>

    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['size'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.mksize($torrent['size']).' '.sprintf($lang->details['numfiles2'], ts_nf($torrent['numfiles'])).'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['hits'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.ts_nf($torrent['hits']).'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['snatched'].'</td>
        <td valign="top" style="padding-left: 5px;"><a href="'
.$BASEURL.'/viewsnatches.php?id='.$id.'">'.ts_nf($torrent['times_completed']).'</a> '.$lang->details['snatched2'].'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['uppedby'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.$username.'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['comments'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.ts_nf($torrent['comments']).' '.$lang->details['comments'].'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['peersb'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.sprintf($lang->details['peers2'], '<font color="'.get_slr_color($sratio).'">'.ts_nf($torrent['seeders']).'</font>''<font color="'.get_slr_color($lratio).'">'.ts_nf($torrent['leechers']).'</font>'ts_nf($torrent['seeders']+$torrent['leechers'])).'</td>
    </tr>
    '
.(isset($reseed) ? $reseed '').(isset($isScene) ? $isScene '').'
    <tr>
        <td align="center" valign="top" width="175">
            <table cellpadding="2" cellspacing="0" width="100%" align="center">
                <tr>
                    <td colspan="2" class="subheader">'
.$lang->upload['video'].'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['codec'].'</td><td>'.($video_info[0] ? htmlspecialchars_uni($video_info[0]) : $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['bitrate'].'</td><td>'.($video_info[1] ? htmlspecialchars_uni($video_info[1]).' kbps' $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['resulation'].'</td><td>'.($video_info[2] ? htmlspecialchars_uni($video_info[2]) : $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['length'].'</td><td>'.($video_info[3] ? htmlspecialchars_uni($video_info[3]).' '.$lang->global['minutes'] : $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['quality'].'</td><td>'.($video_info[4] ? htmlspecialchars_uni($video_info[4]).'/10' $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td colspan="2" class="subheader">'
.$lang->upload['audio'].'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['codec'].'</td><td>'.($audio_info[0] ? htmlspecialchars_uni($audio_info[0]) : $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['bitrate'].'</td><td>'.($audio_info[1] ? htmlspecialchars_uni($audio_info[1]).' kbps' $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['frequency'].'</td><td>'.($audio_info[2] ? htmlspecialchars_uni($audio_info[2]).' HZ' $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['language'].'</td><td>'.($audio_info[3] ? htmlspecialchars_uni($audio_info[3]) : $lang->details['na']).'</td>
                </tr>
            </table>
        </td>
        <td colspan="2" valign="top">
            '
.($thankssystem == 'yes' '
            <table width="100%" border="0" cellpadding="5" cellspacing="0">
                <tr>
                    <td class="thead">'
.$lang->details['thanksby'].'</td>
                </tr>
                <tr>
                    <td>
                        <div style="overflow: auto; height: 200px;">'
.$AllThanks.'</div>
                    </td>
                </tr>
            </table>' 
'').'
        </td>
    </tr>
    </table>
    <br />
    '
.$ShowTLINK.'
    <table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr>
            <td class="thead">'
.sprintf($lang->details['detailsfor'], $torrent['name']).'</td>
        </tr>
        <tr>
            <td>
                '
.format_comment($torrent['descr']).'
            </td>
        </tr>
    </table>
    <br />
    '
.$similair1.'
    <br />  
'
;

echo 
'
<link rel="stylesheet" type="text/css" href="'
.$BASEURL.'/scripts/yui/tabview/assets/skins/sam/tabview.css" />
<script type="text/javascript" src="'
.$BASEURL.'/scripts/yui/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/yui/element/element-beta-min.js"></script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/yui/tabview/tabview-min.js"></script>'.($is_mod '
<script type="text/javascript">
    l_updated = "'
.$lang->global['imgupdated'].'";
    l_refresh = "'
.$lang->global['refresh'].'";
</script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/quick_imdb.js"></script>' '');

$show_manage '';
if (
$CURUSER['id'] === $torrent['owner'] OR $is_mod)
{
    
$show_manage .= '<a href="'.$BASEURL.'/edit.php?id='.$id.'"  onmouseout="window.status=\'\'; return true;" onMouseOver="window.status=\''.$lang->details['editorrent'].'\'; return true;">'.$lang->details['editorrent'].'</a> - ';
}
if (
$is_mod)
{
    
$show_manage .= '<a href="'.$BASEURL.'/admin/index.php?act=fastdelete&amp;id='.$id.'" onmouseout="window.status=\'\'; return true;" onMouseOver="window.status=\'\'; return true;">Delete Torrent</a> -
    <a href="'
.$BASEURL.'/comment.php?tid='.$id.'&action='.($torrent['allowcomments'] != 'yes' 'open' 'close').'"  onmouseout="window.status=\'\'; return true;" onMouseOver="window.status=\''.($torrent['allowcomments'] == 'no' $lang->details['open'] : $lang->details['close']).'\'; return true;">'.($torrent['allowcomments'] != 'yes' $lang->details['open'] : $lang->details['close']).'</a> -
    <a href="'
.$BASEURL.'/admin/index.php?act=torrent_info&id='.$id.'" onmouseout="window.status=\'\'; return true;" onMouseOver="window.status=\'\'; return true;">Torrent Info</a>';
}

$show_nfo '';
if (!empty(
$torrent['nfo']))
{
    
$show_nfo .= '<img src="'.$BASEURL.'/viewnfo.php?id='.$id.'" border="0" alt="'.$torrent['name'].'" title="'.$torrent['name'].'" />';
}

echo 
'
<div class="yui-skin-sam">
    <div id="details" class="yui-navset">
        <ul class="yui-nav">
            <li'
.($tab == 'details' ' class="selected"' '').'><a href="#details"><em>'.$lang->details['torrentinfo'].'</em></a></li>
            <li'
.($tab == 'comments' ' class="selected"' '').'><a href="#comments"><em>'.$lang->details['comments'].'</em></a></li>
            <li'
.($tab == 'filelist' ' class="selected"' '').'><a href="#filelist"><em>'.$lang->details['numfiles3'].'</em></a></li>
            <li'
.($tab == 'peers' ' class="selected"' '').'><a href="#peers"><em>'.$lang->details['peersb'].'</em></a></li>
            <li'
.($tab == 'report' ' class="selected"' '').'><a href="#report"><em>'.$lang->details['report'].'</em></a></li>
            <li'
.($tab == 'bookmark' ' class="selected"' '').'><a href="#bookmark"><em>'.$lang->details['bookmark'].'</em></a></li>
            '
.($show_nfo != '' '<li'.($tab == 'nfo' ' class="selected"' '').'><a href="#nfo"><em>NFO</em></a></li>' '').'
            '
.($show_manage != '' '<li'.($tab == 'manage' ' class="selected"' '').'><a href="#manage"><em>Manage Torrent</em></a></li>' '').'
        </ul>
        <div class="yui-content">
            <div id="details">'
.$details.'</div>
            <div id="comments">'
.$showcommenttable.'</div>
            <div id="filelist">'
.$s.'</div>
            <div id="peers">'
.$peerstable.'</div>
            <div id="report">'
.$report.'</div>
            <div id="bookmark">'
.$bookmark.'</div>
            '
.($show_nfo != '' '<div id="nfo">'.$show_nfo.'</div>' '').'
            '
.($show_manage != '' '<div id="manage">'.$show_manage.'</div>' '').'
        </div>
    </div>
    <script type="text/javascript">
    (function() {
        var tabView = new YAHOO.widget.TabView("details");
    })();
    </script>
</div>'
;
function 
get_slr_color($ratio)
{
    if (
$ratio 0.025) return "#ff0000";
    if (
$ratio 0.05) return "#ee0000";
    if (
$ratio 0.075) return "#dd0000";
    if (
$ratio 0.1) return "#cc0000";
    if (
$ratio 0.125) return "#bb0000";
    if (
$ratio 0.15) return "#aa0000";
    if (
$ratio 0.175) return "#990000";
    if (
$ratio 0.2) return "#880000";
    if (
$ratio 0.225) return "#770000";
    if (
$ratio 0.25) return "#660000";
    if (
$ratio 0.275) return "#550000";
    if (
$ratio 0.3) return "#440000";
    if (
$ratio 0.325) return "#330000";
    if (
$ratio 0.35) return "#220000";
    if (
$ratio 0.375) return "#110000";
    return 
"#000000";
}
stdfoot();
?>

[takeedit.php]

PHP Code:
<?
/***********************************************/
/*=========[TS Special Edition v.5.6]==========*/
/*=============[Special Thanks To]=============*/
/*        DrNet - wWw.SpecialCoders.CoM        */
/*          Vinson - wWw.Decode4u.CoM          */
/*    MrDecoder - wWw.Fearless-Releases.CoM    */
/*           Fynnon - wWw.BvList.CoM           */
/***********************************************/


  
function validfilename ($name)
  {
    return 
preg_match ('/^[^\\0-\\x1f:\\\\\\/?*\\xff#<>|]+$/si'$name);
  }

  function 
isscene ($name$type 1)
  {
    if (
50 <= strlen ($name))
    {
      
$name substr ($name050);
    }

    
$pre['regexp'] = '|<td>(.*)<td>(.*)<td>(.*)</table>|';
    
$pre['url'] = 'http://doopes.com/?cat=454647&lang=0&num=2&mode=0&from=&to=&exc=&inc=' $name '&opt=0';
    
$pre['file'] = @file_get_contents ($pre['url']);
    
$pre['file'] = @str_replace (array ('\\r''\\n'), ''$pre['file']);
    @
preg_match ($pre['regexp'], $pre['file'], $pre['matches']);
    return 
$pre['matches'][$type];
  }

  function 
dict_check ($d$s)
  {
    global 
$lang;
    if (
$d['type'] != 'dictionary')
    {
      
stderr ($lang->global['error'], $lang->upload['dicterror1']);
    }

    
$a explode (':'$s);
    
$dd $d['value'];
    
$ret = array ();
    foreach (
$a as $k)
    {
      unset (
$t);
      if (
preg_match ('/^(.*)\\((.*)\\)$/'$k$m))
      {
        
$k $m[1];
        
$t $m[2];
      }

      if (!isset (
$dd[$k]))
      {
        
stderr ($lang->global['error'], $lang->upload['dicterror2']);
      }

      if (isset (
$t))
      {
        if (
$dd[$k]['type'] != $t)
        {
          
stderr ($lang->global['error'], $lang->upload['dicterror3']);
        }

        
$ret[] = $dd[$k]['value'];
        continue;
      }
      else
      {
        
$ret[] = $dd[$k];
        continue;
      }
    }

    return 
$ret;
  }

  function 
dict_get ($d$k$t)
  {
    global 
$lang;
    if (
$d['type'] != 'dictionary')
    {
      
stderr ($lang->global['error'], $lang->upload['dicterror1']);
    }

    
$dd $d['value'];
    if (!isset (
$dd[$k]))
    {
      return 
null;
    }

    
$v $dd[$k];
    if (
$v['type'] != $t)
    {
      
stderr ($lang->global['error'], $lang->upload['dicterror4']);
    }

    return 
$v['value'];
  }

  function 
unesc ($x)
  {
    if (
get_magic_quotes_gpc ())
    {
      return 
stripslashes ($x);
    }

    return 
$x;
  }

  require_once 
'global.php';
  
gzip ();
  
dbconn ();
  
loggedinorreturn ();
  
maxsysop ();
  
define ('TE_VERSION''1.6 ');
  
define ('TU_VERSION'true);
  
$lang->load ('edit');
  
$is_mod is_mod ($usergroups);
  
$updateset = array ();
  require 
INC_PATH '/functions_getvar.php';
  
getvar (array ('id''subject''message''type'));
  
$id = (int)$id;
  
int_check ($idtrue);
  if (((((empty (
$subject) OR empty ($message)) OR empty ($type)) AND !isset ($_GET['remove_image'])) AND !isset ($_GET['remove_link'])))
  {
    
stderr ($lang->global['error'], $lang->global['dontleavefieldsblank']);
  }

  
$res sql_query ('SELECT owner, filename, t_image, t_link, added, ts_external FROM torrents WHERE id = ' sqlesc ($id));
  
$row mysql_fetch_assoc ($res);
  if (!
$row)
  {
    
stderr ($lang->global['error'], $lang->global['notorrentid']);
  }

  if ((
$CURUSER['id'] != $row['owner'] AND !$is_mod))
  {
    
print_no_permission (true);
  }

  if ((
$_POST['scene'] == 'yes' AND $_contents isscene (trim ($subject))))
  {
    
$pretime strtotime ($row['added']) - strtotime ($_contents);
    
$updateset[] = '' 'isScene = \'' $pretime '\'';
  }
  else
  {
    
$updateset[] = 'isScene = \'0\'';
  }

  if (isset (
$_GET['remove_image']))
  {
    
$image str_replace ('' $BASEURL '/''./'$row['t_image']);
    if (
file_exists ($image))
    {
      
unlink ($image);
    }

    
sql_query ('UPDATE torrents SET t_image = \'\' WHERE id = ' sqlesc ($id));
    
redirect ('edit.php?id=' $id);
    exit ();
  }
  else
  {
    if (isset (
$_GET['remove_link']))
    {
      
sql_query ('UPDATE torrents SET t_link = \'\' WHERE id = ' sqlesc ($id));
      
redirect ('edit.php?id=' $id);
      exit ();
    }
  }

  
$fname = (((((!empty ($_POST['filename']) AND $_POST['filename'] != $row['filename']) AND get_extension ($_POST['filename']) == 'torrent') AND validfilename ($_POST['filename'])) AND $is_mod) ? trim ($_POST['filename']) : $row['filename']);
  
$fname preg_replace ('#\\s+#''_'$fname);
  
preg_match ('/^(.+)\\.torrent$/si'$fname$matches);
  
$shortfname $matches[1];
  
$nfoaction $_POST['nfoaction'];
  if (
$nfoaction == 'update')
  {
    
$nfofile $_FILES['nfo'];
    if (!
$nfofile)
    {
      
print_no_permission ();
    }

    if (
65535 $nfofile['size'])
    {
      
stderr ($lang->global['error'], $lang->edit['nfotoobig']);
    }

    
$nfofilename $nfofile['tmp_name'];
    if ((@
is_uploaded_file ($nfofilename) AND < @filesize ($nfofilename)))
    {
      (
sql_query ('' 'REPLACE INTO ts_nfo (id, nfo) VALUES (\'' $id '\', ' sqlesc (str_replace ('\\x0d\\x0d\\x0a''\\x0d\\x0a'file_get_contents ($nfofilename))) . ')') OR sqlerr (__FILE__92));
    }
  }
  else
  {
    if (
$nfoaction == 'remove')
    {
      
sql_query ('' 'DELETE FROM ts_nfo WHERE id = \'' $id '\'');
    }
  }

  if (((!empty (
$_FILES['t_image_file']) OR !empty ($_POST['t_image_url'])) OR !empty ($_POST['t_link'])))
  {
    
$lang->load ('upload');
    include_once 
INC_PATH '/class_upload.php';
    
$upload = new ts_upload ();
    if (((!empty (
$_POST['t_image_url']) AND $_POST['t_image_url'] != $lang->upload['field23']) AND $_POST['t_image_url'] != $row['t_image']))
    {
      
$t_image fix_url ($_POST['t_image_url']);
      
$upload->url $t_image;
      
$upload->file_type 'image';
      
$upload->allowed_ext = array ('gif''jpg''png');
      
$upload->check_url ();
      
$updateset[] = 't_image = ' sqlesc ($t_image);
    }
    else
    {
      if ((((!empty (
$_FILES['t_image_file']) AND $_FILES['t_image_file'] != $row['t_image']) AND !empty ($_FILES['t_image_file']['name'])) AND !empty ($_FILES['t_image_file']['tmp_name'])))
      {
        include_once 
INC_PATH '/class_upload2.php';
        
$handle = new Upload ($_FILES['t_image_file']);
        
$handle->allowed = array ('image/gif''image/jpg''image/jpeg''image/png');
        
$allowed implode (','$handle->allowed);
        
$allowed str_replace ('image/'''$allowed);
        
$handle->file_new_name_body $id;
        
$handle->image_text $SITENAME;
        
$handle->image_text_direction 'v';
        
$handle->image_text_background '#000000';
        
$handle->image_text_font 1;
        
$handle->image_text_position 'BL';
        
$handle->image_text_padding_x 2;
        
$handle->image_text_padding_y 8;
        
$handle->Process (TSDIR '/' $torrent_dir '/images/');
        if (
$handle->processed)
        {
          
$t_image $BASEURL '/' $torrent_dir '/images/' $handle->file_dst_name;
          
$updateset[] = 't_image = ' sqlesc ($t_image);
        }
        else
        {
          
stderr ($lang->global['error'], sprintf ($lang->upload['invalid_image'], $allowed));
        }

        
$handle->Clean ();
      }
    }

    if ((!empty (
$_POST['t_link']) AND $_POST['t_link'] != $row['t_link']))
    {
      
$t_link fix_url ($_POST['t_link']);
      if (
substr ($t_link11) != '/')
      {
        
$t_link '' $t_link '/';
      }

      
$upload->url $t_link;
      
$upload->valid_link = array ('http://www.imdb.com/title/');
      
$upload->file_type 'imdb';
      
$upload->check_url ();
      if (
strstr ($t_link'imdb'))
      {
        include_once 
INC_PATH '/ts_imdb.php';
      }

      
$updateset[] = 't_link = ' sqlesc ($t_link);
    }
  }

  if ((isset (
$_FILES['file']) AND !empty ($_FILES['file']['name'])))
  {
    @
set_time_limit (300);
    @
ini_set ('upload_max_filesize', (1000 $max_torrent_size $max_torrent_size 10485760));
    @
ini_set ('memory_limit''20000M');
    @
ignore_user_abort (1);
    require_once 
INC_PATH '/benc.php';
    
$lang->load ('upload');
    
$f $_FILES['file'];
    
$f preg_replace ('#\\s+#''_'$f);
    
$fname unesc ($f['name']);
    if (empty (
$fname))
    {
      
stderr ($lang->global['error'], $lang->global['dontleavefieldsblank']);
    }

    if (!
validfilename ($fname))
    {
      
stderr ($lang->global['error'], $lang->upload['fileerror1']);
    }

    if (!
preg_match ('/^(.+)\\.torrent$/si'$fname$matches))
    {
      
stderr ($lang->global['error'], $lang->upload['fileerror2']);
    }

    
$shortfname $matches[1];
    
$tmpname $f['tmp_name'];
    if (!@
is_uploaded_file ($tmpname))
    {
      
stderr ($lang->global['error'], $lang->upload['uploaderror1']);
    }

    if (!@
filesize ($tmpname))
    {
      
stderr ($lang->global['error'], $lang->upload['uploaderror2']);
    }

    if (
$privatetrackerpatch == 'yes')
    {
      
$alink $announce_urls[0];
    }
    else
    {
      
$alink $announce_urls[0] . '?passkey=' $CURUSER['passkey'];
    }

    
$dict bdec_file ($tmpname$max_torrent_size);
    if (!isset (
$dict))
    {
      
stderr ($lang->global['error'], $lang->upload['uploaderror3']);
    }

    list (
$ann$info) = dict_check ($dict'announce(string):info');
    list (
$dname$plen$pieces) = dict_check ($info'name(string):piece length(integer):pieces(string)');
    
$external false;
    if ((
$externalscrape == 'yes' AND $ann != $alink))
    {
      
$external true;
      
$updateset[] = 'ts_external = \'yes\'';
      
$updateset[] = 'ts_external_url = ' sqlesc ($ann);
      
$updateset[] = 'visible = \'yes\'';
      
$updateset[] = 'ts_external_lastupdate = \'0\'';
    }
    else
    {
      
$updateset[] = 'ts_external = \'no\'';
      
$updateset[] = 'ts_external_url = \'\'';
    }

    if ((
$external AND $usergroups['canexternal'] != 'yes'))
    {
      
stderr ($lang->global['error'], $lang->upload['externalerror']);
    }

    if ((
$privatetrackerpatch == 'no' AND !$external))
    {
      if (!
in_array ($ann$announce_urls1))
      {
        
$aok false;
        foreach (
$announce_urls as $au)
        {
          if (
$ann == '' $au '?passkey=' $CURUSER['passkey'])
          {
            
$aok true;
            continue;
          }
        }

        if (!
$aok)
        {
          
stderr ($lang->global['error'], $lang->upload['invalidannounceurl'] . $announce_urls[0] . '?passkey=' $CURUSER['passkey']);
        }
      }
    }

    if (
strlen ($pieces) % 20 != 0)
    {
      
stderr ($lang->global['error'], $lang->upload['invalidpieces']);
    }

    if ((
$privatetrackerpatch == 'yes' AND !$external))
    {
      if (((isset (
$dict['value']['announce-list']) OR isset ($dict['value']['nodes'])) OR (isset ($dict['value']['azureus_properties']['value']['dht_backup_enable']) AND $dict['value']['azureus_properties']['value']['dht_backup_enable']['value'] != 0)))
      {
        
stderr ($lang->global['error'], $lang->upload['dhterror']);
      }
    }

    
$filelist = array ();
    
$totallen dict_get ($info'length''integer');
    if (isset (
$totallen))
    {
      
$filelist[] = array ($dname$totallen);
    }
    else
    {
      
$flist dict_get ($info'files''list');
      if (!isset (
$flist))
      {
        
stderr ($lang->global['error'], $lang->upload['dicterror5']);
      }

      if (!
count ($flist))
      {
        
stderr ($lang->global['error'], $lang->upload['dicterror6']);
      }

      
$totallen 0;
      foreach (
$flist as $fn)
      {
        list (
$ll$ff) = dict_check ($fn'length(integer):path(list)');
        
$totallen += $ll;
        
$ffa = array ();
        foreach (
$ff as $ffe)
        {
          if (
$ffe['type'] != 'string')
          {
            
stderr ($lang->global['error'], $lang->upload['dicterror7']);
          }

          
$ffa[] = $ffe['value'];
        }

        if (!
count ($ffa))
        {
          
stderr ($lang->global['error'], $lang->upload['dicterror7']);
        }

        
$ffe implode ('/'$ffa);
        
$filelist[] = array ($ffe$ll);
      }
    }

    
$updateset[] = 'size = ' sqlesc ($totallen);
    
$updateset[] = 'numfiles = ' sqlesc (count ($filelist));
    if ((
$privatetrackerpatch == 'yes' AND !$external))
    {
      
$dict['value']['announce'] = bdec (benc_str ($announce_urls[0]));
      
$dict['value']['info']['value']['private'] = bdec ('i1e');
      
$dict['value']['info']['value']['source'] = bdec (benc_str (('' '[') . $BASEURL '] ' $SITENAME));
      unset (
$dict['value']['created by']);
      unset (
$dict['value']['announce-list']);
      unset (
$dict['value'][nodes]);
      
$dict bdec (benc ($dict));
      list (
$ann$info) = dict_check ($dict'announce(string):info');
    }

    
$infohash pack ('H*'sha1 ($info['string']));
    
$updateset[] = 'info_hash = ' sqlesc ($infohash);
  }

  
$updateset[] = 'filename = ' sqlesc ($fname);
  
$updateset[] = 'offensive = \'' . ($_POST['offensive'] ? 'yes' 'no') . '\'';
  
$updateset[] = 'anonymous = \'' . ($_POST['anonymous'] ? 'yes' 'no') . '\'';
  
$updateset[] = 'name = ' sqlesc ($subject);
  
$updateset[] = 'descr = ' sqlesc ($message);
  
$updateset[] = 'category = ' . ($type);
  if (
$is_mod)
  {
    
$updateset[] = 'free = \'' . ($_POST['free'] == 'yes' 'no') . '\'';
    
$updateset[] = 'isnuked = \'' . ($_POST['isnuked'] == 'yes' 'no') . '\'';
    
$updateset[] = 'isrequest = \'' . ($_POST['isrequest'] == 'yes' 'no') . '\'';
    
$updateset[] = 'silver = \'' . (($_POST['silver'] == AND $_POST['free'] != 1) ? 'yes' 'no') . '\'';
    if (
$_POST['banned'] == 1)
    {
      
$updateset[] = 'banned = \'yes\'';
      
$_POST['visible'] = 0;
    }
    else
    {
      
$updateset[] = 'banned = \'no\'';
    }

    if (
$_POST['sticky'] == 'yes')
    {
      
$updateset[] = 'sticky = \'yes\'';
    }
    else
    {
      
$updateset[] = 'sticky = \'no\'';
    }

    if (
$_POST['doubleupload'] == 'yes')
    {
      
$updateset[] = 'doubleupload = \'yes\'';
    }
    else
    {
      
$updateset[] = 'doubleupload = \'no\'';
    }

    if (
$_POST['allowcomments'] == 'yes')
    {
      
$updateset[] = 'allowcomments = \'yes\'';
    }
    else
    {
      
$updateset[] = 'allowcomments = \'no\'';
    }
  }

  
$updateset[] = 'visible = \'' . ($_POST['visible'] ? 'yes' 'no') . '\'';
  
sql_query ('UPDATE torrents SET ' join (','$updateset) . ' WHERE id = ' sqlesc ($id));
  if ((
mysql_affected_rows () AND $tmpname))
  {
    if ((
$privatetrackerpatch == 'yes' AND !$external))
    {
      @
unlink ('' $torrent_dir '/' $id '.torrent');
      
$fp = @fopen ('' $torrent_dir '/' $id '.torrent''w');
      if (
$fp)
      {
        @
fwrite ($fp, @benc ($dict), @strlen (@benc ($dict)));
        @
fclose ($fp);
      }
    }

    if ((
$privatetrackerpatch == 'no' AND !$external))
    {
      @
move_uploaded_file ($tmpname'' $torrent_dir '/' $id '.torrent');
    }

    if (
$external)
    {
      
$externaltorrent '' $torrent_dir '/' $id '.torrent';
      @
move_uploaded_file ($tmpname$externaltorrent);
      include_once 
INC_PATH '/ts_external_scrape/ts_external.php';
    }
  }

  if (
file_exists (TSDIR '/' $cache '/latesttorrents.html'))
  {
    @
unlink (TSDIR '/' $cache '/latesttorrents.html');
  }

  
$video_info implode ('~'$_POST['video']);
  
$audio_info implode ('~'$_POST['audio']);
  
$query sql_query ('SELECT tid FROM ts_torrents_details WHERE tid = ' sqlesc ($id));
  if (
mysql_num_rows ($query))
  {
    
sql_query ('UPDATE ts_torrents_details SET video_info = ' sqlesc ($video_info) . ', audio_info = ' sqlesc ($audio_info) . ' WHERE tid = ' sqlesc ($id));
  }
  else
  {
    
sql_query ('' 'INSERT INTO ts_torrents_details (tid,video_info,audio_info) VALUES (' $id ', ' sqlesc ($video_info) . ',' sqlesc ($audio_info) . ')');
  }

  
write_log ('Torrent ' intval ($id) . ' (' htmlspecialchars_uni ($subject) . ('' ') was edited by ' $CURUSER['username']));
  
redirect ('details.php?id=' $id);
?>

Click the image to open in full size.


One gets the image of

Still another image was being damaged

Thank you

I'll put a different source


Thank you very much

You are the best
__________________
새로운 트래커를 위한 정보의 포럼
My Trackers : darknesschannel
Reply With Quote
  #10  
Old 28th April 2012, 19:56
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default my details
backup old and use this one.


PHP Code:
<?php
/*
************************************************
*==========[TS Special Edition v.5.6]==========*
************************************************
*              Special Thanks To               *
*        DrNet - wWw.SpecialCoders.CoM         *
*          Vinson - wWw.Decode4u.CoM           *
*    MrDecoder - wWw.Fearless-Releases.CoM     *
*           Fynnon - wWw.BvList.CoM            *
*==============================================*
*   Note: Don't Modify Or Delete This Credit   *
*     Next Target: TS Special Edition v5.7     *
*     TS SE WILL BE ALWAYS FREE SOFTWARE !     *
************************************************
*/
require_once('global.php');
require_once(
INC_PATH.'/commenttable.php');
gzip();
dbconn(true);
loggedinorreturn();
maxsysop();
if (!
defined('NcodeImageResizer'))
{
    
define('NcodeImageResizer'true);
}
define('D_VERSION''3.5.5');

if(
$usergroups['candownload'] != 'yes')
{
    
$lang->load('browse');
    
print_no_permission(false,true,sprintf($lang->browse['downloaddisabledmsg'], ''));
}

$id = isset($_GET['id']) ? intval($_GET['id']) : (isset($_POST['id']) ? intval($_POST['id']) : '');
$is_mod is_mod($usergroups);

if (!
is_valid_id($id))
{
    
print_no_permission(true);
}

$tab 'details';
if (isset(
$_GET['tab']) AND $_GET['tab'] != '')
{
    
$tab htmlspecialchars_uni($_GET['tab']);
}

$query sql_query('SELECT t.name, t.allowcomments, t.banned, t.descr, t.category, t.size, t.numfiles, t.anonymous, t.added, t.comments, t.hits, t.times_completed, t.leechers, t.seeders, t.owner, t.free, t.sticky, t.offensive, t.silver, t.t_image, t.t_link, t.isnuked, t.WhyNuked, t.isrequest, t.ts_external, t.doubleupload, t.isScene, n.nfo, c.name as categoryname, c.vip, c.pid, c.type, c.id as categoryid, d.video_info, d.audio_info, u.username, u.donor, u.warned, u.leechwarn, g.namestyle FROM torrents t LEFT JOIN ts_nfo n ON (t.id=n.id) LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN ts_torrents_details d ON (t.id=d.tid) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE t.id = '.sqlesc($id)) or sqlerr(__FILE__,__LINE__);
if (
mysql_num_rows($query) == OR !$query OR !($torrent mysql_fetch_assoc($query)))
{
    
stderr($lang->global['error'], $lang->global['notorrentid']);
}
elseif (
$usergroups['canviewviptorrents'] != 'yes' && $torrent['vip'] == 'yes')
    
stderr($lang->global['error'], $lang->global['viptorrent'], false);
elseif (
$torrent["banned"] == "yes" && !$is_mod)
    
stderr($lang->global['error'], $lang->global['torrentbanned']);
//XXX Torrents Confirm Dialog by Danix
elseif ($torrent["category"] == "34")  
{
    
$alert = ('
                <script type="text/javascript">
                    //<![CDATA[
                    var alert = confirm("'
.$lang->global['xxxtorrent'].'")
                    if (alert)
                    {
                        alert("'
.$lang->global['xxxtorrent'].'")
                    }
                    else
                    {
                        window.location = "'
.$BASEURL.'/";
                    }
                    //]]>
                </script>'
);
    echo 
$alert;
}  


//XXX Torrents free by lafuine
$q mysql_query("SELECT size FROM torrents WHERE id = $id");
    if (
mysql_num_rows($q) > 0)
    {
        
$rf mysql_fetch_array($q);
        
        if (
$rf["size"] >= 18253611008)     /* remplace for auto freeleech 18253611008 octet= 17 go for me. use staff tool calculette ;)*/
        
{
            
mysql_query("UPDATE torrents SET free = 'yes' WHERE id = $id");
        }else{
        if (
$rf["size"] >= 15032385536)   /* remplace for auto silver 15032385536 octet= 14 go for me. use staff tool calculette ;)*/
           
mysql_query("UPDATE torrents SET silver = 'yes' WHERE id = $id");
        }
    }  


$lang->load('details');
$lang->load('upload');
$lang->load('quick_editor');
require_once(
INC_PATH.'/class_tsquickbbcodeeditor.php');
$QuickEditor = new TSQuickBBCodeEditor();
$QuickEditor->ImagePath $BASEURL.'/'.$pic_base_url;
$QuickEditor->SmiliePath $BASEURL.'/'.$pic_base_url.'smilies/';

include(
INC_PATH.'/functions_quick_editor.php');
define('TOTAL_FILES'$torrent['numfiles']);
include(
INC_PATH.'/functions_filelist.php');
require_once(
INC_PATH.'/functions_mkprettytime.php');

if (
$torrent['type'] == 's')
{
    require(
TSDIR.'/'.$cache.'/categories.php');
    foreach (
$_categoriesC as $catarray)
    {
        if (
$catarray['id'] == $torrent['pid'])
        {
            
$parentcategory $catarray['name'];
            
$parentcatid $catarray['id'];
            break;
        }
    }
    if (
$parentcategory && $parentcatid)
    {
        
$seolink ts_seo($parentcatid,$parentcategory,'c');
        
$seolink2 ts_seo($torrent['categoryid'],$torrent['categoryname'],'c');
        
$torrent["categoryname"] = '<a href="'.$seolink.'" target="_self" alt="'.$parentcategory.'" title="'.$parentcategory.'" />'.$parentcategory.'</a> / <a href="'.$seolink2.'" target="_self" alt="'.$torrent['categoryname'].'" title="'.$torrent['categoryname'].'" />'.$torrent['categoryname'].'</a>';
    }
}
else
{
    
$seolink2 ts_seo($torrent['categoryid'],$torrent['categoryname'],'c');
    
$torrent["categoryname"] = '<a href="'.$seolink2.'" target="_self" alt="'.$torrent['categoryname'].'" title="'.$torrent['categoryname'].'" />'.$torrent['categoryname'].'</a>';
}

$isfree = ($torrent['free'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'freedownload.gif" class="inlineimg" />' '');
$issilver = ($torrent['silver'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'silverdownload.gif" class="inlineimg" />' '');
$isdoubleupload = ($torrent['doubleupload'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'x2.gif" class="inlineimg" />' '');

stdhead(sprintf($lang->details['detailsfor'], $torrent['name']), true'supernote','INDETAILS');

$gigs $CURUSER['downloaded'] / (1024*1024*1024);
$ratio = ($CURUSER['downloaded'] > $CURUSER['uploaded'] / $CURUSER['downloaded'] : 0);
$percentage $ratio 100;
if (
$gigs $hitrun_gig AND $ratio <= $hitrun_ratio AND $torrent['owner'] != $CURUSER['id'] AND !$is_mod AND $CURUSER['downloaded'] <> 0)
{
    
$warning_message show_notice(sprintf($lang->details['hitrunwarning'], number_format($ratio2), number_format($percentage3), $hitrun_ratio), true);
}
elseif (
$ratio <= ($hitrun_ratio 0.2) AND $torrent['owner'] != $CURUSER['id'] AND !$is_mod AND $CURUSER['downloaded'] <> 0)
{
    
$warning_message show_notice(sprintf($lang->details['hitrunwarning2'], number_format($ratio2), mksize($percentage), $hitrun_ratio$id), true);
}

if (isset(
$warning_message))
{
    echo 
$warning_message;
}

$sratio $torrent['leechers'] > $torrent['seeders'] / $torrent['leechers'] : 1;
$lratio $torrent['seeders'] > $torrent['leechers'] / $torrent['seeders'] : 1;
$video_info = @explode('~'$torrent['video_info']);
$audio_info = @explode('~'$torrent['audio_info']);

if (
$usergroups['canreport'] == 'yes')
{
    
$lang->load('report');
    
$head $lang->report['report'].' TORRENT';
    
$report '
    '
.($useajax == 'yes' '<script type="text/javascript" src="./scripts/quick_report.js"></script>
    <div id="QuickReportDone" name="QuickReportDone" style="display: none;">'
.$lang->report['done'].'</div>' '').'
    <div id="ShowQuickReport" name="ShowQuickReport" style="display: inline;">
        <form method="post" action="report.php" name="quickreport" id="quickreport">
        <input type="hidden" name="action" value="reporttorrent">
        <input type="hidden" name="do" value="save">
        <input type="hidden" name="siv" value="false">
        <input type="hidden" name="returnto" value="details.php?id='
.$id.'&tab=report&reported=true">
        <input type="hidden" name="reportid" value="'
.$id.'">
        <table border="0" width="100%" cellspacing="0" cellpadding="5">
            <tr>
                <td class="rowhead">'
.$lang->report['reporttype'].'</td>
                <td>'
.$head.'</td>
            </tr>
            <tr>
                <td class="rowhead">'
.$lang->report['reportid'].'</td>
                <td>'
.$id.'</td>
            </tr>
            <tr>
                <td class="rowhead">'
.$lang->report['reason'].'</td>
                <td><textarea name="reason" id="reason" rows="6" cols="90"></textarea><br />
                '
.($useajax == 'yes' '<input type="button" class="button" value="'.$lang->global['buttonreport'].'" name="quickreportbutton" id="quickreportbutton" onclick="javascript:TSajaxquickreport(\''.$id.'\');" />' '<input type="submit" name="submit" value="'.$lang->global['buttonreport'].'" class="button" />').' <img src="'.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" class="inlineimg" border="0" alt="" title="" id="report-loading-layer" style="display:none;" /></td>
            </tr>
        </table>
        </form>
    </div>'
;
}
else
{
    
$report $lang->global['nopermission'];
}
$showcommenttable '';
$count TSRowCount('id''comments''torrent='.$id);
if (!
$count)
{
    
$showcommenttable .= '
    <table class="none" border="0" cellspacing="0" cellpadding="5" width="100%">
        <tr>
            <td>
                <div style="display: block;" id="ajax_comment_preview">'
.$lang->details['nocommentsyet'].'</div>
                <div style="display: block;" id="ajax_comment_preview2"></div>
            </td>
        </tr>
    </table>
    '
;
}
else
{
    list(
$pagertop$pagerbottom$limit) = pager($ts_perpage$count$_SERVER['SCRIPT_NAME'].'?id='.$id.'&tab=comments&', array('lastpagedefault' => '1'), false);
    
$subres sql_query("SELECT c.id, c.torrent as torrentid, c.text, c.user, c.added, c.editedby, c.editedat, c.modnotice, c.modeditid, c.modeditusername, c.modedittime, c.totalvotes, uu.username as editedbyuname, gg.namestyle as editbynamestyle, u.added as registered, u.enabled, u.warned, u.leechwarn, u.username, u.title, u.usergroup, u.last_access, u.options, u.donor, u.uploaded, u.downloaded, u.avatar as useravatar, u.signature, g.title as grouptitle, g.namestyle FROM comments c LEFT JOIN users uu ON (c.editedby=uu.id) LEFT JOIN usergroups gg ON (uu.usergroup=gg.gid) LEFT JOIN users u ON (c.user=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE c.torrent = ".sqlesc($id)." ORDER BY c.id $limit") or sqlerr(__FILE____LINE__);

    
$allrows = array();
    while (
$subrow mysql_fetch_assoc($subres))
    {
        
$allrows[] = $subrow;
    }
    
$showcommenttable .= $pagertop.commenttable($allrows,'','',false,true,true).$pagerbottom;
}

$rowspan 9;
$reseed '';
if (
$torrent['seeders'] == && $torrent['ts_external'] == 'no')
{
    
$reseed '
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['askreseed'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.sprintf($lang->details['askreseed2'], $id).'</td>
    </tr>'
;
    
$rowspan++;
}

if (
$torrent['isScene'] > 0)
{
    
$rowspan++;
    
$isScene '
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->upload['scene'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.$lang->global['greenyes'].'</td>
    </tr>
    '
;
    
$rowspan++;
    
$isScene .= '
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['scene3'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.mkprettytime($torrent['isScene']).'</td>
    </tr>
    '
;
}

if (isset(
$_GET['cerror']))
{
    switch (
$_GET['cerror'])
    {
        case 
1:
            
$cerror $lang->global['notorrentid'];
        break;
        case 
2:
            
$cerror $lang->global['dontleavefieldsblank'];
        break;
        case 
3:
            
$cerror sprintf($lang->global['flooderror'], $usergroups['floodlimit'], $lang->comment['floodcomment'], "-");
        break;
        default:
            
$cerror $lang->global['error'];
        break;
    }
}

if (
$usergroups['canpeers'] != 'yes' OR $torrent['ts_external'] == 'yes')
{
    
$peerstable sprintf($lang->details['peers3'], ts_nf($torrent['seeders']), ts_nf($torrent['leechers']), (ts_nf($torrent['seeders'] + $torrent['leechers']))).($torrent['seeders'] == && $torrent['ts_external'] == 'no' '<br />'.sprintf($lang->details['askreseed2'],$id) : '');
}
else
{
    function 
getagent($httpagent=''$peer_id="")
    {
        global 
$lang;
        return (
$httpagent $httpagent : ($peer_id $peer_id $lang->global['unknown']));
    }

    function 
dltable($name$arr$torrent)
    {
        global 
$CURUSER,$pic_base_url$lang,$usergroups,$is_mod$BASEURL;
        
$totalcount count($arr);
        
$p '<b>'.$totalcount.' '.$name.'</b>';
        if (!
count($totalcount))
            return 
$p;
        
$s '<table width="100%" border="0" cellspacing="0" cellpadding="3">
                    <tr>
                        <td colspan="11" class="thead">'
.$p.'</td>
                    </tr>
                    <tr>
                        <td class="subheader">'
.$lang->details['userip'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['conn'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['up'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['urate'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['down'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['drate'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['ratio'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['done'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['since'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['idle'].'</td>
                        <td class="subheader" align="center">'
.$lang->details['client'].'</td>
                </tr>'
;
        
$now TIMENOW;
        include_once(
INC_PATH.'/functions_ratio.php');
        foreach (
$arr as $e)
        {

            if ((
preg_match('#I3#is'$e['options']) OR preg_match('#I4#is'$e['options'])) AND !$is_mod AND $CURUSER['id'] != $e['id'])
            {
                
$s .= '
                <tr>
                    <td align="center">'
.$lang->global['anonymous'].'</td>
                    '
.str_repeat('<td align="center">---</td>'10).'
                </tr>'
;
                continue;
            }

            if (isset(
$num))
            {
                ++
$num;
            }
            else
            {
                
$num 1;
            }

            
$dnsstuff "<br /><a href=\"http://dnsstuff.com/tools/whois.ch?ip=".htmlspecialchars_uni($e["ip"])."\" target=_blank><font class=\"small\" color=\"brown\"><b>".htmlspecialchars_uni($e["ip"])."</b></font></a>:<u><font class=\"small\" color=\"red\"><b>"$e['port'] . "</b></font></u></td>\n";
            
$pregreplace "<br /><font class=\"small\" color=\"brown\"><b>".preg_replace('/\.\d+\.\d+$/'"***"htmlspecialchars_uni($e["ip"])) . "</b></font></a>:<u><font class=\"small\" color=\"red\"><b>". (int)$e['port'] . "</b></font></u></td>\n";
            
$highlight $CURUSER["id"] == $e["id"] ? " bgcolor=#BBAF9B" "";
            
$s .= "<tr$highlight>\n";
            if (!empty(
$e["username"]))
            {

                if (
$is_mod || $torrent['anonymous'] != 'yes' || $e['id'] != $torrent['owner'])
                {
                    
$s .= "<td style=\"white-space: nowrap; text-align: center;\"><a href=\"".ts_seo($e['userid'], $e['username'])."\"><b>".get_user_color($e["username"],$e["namestyle"])."</b></a>" . ($e["donor"] == "yes" "<img src=".$pic_base_url."star.gif title='".$lang->global['imgdonated']."'>" "") . ($e["enabled"] == "no" "<img src=".$pic_base_url."disabled.gif title=\"".$lang->global['imgdisabled']."\" style='margin-left: 2px'>" : ($e["warned"] == "yes" "<a href=\"rules.php#warning\" class=\"altlink\"><img src=\"".$pic_base_url."warned.gif\" title=\"".$lang->global['imgwarned']."\" border=\"0\"></a>" ""));
                    
$s .= ($is_mod $dnsstuff $pregreplace);
                }
                else
                    
$s .= "<td>".$lang->global['anonymous']."</a></td>\n";
            }
            else
                
$s .= "<td>".$lang->global['unknown']."</td>\n";

            
$secs max(1, ($now $e["st"]) - ($now $e["la"]));
            
$s .= "<td align=\"center\">" . ($e['connectable'] == "yes" "<font color=green>".$lang->details['yes']."</font>" "<font color=red>".$lang->details['no']."</font>") . "</td>\n";
            
$s .= "<td align=\"right\">" mksize($e["uploaded"]) . "</td>\n";
            
$s .= "<td align=\"right\"><span style=\"white-space: nowrap;\">" mksize(($e["uploaded"] - $e["uploadoffset"]) / $secs) . "/s</span></td>\n";
            
$s .= "<td align=\"right\">" mksize($e["downloaded"]) . "</td>\n";
            if (
$e["seeder"] == "no")
                
$s .= "<td align=\"right\"><span style=\"white-space: nowrap;\">" mksize(($e["downloaded"] - $e["downloadoffset"]) / $secs) . "/s</span></td>\n";
            else
                
$s .= "<td align=\"right\"><span style=\"white-space: nowrap;\">" mksize(($e["downloaded"] - $e["downloadoffset"]) / max(1$e["finishedat"] - $e['st'])) .    "/s</span></td>\n";
            if (
$e["downloaded"])
            {
              
$ratio floor(($e["uploaded"] / $e["downloaded"]) * 1000) / 1000;
                
$s .= "<td align=\"right\"><font color=" get_ratio_color($ratio) . ">" number_format($ratio2) . "</font></td>\n";
            }
               else
              if (
$e["uploaded"])
                
$s .= "<td align=\"right\">".$lang->details['inf']."</td>\n";
              else
                
$s .= "<td align=right>---</td>\n";
            
$s .= "<td align=\"right\">" sprintf("%.2f%%"100 * (- ($e["to_go"] / $torrent["size"]))) . "</td>\n";
            
$s .= "<td align=\"right\">" mkprettytime($now $e["st"]) . "</td>\n";
            
$s .= "<td align=\"right\">" mkprettytime($now $e["la"]) . "</td>\n";
            
$s .= "<td align=\"left\">" htmlspecialchars_uni(getagent($e["agent"], $e["peer_id"])) . "</td>\n";
            
$s .= "</tr>\n";
        }
        
$s .= "</table>\n";
        return 
$s;
    }
    
$downloaders = array();
    
$seeders = array();
    
$subres sql_query("SELECT p.seeder, p.finishedat, p.downloadoffset, p.uploadoffset, p.ip, p.port, p.uploaded, p.downloaded, p.to_go, UNIX_TIMESTAMP(p.started) AS st, p.connectable, p.agent, p.peer_id, UNIX_TIMESTAMP(p.last_action) AS la, p.userid,  u.id, u.enabled, u.username, u.options, u.warned, u.donor, g.namestyle FROM peers p LEFT JOIN users u ON (p.userid=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE p.torrent = ".sqlesc($id)) or sqlerr(__FILE__,__LINE__);
    while (
$subrow mysql_fetch_array($subres))
    {
        if (
$subrow["seeder"] == "yes")
            
$seeders[] = $subrow;
        else
            
$downloaders[] = $subrow;
    }

    function 
leech_sort($a,$b)
    {
        if ( isset( 
$_GET["usort"] ) ) return seed_sort($a,$b);
        
$x $a["to_go"];
        
$y $b["to_go"];
        if (
$x == $y)
            return 
0;
        if (
$x $y)
            return -
1;
        return 
1;
    }
    function 
seed_sort($a,$b)
    {
        
$x $a["uploaded"];
        
$y $b["uploaded"];
        if (
$x == $y)
            return 
0;
        if (
$x $y)
            return 
1;
        return -
1;
    }

    
usort($seeders"seed_sort");
    
usort($downloaders"leech_sort");

    
$peerstable dltable($lang->details['seeders2'], $seeders$torrent);
    
$peerstable .= '<br />'.dltable($lang->details['leechers2'], $downloaders$torrent);
}

$QuickEditor->FormName='comment';
$QuickEditor->TextAreaName='message';
$showcommenttable .= '
<br />
<!-- start: BBcode Styles -->
'
.$QuickEditor->GenerateCSS().'
'
.$QuickEditor->GenerateJavascript().'
<!-- start: BBcode Styles -->
'
.(!empty($cerror) ? '<div class="error">'.$cerror.'</div>' '').'
'
.($useajax == 'yes' '<script type="text/javascript" src="'.$BASEURL.'/scripts/quick_comment.js"></script>' '').'
<script type="text/javascript" src="'
.$BASEURL.'/scripts/quick_preview.js"></script>
<form name="comment" id="comment" method="post" action="comment.php?action=add&tid='
.$id.'">
<input type="hidden" name="ctype" value="quickcomment">
<input type="hidden" name="page" value="'
.intval(isset($_GET['page']) ? $_GET['page'] : 0).'">
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr>
            <td class="thead">'
.ts_collapse('quickcomment').'<a name="startquickcomment">'.$lang->details['quickcomment'].'</a></td>
        </tr>
        '
.ts_collapse('quickcomment'2).'
        <tr>
            <td>
                '
.$QuickEditor->GenerateBBCode().'
            </td>
        </tr>
        <tr>
            <td align="center"><textarea name="message" style="width:850px;height:120px;" id="message"></textarea></td>
        </tr>
        <tr>
            <td align="center">
            '
.($useajax == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" class="inlineimg" border="0" alt="" title="" id="loading-layer" style="display:none;" /> <input type="button" class="button" value="'.$lang->global['buttonsubmit'].'" name="quickcomment" id="quickcomment" onclick="javascript:TSajaxquickcomment(\''.$id.'\');" />' '<input type="submit" name="submit" value="'.$lang->global['buttonsubmit'].'" class="button" />').'
            <input type="button" class="button" name="button" value="'
.$lang->global['buttonpreview'].'" onclick="javascript:TSajaxquickpreview();" /> <input type="button" value="'.$lang->global['advancedbutton'].'" class="button" onclick="jumpto(\''.$BASEURL.'/comment.php?action=add&tid='.$id.'\')" />
            </td>
        </tr>
    </table>
</form>'
;

if (
$usergroups['canbookmark'] == 'yes')
{
    
$onclick1 $onclick2 '';
    if (
$useajax == 'yes')
    {
        
$onclick1 ' onclick="TSajaxquickbookmark('.$id.',\'add\'); return false;"';
        
$onclick2 ' onclick="TSajaxquickbookmark('.$id.',\'delete\'); return false;"';
    }
    
$bookmark '
    '
.($useajax == 'yes' '
    <script type="text/javascript" src="./scripts/quick_bookmark.js"></script>' 
'').'
    <p>
    <span id="bookmark-loading-layer" style="display:none; float: left;"><img src="'
.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" border="0" alt="" title="" class="inlineimg"></span>
    <span id="bookmark-done-layer" style="display:none; float: left;"><img src="'
.$BASEURL.'/'.$pic_base_url.'input_true.gif" border="0" alt="" title="" class="inlineimg"></span>
    <a href="'
.$BASEURL.'/bookmarks.php?action=add&torrentid='.$id.'"'.$onclick1.'>'.$lang->details['bookmark'].'</a> - <a href="'.$BASEURL.'/bookmarks.php?action=delete&torrentid='.$id.'"'.$onclick2.'>'.$lang->details['removebookmark'].'</a>
    </p>'
;
}
else
{
    
$bookmark $lang->global['nopermission'];
}

if(
$torrent['anonymous'] == 'yes' AND $torrent['owner'] != $CURUSER['id'] AND !$is_mod)
{
        
$username $lang->global['anonymous'];
}
else
{
    
$username '<a href="'.ts_seo($torrent['owner'], $torrent['username']).'">'.get_user_color($torrent['username'], $torrent['namestyle']).'</a>'.($torrent['donor'] == 'yes' ' <img src="'.$BASEURL.'/'.$pic_base_url.'star.gif" alt="'.$lang->global['imgdonated'].'" title="'.$lang->global['imgdonated'].'">' '').($torrent['warned'] == 'yes' || $torrent['leechwarn'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'warned.gif" alt="'.$lang->global['imgwarned'].'" title="'.$lang->global['imgwarned'].'">' '');
}

if (
$ratingsystem == 'yes' AND $usergroups['canrate'] == 'yes')
{
    require(
'ratings/includes/rating_functions.php');
    
$rating show_rating($id$CURUSER['id']);
}

if (
$thankssystem == 'yes')
{
    
$AllThanks '
    <script type="text/javascript" src="'
.$BASEURL.'/scripts/quick_thanks.js?v='.O_SCRIPT_VERSION.'"></script>
    <img src="'
.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" class="inlineimg" border="0" alt="" title="" id="thanks-loading-layer" style="display:none; float: left;" />
    '
;
    
$IsThanked=false;
    
$ThanksArray=array();
    
$Tquery sql_query('SELECT t.uid, u.username, g.namestyle FROM ts_thanks t LEFT JOIN users u ON (u.id=t.uid) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE t.tid = \''.$id.'\' ORDER BY u.username');
    if (
mysql_num_rows($Tquery) > 0)
    {
        while(
$thanks=mysql_fetch_assoc($Tquery))
        {
            if (
$thanks['uid'] == $CURUSER['id'])
            {
                
$IsThanked=true;
            }
            
$ThanksArray[] = '<a href="'.ts_seo($thanks['uid'], $thanks['username']).'">'.get_user_color($thanks['username'], $thanks['namestyle']).'</a>';
        }
    }

    
$TButton '';
    if (!
$IsThanked AND $torrent['owner'] != $CURUSER['id'])
    {
        
$TButton '<div id="thanks_button"><input type="button" value="'.$lang->global['buttonthanks'].'" onclick="javascript:TSajaxquickthanks('.$id.');" /></div>';
    }
    elseif (
$IsThanked)
    {
        
$TButton '<div id="thanks_button"><input type="button" value="'.$lang->global['buttonthanks2'].'" onclick="javascript:TSajaxquickthanks('.$id.', true);" /></div>';
    }

if (
count($ThanksArray) == 0)
    {
        
$AllThanks $AllThanks.$TButton.'<div id="torrent_thanks" name="torrent_thanks"><b><i>'.$lang->details['nothanksyet'].'</i></b></div>';
    }
    else
    {
        
$AllThanks $AllThanks.$TButton.'<div id="torrent_thanks" name="torrent_thanks">'.implode(', '$ThanksArray).'</div>';
    }
}
////////////// torrent similair /////////////////////
        
$searchname substr($torrent['name'], 08);
        
$query1 str_replace(" ",".",sqlesc("%".$searchname."%"));
        
$query2 str_replace("."," ",sqlesc("%".$searchname."%"));
           
$r mysql_query("SELECT id, name, size, added, seeders, leechers, category FROM torrents WHERE name LIKE {$query1} AND seeders > '0' AND id <> '$id' OR name LIKE {$query2} AND seeders > '0' AND id <> '$id' ORDER BY seeders DESC LIMIT 10") or sqlerr();
            if (
mysql_num_rows($r) > 0)
   {
   
$torrents "\n" .
   
"<td class=subheader align=center>".$lang->details['type']."</td><td class=subheader>".$lang->details['Nom']."</td><td class=subheader align=center>".$lang->details['size']."</td><td class=subheader align=center>".$lang->details['added']."</td><td class=subheader align=center>Seeders</td><td class=subheader align=center>Leechers</td>\n";
   while (
$a mysql_fetch_assoc($r))
   {
   
$r2 mysql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE____LINE__);
    
$a2 mysql_fetch_assoc($r2);
    
$cat "<img src=\"/pic/$a2[image]\" alt=\"$a2[name]\">";

   
$name $a["name"];
   
$torrents .= "<tr><td width=10% align=center><img src=\"/pic/categories/" .$a2["image"]. "\"></td><td class=hoptobutton><a href=details.php?id=" $a["id"] . "&hit=1><b>" htmlspecialchars($name) . "</b></a></td><td class=hoptobutton style='padding: 1px' align=center>"mksize($a[size]) ."</td><td class=hoptobutton style='padding: 1px' align=center>$a[added]</td><td class=hoptobutton style='padding: 1px' align=center>$a[seeders]</td><td class=hoptobutton style='padding: 1px' align=center>$a[leechers]</td></tr>\n";
   }
   
$torrents .= "</table>";
   
$similair1 =("<table width=100% class=main border=1 cellspacing=0 cellpadding=5><td class=thead>".$lang->details['similaire']."</td></table><table width=100% class=main border=1 cellspacing=0 cellpadding=5><tr align=left>$torrents</tr>\n");
   
   }
////////////// Torrent similair /////////////////////  

$ShowTLINK '';
if (!empty(
$torrent['t_link']))
{
    require_once(
INC_PATH.'/functions_imdb_rating.php');
    if (
$IMDBRating TSSEGetIMDBRatingImage($torrent['t_link']))
    {
        
$torrent['t_link'] = str_replace('<b>User Rating:</b>''<b>User Rating:</b> '.$IMDBRating['image'], $torrent['t_link']);
    }
    else
    {
        
$torrent['t_link'] = format_urls(str_replace('"''&quot;'$torrent['t_link']), '_blank');
    }
    
$ShowTLINK '
    <table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr>
            <td class="thead">
                '
.($is_mod '
                <span style="float: right;"><div id="imdbupdatebutton" name="imdbupdatebutton"><a href="#" onclick="TS_IMDB(\''
.$id.'\'); return false;"><b><u><i>'.$lang->global['refresh'].'</i></u></b></a></div></span>' '').$lang->details['t_link'].'
            </td>
        </tr>
        <tr>
            <td>
                <div id="imdbdetails" name="imdbdetails">'
.$torrent['t_link'].'</div>
            </td>
        </tr>
    </table>
    <br />'
;
}

$details '
<table cellspacing="0" border="0" cellpadding="4" width="100%">
    <tr>
        <td colspan="3" class="thead">'
.$isfree.$issilver.$isdoubleupload.' '.htmlspecialchars_uni($torrent['name']).'</td>
    </tr>
    <tr>
        <td rowspan="'
.$rowspan.'" align="center" valign="top" width="175">'.($torrent['t_image'] != '' '<a href="#" onclick="javascript:popImage(\''.$torrent['t_image'].'\',\'Image Preview\')"><img src="'.htmlspecialchars_uni($torrent['t_image']).'" class="glossy" border="0" width="175" height="175">' '<img src="'.$BASEURL.'/'.$pic_base_url.'nopreview.gif" class="glossy" border="0">').'</a>'.($ratingsystem == 'yes' '<br /><br />'.$rating '').'</td>  
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['download'].'</td>
        <td style="padding-left: 5px;" valign="top" width="430"><a href="'
.ts_seo($id,$torrent['name'],'d').'" alt="'.$lang->details['dltorrent'].'" title="'.$lang->details['dltorrent'].'"><img src=download.png></a></td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['added'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.my_datee($dateformat$torrent['added']).' '.my_datee($timeformat$torrent['added']).'</td>
    </tr>
    <tr>

        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['type'].'</td>

        <td valign="top" style="padding-left: 5px;">'
.$torrent['categoryname'].'</td>

    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['size'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.mksize($torrent['size']).' '.sprintf($lang->details['numfiles2'], ts_nf($torrent['numfiles'])).'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['hits'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.ts_nf($torrent['hits']).'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['snatched'].'</td>
        <td valign="top" style="padding-left: 5px;"><a href="'
.$BASEURL.'/viewsnatches.php?id='.$id.'">'.ts_nf($torrent['times_completed']).'</a> '.$lang->details['snatched2'].'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['uppedby'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.$username.'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['comments'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.ts_nf($torrent['comments']).' '.$lang->details['comments'].'</td>
    </tr>
    <tr>
        <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'
.$lang->details['peersb'].'</td>
        <td valign="top" style="padding-left: 5px;">'
.sprintf($lang->details['peers2'], '<font color="'.get_slr_color($sratio).'">'.ts_nf($torrent['seeders']).'</font>''<font color="'.get_slr_color($lratio).'">'.ts_nf($torrent['leechers']).'</font>'ts_nf($torrent['seeders']+$torrent['leechers'])).'</td>
    </tr>
    '
.(isset($reseed) ? $reseed '').(isset($isScene) ? $isScene '').'
    <tr>
        <td align="center" valign="top" width="175">
            <table cellpadding="2" cellspacing="0" width="100%" align="center">
                <tr>
                    <td colspan="2" class="subheader">'
.$lang->upload['video'].'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['codec'].'</td><td>'.($video_info[0] ? htmlspecialchars_uni($video_info[0]) : $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['bitrate'].'</td><td>'.($video_info[1] ? htmlspecialchars_uni($video_info[1]).' kbps' $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['resulation'].'</td><td>'.($video_info[2] ? htmlspecialchars_uni($video_info[2]) : $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['length'].'</td><td>'.($video_info[3] ? htmlspecialchars_uni($video_info[3]).' '.$lang->global['minutes'] : $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['quality'].'</td><td>'.($video_info[4] ? htmlspecialchars_uni($video_info[4]).'/10' $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td colspan="2" class="subheader">'
.$lang->upload['audio'].'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['codec'].'</td><td>'.($audio_info[0] ? htmlspecialchars_uni($audio_info[0]) : $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['bitrate'].'</td><td>'.($audio_info[1] ? htmlspecialchars_uni($audio_info[1]).' kbps' $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['frequency'].'</td><td>'.($audio_info[2] ? htmlspecialchars_uni($audio_info[2]).' HZ' $lang->details['na']).'</td>
                </tr>
                <tr>
                    <td valign="top" align="right" width="40%">'
.$lang->upload['language'].'</td><td>'.($audio_info[3] ? htmlspecialchars_uni($audio_info[3]) : $lang->details['na']).'</td>
                </tr>
            </table>
        </td>
        <td colspan="2" valign="top">
            '
.($thankssystem == 'yes' '
            <table width="100%" border="0" cellpadding="5" cellspacing="0">
                <tr>
                    <td class="thead">'
.$lang->details['thanksby'].'</td>
                </tr>
                <tr>
                    <td>
                        <div style="overflow: auto; height: 200px;">'
.$AllThanks.'</div>
                    </td>
                </tr>
            </table>' 
'').'
        </td>
    </tr>
    </table>
    <br />
    '
.$ShowTLINK.'
    <table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr>
            <td class="thead">'
.sprintf($lang->details['detailsfor'], $torrent['name']).'</td>
        </tr>
        <tr>
            <td>
                '
.format_comment($torrent['descr']).'
            </td>
        </tr>
    </table>
    <br />
    '
.$similair1.'
    <br />  
'
;

echo 
'
<link rel="stylesheet" type="text/css" href="'
.$BASEURL.'/scripts/yui/tabview/assets/skins/sam/tabview.css" />
<script type="text/javascript" src="'
.$BASEURL.'/scripts/yui/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/yui/element/element-beta-min.js"></script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/yui/tabview/tabview-min.js"></script>'.($is_mod '
<script type="text/javascript">
    l_updated = "'
.$lang->global['imgupdated'].'";
    l_refresh = "'
.$lang->global['refresh'].'";
</script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/quick_imdb.js"></script>' '');

$show_manage '';
if (
$CURUSER['id'] === $torrent['owner'] OR $is_mod)
{
    
$show_manage .= '<a href="'.$BASEURL.'/edit.php?id='.$id.'"  onmouseout="window.status=\'\'; return true;" onMouseOver="window.status=\''.$lang->details['editorrent'].'\'; return true;">'.$lang->details['editorrent'].'</a> - ';
}
if (
$is_mod)
{
    
$show_manage .= '<a href="'.$BASEURL.'/admin/index.php?act=fastdelete&amp;id='.$id.'" onmouseout="window.status=\'\'; return true;" onMouseOver="window.status=\'\'; return true;">Delete Torrent</a> -
    <a href="'
.$BASEURL.'/comment.php?tid='.$id.'&action='.($torrent['allowcomments'] != 'yes' 'open' 'close').'"  onmouseout="window.status=\'\'; return true;" onMouseOver="window.status=\''.($torrent['allowcomments'] == 'no' $lang->details['open'] : $lang->details['close']).'\'; return true;">'.($torrent['allowcomments'] != 'yes' $lang->details['open'] : $lang->details['close']).'</a> -
    <a href="'
.$BASEURL.'/admin/index.php?act=torrent_info&id='.$id.'" onmouseout="window.status=\'\'; return true;" onMouseOver="window.status=\'\'; return true;">Torrent Info</a>';
}

$show_nfo '';
if (!empty(
$torrent['nfo']))
{
    
$show_nfo .= '<img src="'.$BASEURL.'/viewnfo.php?id='.$id.'" border="0" alt="'.$torrent['name'].'" title="'.$torrent['name'].'" />';
}

echo 
'
<div class="yui-skin-sam">
    <div id="details" class="yui-navset">
        <ul class="yui-nav">
            <li'
.($tab == 'details' ' class="selected"' '').'><a href="#details"><em>'.$lang->details['torrentinfo'].'</em></a></li>
            <li'
.($tab == 'comments' ' class="selected"' '').'><a href="#comments"><em>'.$lang->details['comments'].'</em></a></li>
            <li'
.($tab == 'filelist' ' class="selected"' '').'><a href="#filelist"><em>'.$lang->details['numfiles3'].'</em></a></li>
            <li'
.($tab == 'peers' ' class="selected"' '').'><a href="#peers"><em>'.$lang->details['peersb'].'</em></a></li>
            <li'
.($tab == 'report' ' class="selected"' '').'><a href="#report"><em>'.$lang->details['report'].'</em></a></li>
            <li'
.($tab == 'bookmark' ' class="selected"' '').'><a href="#bookmark"><em>'.$lang->details['bookmark'].'</em></a></li>
            '
.($show_nfo != '' '<li'.($tab == 'nfo' ' class="selected"' '').'><a href="#nfo"><em>NFO</em></a></li>' '').'
            '
.($show_manage != '' '<li'.($tab == 'manage' ' class="selected"' '').'><a href="#manage"><em>Manage Torrent</em></a></li>' '').'
        </ul>
        <div class="yui-content">
            <div id="details">'
.$details.'</div>
            <div id="comments">'
.$showcommenttable.'</div>
            <div id="filelist">'
.$s.'</div>
            <div id="peers">'
.$peerstable.'</div>
            <div id="report">'
.$report.'</div>
            <div id="bookmark">'
.$bookmark.'</div>
            '
.($show_nfo != '' '<div id="nfo">'.$show_nfo.'</div>' '').'
            '
.($show_manage != '' '<div id="manage">'.$show_manage.'</div>' '').'
        </div>
    </div>
    <script type="text/javascript">
    (function() {
        var tabView = new YAHOO.widget.TabView("details");
    })();
    </script>
</div>'
;
function 
get_slr_color($ratio)
{
    if (
$ratio 0.025) return "#ff0000";
    if (
$ratio 0.05) return "#ee0000";
    if (
$ratio 0.075) return "#dd0000";
    if (
$ratio 0.1) return "#cc0000";
    if (
$ratio 0.125) return "#bb0000";
    if (
$ratio 0.15) return "#aa0000";
    if (
$ratio 0.175) return "#990000";
    if (
$ratio 0.2) return "#880000";
    if (
$ratio 0.225) return "#770000";
    if (
$ratio 0.25) return "#660000";
    if (
$ratio 0.275) return "#550000";
    if (
$ratio 0.3) return "#440000";
    if (
$ratio 0.325) return "#330000";
    if (
$ratio 0.35) return "#220000";
    if (
$ratio 0.375) return "#110000";
    return 
"#000000";
}
stdfoot();
?>
and download button and put in root www or http_doc folder

http://scene.speedseeker.co.za/download.png
Reply With Quote
Reply

Tags
damage , image


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 12:06. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.