Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=117)
-   -   Balloon tooltip in browse page (http://www.bvlist.com/showthread.php?t=6448)

mmisu120000 19th May 2011 06:46

Balloon tooltip in browse page
 
1 Attachment(s)
This is a mode I've made some time ago ...

http://img852.imageshack.us/img852/6803/asdnp.png

So, this is what you should do:

in browse.php, find:

PHP Code:

$name_torrent '<a href="'.($UseQuickMenu '#' $seolink2).'" id="torrentmenu'.$torrents['id'].'" /><b>'.(!empty($keywords) ? highlight(htmlspecialchars_uni($keywords), $torrents['name']) : $torrents['name']).'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

and replace it with:

PHP Code:

        $imagineat=htmlspecialchars_uni($torrents['t_image']);
$name_torrent '<a href="'.$seolink2.'" onmouseover="return overlib(\'<table width=100%><tr><td><img src='.$imagineat.' width=150 height=200></td></tr></table>\',  WIDTH, 150, DELAY, 100);" onmouseout="return nd();"><b>'.$torrents['name'].'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

in /include/templates/YOUR_TEMPLATE/header.php,

in the section insert this line:
PHP Code:

<script type="text/javascript" src="<?php echo $BASEURL?>/scripts/overlib.js"></script>

(do this in every template you have.

Finally, overlib.js in the /scripts dir (DON'T FORGET TO UNRAR IT FIRST!)

This should do it...
If there is something that I forgot, please tell me, it's been a while since I made that, maybe I missed something ...

z3ro 19th May 2011 12:09

no good
 
:sos:

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');
gzip();
dbconn(true);
maxsysop();
define('B_VERSION''4.6.3');

if (
$MEMBERSONLY == 'yes')
{
    
loggedinorreturn();
    
parked();
}

$lang->load('browse');
$is_mod is_mod($usergroups);
$special_search = (isset($_GET['special_search']) ? trim($_GET['special_search']) : '');
$do = isset($_POST['do']) ? $_POST['do'] : (isset($_GET['do']) ? $_GET['do'] : '');
$quick_search = isset($_POST['quick_search']) ? trim($_POST['quick_search']) : (isset($_GET['quick_search']) ? trim($_GET['quick_search']) : '');
$search_type $javaalert $from '';
$pagelinks = array();
$showvisible true;
$is_bookmark_page false;
$UseQuickMenu preg_match('#P1#is'$CURUSER['options']);

if (
strtoupper($_SERVER['REQUEST_METHOD']) == 'POST' AND $is_mod AND !empty($_POST['tid']))
{
    if ((
$tid intval($_POST['tid'])) AND is_valid_id($tid) AND ($torrent trim($_POST['subject'])) AND !empty($torrent))
    {
        
$torrent unesc($torrent);
        
$torrent str_replace('_'' '$torrent);
        
sql_query("UPDATE torrents SET name = ".sqlesc($torrent)." WHERE id = ".sqlesc($tid));
    }
}

if (
$special_search == 'myreseeds')
{
    
$extraqueries " AND t.seeders = 0 AND t.leechers > 0 AND t.owner = ".sqlesc($CURUSER['id']);
    
$pagelinks[] = "special_search=myreseeds";
    
$sqfield "&special_search=myreseeds";
    
$showvisible false;
}
elseif (
$special_search == 'mybookmarks')
{
    
$from 'FROM bookmarks b LEFT JOIN torrents t ON (b.torrentid = t.id)';
    
$extraqueries " AND b.userid = ".sqlesc($CURUSER['id']);
    
$pagelinks[] = "special_search=mybookmarks";
    
$sqfield "&special_search=mybookmarks";
    
$showvisible false;
    
$is_bookmark_page true;
}
elseif (
$special_search == 'mytorrents')
{
    
$extraqueries " AND t.owner = ".sqlesc($CURUSER['id']);
    
$pagelinks[] = "special_search=mytorrents";
    
$sqfield "&special_search=mytorrents";
    
$showvisible false;
}
elseif (
$special_search == 'weaktorrents')
{
    
$extraqueries " AND t.visible = 'no' OR (t.leechers > 0 AND t.seeders = 0) OR (t.leechers = 0 AND t.seeders = 0)";
    
$pagelinks[] = "special_search=weaktorrents";
    
$sqfield "&special_search=weaktorrents";
    
$showvisible false;
    
$lang->browse['btitle'] = $lang->global['weaktorrents'];
}
elseif (
$do == 'search')
{
    
$extraquery = array();
    
$keywords = isset($_POST['keywords']) ? $_POST['keywords'] : (isset($_GET['keywords']) ? $_GET['keywords'] : '');
    if (
$_GET['tags'] AND $_GET['tags'] == 'true' AND !empty($keywords))
    {
        
$keywords urldecode($keywords);
    }
    elseif (!empty(
$keywords))
    {
        
$keywords trim($keywords);
    }
    
$category = isset($_POST['category']) ? intval($_POST['category']) : (isset($_GET['category']) ? intval($_GET['category']) : 0);
    
$search_type = isset($_POST['search_type']) ? trim($_POST['search_type']) : (isset($_GET['search_type']) ? trim($_GET['search_type']) : '');

    
$query sql_query("SHOW VARIABLES LIKE 'ft_min_word_len';");
    
$array mysql_fetch_assoc($query);
    
$min_length $array['Value'];
    if(
is_numeric($min_length))
    {
        
$minsearchword $min_length;
    }
    else
    {
        
$minsearchword 3;
    }

    if (
strlen($keywords) >= $minsearchword && !empty($search_type))
    {
        switch (
$search_type)
        {
            case 
't_name':
                
$extraquery[] = "(MATCH (t.name) AGAINST ('".mysql_real_escape_string($keywords)."*' IN BOOLEAN MODE))";
                break;
            case 
't_description':
                
$extraquery[] = "(MATCH (t.descr) AGAINST ('".mysql_real_escape_string($keywords)."*' IN BOOLEAN MODE))";
                break;
            case 
't_both':
                
$extraquery[] = "(MATCH (t.name,t.descr) AGAINST ('".mysql_real_escape_string($keywords)."*' IN BOOLEAN MODE))";
                break;
            case 
't_uploader':
                
$query sql_query("SELECT id FROM users WHERE username = ".sqlesc($keywords)." LIMIT 1");
                if (
mysql_num_rows($query) > 0)
                {
                    
$user mysql_fetch_assoc($query);
                    
$extraquery[] = "t.owner = ".sqlesc($user['id']).(!$is_mod " AND t.anonymous != 'yes'" "");
                }
                else
                    
$extraquery[] = "t.owner = ".sqlesc($keywords);
                break;
            case 
't_genre':
                
$extraquery[] = "(MATCH (t.t_link) AGAINST ('".mysql_real_escape_string($keywords)."*' IN BOOLEAN MODE))";
            break;
        }
    }
    else
    {
        
$javaalert '
        <script type="text/javascript">
            alert("'
.sprintf($lang->browse['serror'], $minsearchword).'");
        </script>
        '
;
    }
    if (
is_valid_id($category) && $category 0)
    {
        
$extraquery[] = "t.category = ".$category;
    }
    if (
count($extraquery) > 0)
    {
        
$extraqueries ' AND ';
        
$extraqueries .= implode(' AND '$extraquery);
        
$pagelinks[] = 'do=search';
        
$pagelinks[] = 'keywords='.urlencode(htmlspecialchars_uni($keywords));
        
$pagelinks[] = 'category='.$category;
        
$pagelinks[] = 'search_type='.urlencode(htmlspecialchars_uni($search_type));
        
$showvisible false;
    }
}
elseif (isset(
$_GET['category']) && is_valid_id($_GET['category']) && empty($quick_search))
{
    
$category intval($_GET['category']);
    
$query sql_query("SELECT id FROM categories WHERE type='s' AND pid = $category");
    if (
mysql_num_rows($query) > 0)
    {
        
$squerycats=array();
        while (
$squery=mysql_fetch_assoc($query))
        {
            
$squerycats[] = $squery['id'];
        }
        
$extraqueries ' AND t.category IN ('.$category.','.implode(','$squerycats).')';
    }
    else
    {
        
$extraqueries ' AND t.category = '.$category;
    }
    
$pagelinks[] = 'category='.$category;
}
elseif (!empty(
$quick_search))
{
    
$category = isset($_POST['category']) ? intval($_POST['category']) : (isset($_GET['category']) ? intval($_GET['category']) : '');
    switch(
$quick_search)
    {
        case 
'show_daily_torrents':
            
$stime TIMENOW-(60*60*24); // daily
            
$extraquery[] = "UNIX_TIMESTAMP(t.added) > '$stime'";
            
$pagelinks[] = 'quick_search=show_daily_torrents';
            break;
        case 
'show_weekly_torrents':
            
$stime TIMENOW-(60*60*(24*7)); // weekly
            
$extraquery[] = "UNIX_TIMESTAMP(t.added) > '$stime'";
            
$pagelinks[] = 'quick_search=show_today_torrents';
            break;
        case 
'show_montly_torrents':
            
$stime TIMENOW-(60*60*(24*28)); // montly
            
$extraquery[] = "UNIX_TIMESTAMP(t.added) > '$stime'";
            
$pagelinks[] = 'quick_search=show_today_torrents';
            break;
        case 
'show_dead_torrents':
            
$showvisible false;
            
$extraquery[] = "t.visible = 'no'";
            
$pagelinks[] = 'quick_search=show_dead_torrents';
            break;
        case 
'show_recommend_torrents':
            
$extraquery[] = "t.sticky = 'yes'";
            
$pagelinks[] = 'quick_search=show_recommend_torrents';
            break;
        case 
'show_free_torrents':
            
$extraquery[] = "t.free = 'yes'";
            
$pagelinks[] = 'quick_search=show_free_torrents';
            break;
        case 
'show_silver_torrents':
            
$extraquery[] = "t.silver = 'yes'";
            
$pagelinks[] = 'quick_search=show_silver_torrents';
            break;
        case 
'show_doubleupload_torrents':
            
$extraquery[] = "t.doubleupload = 'yes'";
            
$pagelinks[] = 'quick_search=show_doubleupload_torrents';
            break;
        case 
'show_external_torrents':
            
$extraquery[] = "t.ts_external = 'yes'";
            
$pagelinks[] = 'quick_search=show_external_torrents';
            break;
        case 
'show_scene_torrents':
            
$extraquery[] = "t.isScene > 0";
            
$pagelinks[] = 'quick_search=show_scene_torrents';
            break;
    }
    if (
$category 0)
    {
        
$extraquery[] = 't.category IN ('.$category.')';
        
$pagelinks[] = 'category='.$category;
    }
    if (
count($extraquery) > 0)
    {
        
$extraqueries ' AND ';
        
$extraqueries .= implode(' AND '$extraquery);
    }
}

if (
$usergroups['isvipgroup'] != 'yes' && !$is_mod && $waitsystem == 'yes')
{
    include_once(
INC_PATH.'/readconfig_waitslot.php');
    
$gigs $CURUSER['uploaded'] / (1024*1024*1024);
    
$ratio = (($CURUSER['downloaded'] > 0) ? ($CURUSER['uploaded'] / $CURUSER['downloaded']) : 0);
    if (
$waitsystemtype == 1)
    {
      if (
$ratio $ratio1 || $gigs $upload1$wait $delay1;
        elseif (
$ratio $ratio2 || $gigs $upload2$wait $delay2;
            elseif (
$ratio $ratio3 || $gigs $upload3$wait $delay3;
                elseif (
$ratio $ratio4 || $gigs $upload4$wait $delay4;
                    else 
$wait 0;
    }
    else
    {
      
$wait $usergroups['waitlimit'];
    }
}
else
{
    
$wait '';
}

stdhead($lang->browse['btitle'],true,'supernote'$javaalert);
$_freelechmod $_silverleechmod $_x2mod false;
include(
TSDIR.'/'.$cache.'/freeleech.php');
include(
INC_PATH.'/readconfig_kps.php');
if (
$__F_START get_date_time() && $__F_END get_date_time())
{
    switch(
$__FLSTYPE)
    {
        case 
'freeleech';
            
$___notice show_notice(sprintf($lang->browse['f_leech'], $__F_START$__F_END),false,$lang->browse['f_leech_h']);
            
$_freelechmod true;
        break;
        case 
'silverleech';
            
$___notice show_notice(sprintf($lang->browse['s_leech'], $__F_START$__F_END),false,$lang->browse['s_leech_h']);
            
$_silverleechmod true;
        break;
        case 
'doubleupload';
            
$___notice show_notice(sprintf($lang->browse['d_leech'], $__F_START$__F_END),false,$lang->browse['d_leech_h']);
            
$_x2mod true;
        break;
    }
}
elseif (
$bdayreward == 'yes' AND $bdayrewardtype)
{
    
$curuserbday explode('-'$CURUSER['birthday']);
    if (
date('j-n') === $curuserbday[0].'-'.$curuserbday[1])
    {
        switch (
$bdayrewardtype)
        {
            case 
'freeleech';
                
$___notice show_notice(sprintf($lang->browse['f_leech'], $curuserbday[0].'-'.$curuserbday[1].'-'.date('Y'), ($curuserbday[0] + 1).'-'.$curuserbday[1].'-'.date('Y')),false,$lang->browse['f_leech_h']);
            break;
            case 
'silverleech';
                
$___notice show_notice(sprintf($lang->browse['s_leech'], $curuserbday[0].'-'.$curuserbday[1].'-'.date('Y'), ($curuserbday[0] + 1).'-'.$curuserbday[1].'-'.date('Y')),false,$lang->browse['s_leech_h']);
            break;
            case 
'doubleupload';
                
$___notice show_notice(sprintf($lang->browse['d_leech'], $curuserbday[0].'-'.$curuserbday[1].'-'.date('Y'), ($curuserbday[0] + 1).'-'.$curuserbday[1].'-'.date('Y')),false,$lang->browse['d_leech_h']);
            break;
        }
    }
}

require(
TSDIR.'/'.$cache.'/categories.php');
$subcategories = array();
$searcincategories = array();
if (
count($_categoriesS) > 0)
{
    foreach (
$_categoriesS as $sc)
    {
        
$sc['name'] = htmlspecialchars_uni($sc['name']);
        
$searcincategories[] = $sc['id'];
        
$seolink ts_seo($sc['id'],$sc['name'],'c');
        
$scdesc htmlspecialchars_uni($sc['cat_desc']);
        
$subcategories[$sc['pid']][] = '<font class="main"><a href="'.$seolink.'" target="_self" alt="'.$scdesc.'" title="'.$scdesc.'" />'.(isset($category) && $category == $sc['id'] || strpos($CURUSER['notifs'], '[cat'.$sc['id'].']') !== FALSE '<span style="background-color: rgb( 149, 206, 145);">'.$sc['name'].'</span>' $sc['name']).'</a></font>';
    }
}

$count 0;
$categories '
<table width="100%" border="1" cellspacing="0" cellpadding="5" align="center">
    <tr>
        <td class="thead">'
.ts_collapse('cats').'
            <div align="center">
                <strong>
                    '
.$lang->browse['tcategory'].'
                </strong>
            </div>
        </td>
    </tr>
        '
.ts_collapse('cats',2).'
    <tr>
        <td align="center">
            <table border="0" cellspacing="0" cellpadding="0" align="center">
                <tr class="none">
'
;

if ((
$rows count($_categoriesC)) > 0)
{
    foreach (
$_categoriesC as $c)
    {
        
$searcincategories[] = $c['id'];
        if (
$count && $count == 0)
        {
            
$categories .= '</tr><tr class="none">';
        }
        
$seolink ts_seo($c['id'],$c['name'],'c');
        
$cname htmlspecialchars_uni($c['name']);
        
$cdesc htmlspecialchars_uni($c['cat_desc']);
        
$categories .= '
        <td class="none">
            <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="1" class="none" height="12" valign="top" align="center" style="padding: 3px;">
                        <a href="'
.$seolink.'" target="_self" /></a>
                    </td>
                    <td width="200" class="none" valign="top" align="left" style="padding-left: 7px; padding-top: 3px; padding-right: 3px;">
                        <font class="cat_link" style="font-size: 16px;"><a href="'
.$seolink.'" target="_self" alt="'.$cdesc.'" title="'.$cdesc.'" /><b>'.(isset($category) && $category == $c['id'] || strpos($CURUSER['notifs'], '[cat'.$c['id'].']') !== FALSE '<span style="background-color: rgb( 149, 206, 145);">'.$cname.'</span>' $cname).'</b></a></font>
                        '
.($subcategories[$c['id']] ? implode(', '$subcategories[$c['id']]) : '').'
                    </td>
                </tr>
            </table>
        </td>'
;
        
$count++;
    }
}

$categories .= '
    </tr></table></td></tr></table><p></p>'
;

if (
preg_match("#\[cat.+#i"$CURUSER['notifs']) AND count($extraquery) == AND count($pagelinks) == 0)
{
    
$defaultcategories = array();
    foreach (
$searcincategories as $catid)
    {
        if (
strpos($CURUSER['notifs'], '[cat'.$catid.']') !== FALSE)
        {
            
$defaultcategories[] = $catid;
        }
    }
    if (
count($defaultcategories) > 0)
    {
        
$extraqueries ' AND t.category IN ('.implode(','$defaultcategories).')';
    }
}

require_once(
INC_PATH.'/functions_category.php');
$catdropdown ts_category_list('category',(isset($category) ? $category ''),'<option value="0" style="color: gray;">'.$lang->browse['alltypes'].'</option>');

$search '
<script type="text/javascript" src="'
.$BASEURL.'/scripts/prototype.js?v='.O_SCRIPT_VERSION.'"></script>
<script type="text/javascript" src="'
.$BASEURL.'/ratings/js/scriptaculous.js?v='.O_SCRIPT_VERSION.'"></script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/autocomplete.js?v='.O_SCRIPT_VERSION.'"></script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/quick_torrents.js?v='.O_SCRIPT_VERSION.'"></script>

<table width="100%" border="1" cellspacing="0" cellpadding="5" align="center">
    <tr>
        <td class="thead">'
.ts_collapse('cats_search').'
            <div align="center">
                <strong>
                    '
.$lang->browse['tsearch'].'
                </strong>
            </div>
        </td>    '
.ts_collapse('cats_search',2).'
    </tr>
    <tr>
        <td align="right">
            <form method="post" action="'
.$_SERVER['SCRIPT_NAME'].'?">
            <input type="hidden" name="do" value="search" />
            '
.$lang->browse['bykeyword'].' <input type="text" id="auto_keywords" autocomplete="off" name="keywords" size="40" value="'.(isset($keywords) ? htmlspecialchars_uni($keywords) : '').'" />
            <script type="text/javascript">
                new AutoComplete(\'auto_keywords\', \'ts_ajax.php?action=autocomplete&type=torrent&field=name&keyword=\', { delay: 0.25, resultFormat: AutoComplete.Options.RESULT_FORMAT_TEXT });
            </script>
            <select name="search_type">
                <option value="t_name"'
.($search_type == 't_name' ' selected="selected"' '').'>'.$lang->browse['t_name'].'</option>
                <option value="t_description"'
.($search_type == 't_description' ' selected="selected"' '').'>'.$lang->browse['t_description'].'</option>
                <option value="t_both"'
.($search_type == 't_both' ' selected="selected"' '').'>'.$lang->browse['t_both'].'</option>
                <option value="t_uploader"'
.($search_type == 't_uploader' ' selected="selected"' '').'>'.$lang->browse['t_uploader'].'</option>
                <option value="t_genre"'
.($search_type == 't_genre' ' selected="selected"' '').'>'.$lang->browse['t_genre'].'</option>
            </select>
            '
.$lang->browse['in'].'
                '
.$catdropdown.'
            <input type="image" class="none" style="vertical-align: middle;" src="'
.$BASEURL.'/'.$pic_base_url.'torrent_search.gif" alt="'.$lang->browse['tsearch'].'" />
            </form>
        <p align="center">
            <form method="post" action="'
.$_SERVER['SCRIPT_NAME'].'?advanced_search">
            '
.$lang->browse['sastype'].'
            <select name="quick_search">
                <option value="show_daily_torrents"'
.($quick_search == 'show_daily_torrents' ' selected="selected"' '').'>'.$lang->browse['show_daily_torrents'].'</option>
                <option value="show_weekly_torrents"'
.($quick_search == 'show_weekly_torrents' ' selected="selected"' '').'>'.$lang->browse['show_weekly_torrents'].'</option>
                <option value="show_montly_torrents"'
.($quick_search == 'show_montly_torrents' ' selected="selected"' '').'>'.$lang->browse['show_montly_torrents'].'</option>
                <option value="show_dead_torrents"'
.($quick_search == 'show_dead_torrents' ' selected="selected"' '').'>'.$lang->browse['show_dead_torrents'].'</option>
                <option value="show_recommend_torrents"'
.($quick_search == 'show_recommend_torrents' ' selected="selected"' '').'>'.$lang->browse['show_recommend_torrents'].'</option>
                <option value="show_free_torrents"'
.($quick_search == 'show_free_torrents' ' selected="selected"' '').'>'.$lang->browse['show_free_torrents'].'</option>
                <option value="show_silver_torrents"'
.($quick_search == 'show_silver_torrents' ' selected="selected"' '').'>'.$lang->browse['show_silver_torrents'].'</option>
                <option value="show_doubleupload_torrents"'
.($quick_search == 'show_doubleupload_torrents' ' selected="selected"' '').'>'.$lang->browse['show_double_upload_torrents'].'</option>
                <option value="show_external_torrents"'
.($quick_search == 'show_external_torrents' ' selected="selected"' '').'>'.$lang->browse['show_external_torrents'].'</option>
                <option value="show_scene_torrents"'
.($quick_search == 'show_scene_torrents' ' selected="selected"' '').'>'.$lang->browse['scene4'].'</option>
            </select>
            '
.$lang->browse['in'].'
                '
.$catdropdown.'
            <input type="image" class="none" style="vertical-align: middle;" src="'
.$BASEURL.'/'.$pic_base_url.'torrent_search.gif" alt="'.$lang->browse['tsearch'].'" />
            </form>
        </p>
        <p align="center"><span style="float: right;"><img src="'
.$BASEURL.'/'.$pic_base_url.'ajax-loader.gif" alt="" title="" border="0" id="loadingimg" class="inlineimg" name="loadingimg" style="display: none" /> [<a href="#TSShowLatestTorrents" onclick="TSShowTorrents(\'new\'); return false;">'.$lang->browse['show_latest'].'</a>] [<a href="#TSShowLatestTorrents" onclick="TSShowTorrents(\'sticky\'); return false;">'.$lang->browse['show_recommend_torrents'].'</a>] [<a href="#TSShowLatestTorrents" onclick="TSShowTorrents(\'free\'); return false;">'.$lang->browse['show_free_torrents'].'</a>] [<a href="#TSShowLatestTorrents" onclick="TSShowTorrents(\'silver\'); return false;">'.$lang->browse['show_silver_torrents'].'</a>]</span></p>
        </td>
    </tr>
</table>
<div id="quickedit" name="quickedit"></div>
'
;

$orderbyvalue 'ORDER by t.sticky, t.added DESC';
if ((isset(
$_POST['sort_order']) AND $_POST['sort_order'] == 'yes') OR (isset($_GET['sort_order']) AND $_GET['sort_order'] == 'yes'))
{
    
$allowedsortbys = array('added','numfiles','comments','seeders','leechers','size','times_completed','owner','sticky');
    if (
$torrentspeed == 'yes')
    {
        
$allowedsortbys array_merge($allowedsortbys, array('totalspeed'));
    }
    
$sortby = isset($_POST['sortby']) && in_array($_POST['sortby'], $allowedsortbys) ? trim($_POST['sortby']) : (isset($_GET['sortby']) && in_array($_GET['sortby'], $allowedsortbys) ? trim($_GET['sortby']) : '');
    
$allowedorderbys = array('DESC''ASC');
    
$orderby = isset($_POST['orderby']) && in_array($_POST['orderby'], $allowedorderbys) ? trim($_POST['orderby']) : (isset($_GET['orderby']) && in_array($_GET['orderby'], $allowedorderbys) ? trim($_GET['orderby']) : '');
    
$orderbyvalue 'ORDER by '.($sortby != 'totalspeed' 't.' '').$sortby.' '.$orderby;

    if (!empty(
$sortby) OR !empty($orderby))
    {
        
$pagelinks2 = array();
        
$pagelinks2[] = 'sort_order=yes';
        
$pagelinks2[] = 'sortby='.htmlspecialchars_uni($sortby);
        
$pagelinks2[] = 'orderby='.htmlspecialchars_uni($orderby);
    }
}

$from = !empty($from) ? $from 'FROM torrents t';
$showtorrents = array();
$query sql_query("SELECT t.id, c.vip {$from} LEFT JOIN categories c ON (t.category=c.id) WHERE ".($showvisible "t.visible = 'yes' AND " "").(preg_match('#E0#is'$CURUSER['options']) ? "t.offensive = 'no' AND " "").($usergroups['canviewviptorrents'] != 'yes' "c.vip = 'no' AND " "")."t.banned = 'no'".(isset($extraqueries) ? $extraqueries '')) or sqlerr(__FILE__,__LINE__);
$count mysql_num_rows($query);
$torrentsperpage = ($CURUSER['torrentsperpage'] <> intval($CURUSER['torrentsperpage']) : $ts_perpage);
list(
$pagertop$pagerbottom$limit) = pager($torrentsperpage$count$_SERVER['SCRIPT_NAME'].'?'.(isset($pagelinks) && count($pagelinks) > implode('&'$pagelinks).'&' '').(isset($pagelinks2) && count($pagelinks2) > implode('&'$pagelinks2).'&' ''));
$groupby $torrentspeed == 'yes' ' GROUP by t.id ' '';

$query sql_query("SELECT ".($torrentspeed == 'yes' '(t.size * t.times_completed + SUM(p.downloaded)) / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(t.added)) AS totalspeed,' '')." t.*, c.id as categoryid, c.image, c.name as categoryname, c.vip as isviptorrent, u.username, g.namestyle {$from} LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) ".($torrentspeed == 'yes' 'LEFT JOIN peers p ON (t.id=p.torrent)' '')." WHERE ".($showvisible "t.visible = 'yes' AND " "")."t.banned = 'no'".(isset($extraqueries) ? $extraqueries '').{$groupby}{$orderbyvalue} $limit") or sqlerr(__FILE__,__LINE__);

if (
$progressbar == 'yes')
{
    include_once(
INC_PATH.'/functions_external.php');
}

$contentheader = ($is_mod '
<script type="text/javascript">
    function check_it(wHAT)
    {
        if (wHAT.value == "move")
        {
            document.getElementById("movetorrent").style.display = "block";
        }
        else
        {
            document.getElementById("movetorrent").style.display = "none";
        }
    }
</script>
<form method="post" action="'
.$BASEURL.'/admin/index.php?act=manage_torrents" name="manage_torrents">
<input type="hidden" name="do" value="update" />
<input type="hidden" name="return" value="yes" />
<input type="hidden" name="return_address" value="'
.$_SERVER['SCRIPT_NAME'].'?page='.intval(isset($_GET['page']) ? $_GET['page'] : 0).'&'.(isset($pagelinks) && count($pagelinks) > implode('&'$pagelinks).'&' '').(isset($pagelinks2) && count($pagelinks2) > implode('&'$pagelinks2) : '').'" />
'').'
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td class="thead" align="center" style="padding: 10px 0 0 0;"><b>'
.$lang->browse['type'].'</b></td>
        <td class="thead" align="left" style="padding: 10px 0 0 0;">&nbsp;<b>'
.$lang->browse['t_name'].'</b></td>
        <td class="thead" align="center" style="padding: 10px 0 0 0;"><b>Staff</b></td>
        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/files.gif" border="0" class="inlineimg"></td>
        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/comments.gif" border="0" class="inlineimg"></td>
        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/feltoltok.png" border="0" class="inlineimg"></td>
        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/letoltok.png" border="0" class="inlineimg"></td>
        '
.($progressbar == 'yes' '<td class="thead" align="center" style="padding: 10px 0 0 0;"><b>'.$lang->global['avprogress'].'</b></td>' '').'
        '
.($torrentspeed == 'yes' '<td class="thead" align="center" style="padding: 10px 0 0 0;"><b>'.$lang->global['speed'].'</b></td>' '').'
        <td class="thead" align="center" style="padding: 10px 0 0 0;"><b>'
.$lang->global['size'].'</b> / <b>'.$lang->global['snatched'].'</b></td>
        <td class="thead" align="center" style="padding: 10px 0 0 0;"><b>'
.$lang->global['uploader'].'</b></td>
        '
.($is_mod '<td class="thead" align="center" style="padding: 10px 0 0 0;"><input checkall="group1" onclick="javascript: return select_deselectAll (\'manage_torrents\', this, \'group1\');" type="checkbox" /></td>' '').'
    </tr>
'
;

$__colspan 12;
(
$progressbar != 'yes' $__colspan-- : '');
(
$torrentspeed != 'yes' $__colspan-- : '');
(!
$is_mod $__colspan-- : '');
$contentmiddle $menu_nav '';
require_once(
INC_PATH.'/functions_mkprettytime.php');
if (
mysql_num_rows($query) > 0)
{
    require_once(
INC_PATH.'/functions_imdb_rating.php');
    while (
$torrents mysql_fetch_assoc($query))
    {
        if ((
$torrents['offensive'] == 'yes' && preg_match('#E0#is'$CURUSER['options'])) OR ($usergroups['canviewviptorrents'] != 'yes' && $torrents['isviptorrent'] == 'yes'))
        {
            continue;
        }

        
$showupdatebutton=true;

        if (
time() - $torrents['ts_external_lastupdate'] < (TS_TIMEOUT*4))
        {
            
$showupdatebutton=false;
        }

        
$showwait=$elapsed=$color='';

        if (
$wait 0)
        {
            
$elapsed floor((strtotime(date('Y-m-d H:i:s')) - strtotime($torrents['added'])) / 3600);
            if (
$elapsed $wait AND $torrents['ts_external'] != 'yes')
            {
                 
$color dechex(floor(127*($wait $elapsed)/48 128)*65536);
                 
$showwait "<span style='float: right'><a href=\"$BASEURL/faq.php#46\"><font color=\"$color\">" number_format($wait $elapsed) . " h</font></a></span>";
            }
        }

        
$orj_name_ $torrents['name'];
        
$torrents['name'] = htmlspecialchars_uni($torrents['name']);
        
$torrents['genre'] = htmlspecialchars_uni($torrents['genre']);
        
$genre $torrents['genre'];
        
$uploader='<a href="#" id="torrentuser'.$torrents['owner'].$torrents['id'].'">'.get_user_color($torrents['username'], $torrents['namestyle']).'</a>';
        
$disable_user_menu=false;

        if (
$torrents['anonymous'] == 'yes')
        {
            if (
$torrents['owner'] != $CURUSER['id'] && !$is_mod)
            {
                
$uploader $lang->global['anonymous'];
                
$disable_user_menu=true;
            }
            else
            {
                
$uploader $uploader.''.$lang->global['anonymous'];
            }
        }

        
$isScene '';

        if (
$torrents['isScene'] > 0)
        {
            
$isScene sprintf($lang->browse['scene3'], mkprettytime($torrents['isScene']));
        }

        
$seolink ts_seo($torrents['categoryid'],$torrents['categoryname'],'c');
        
$seolink2 ts_seo($torrents['id'],$torrents['name'],'s');
        
$seolink3 ts_seo($torrents['id'],$torrents['name'],'d');

        
$downloadinfo sprintf($lang->browse['downloadinfo'], $torrents['name']);
        
$categoryinfo sprintf($lang->browse['categoryinfo'], $torrents['categoryname']);
        
$sratio $torrents["leechers"] > $torrents["seeders"] / $torrents["leechers"] : 1;
        
$lratio $torrents["seeders"] > $torrents["leechers"] / $torrents["seeders"] : 1;

        
$torrent_files '<b>'.($torrents['numfiles'] > '<a href="'.$BASEURL.'/details.php?id='.$torrents['id'].'&tab=filelist">' '').ts_nf($torrents['numfiles']).($torrents['numfiles'] > '</a>' '').'</b>';

        
$torrent_seeders = ($torrents['ts_external'] == 'no' '<font color="'.get_slr_color($sratio).'">'.($torrents['seeders'] > && $usergroups['canpeers'] == 'yes' '<a href="'.$BASEURL.'/details.php?id='.$torrents['id'].'&tab=peers">' '').'<b>'.ts_nf($torrents['seeders']).'</b>'.($torrents['seeders'] > && $usergroups['canpeers'] == 'yes' '</a>' '').'</font>' '<b>'.ts_nf($torrents['seeders']).'</b>');

        
$torrent_leechers = ($torrents['ts_external'] == 'no' '<font color="'.get_slr_color($lratio).'">'.($torrents['leechers'] > && $usergroups['canpeers'] == 'yes' '<a href="'.$BASEURL.'/details.php?id='.$torrents['id'].'&tab=peers">' '').'<b>'.ts_nf($torrents['leechers']).'</b>'.($torrents['leechers'] > && $usergroups['canpeers'] == 'yes' '</a>' '').'</font>' '<b>'.ts_nf($torrents['leechers']).'</b>');

        
$torrents['times_completed'] = ($torrents['ts_external'] == 'yes' && $torrents['seeders'] > && $torrents['times_completed'] == $torrents['seeders'] : $torrents['times_completed']);
        
$torrent_snatched = ($torrents['ts_external'] == 'no' && $torrents['times_completed'] > && $usergroups['cansnatch'] == 'yes' sprintf($lang->browse['info3'], '<a href="'.$BASEURL.'/viewsnatches.php?id='.$torrents['id'].'"><b>'.ts_nf($torrents['times_completed']).'</b></a>') : sprintf($lang->browse['info3'], '<b>'.ts_nf($torrents['times_completed']).'</b>'));
        
$torrent_comments = ($torrents['comments'] > '<a href="'.$BASEURL.'/details.php?id='.$torrents['id'].'&tab=comments">' '').'<b>'.ts_nf($torrents['comments']).'</b>'.($torrents['comments'] > '</a>' '');

        
$isnew = ($torrents['added'] > $CURUSER['last_login'] ? '<img src="'.$BASEURL.'/'.$pic_base_url.'new.png" class="inlineimg" alt="'.$lang->browse['newtorrent'].'" title="'.$lang->browse['newtorrent'].'" />' '');
        
$isfree = ($torrents['free'] == 'yes' || ($_freelechmod && $torrents['ts_external'] != 'yes') ? '<img src="'.$BASEURL.'/'.$pic_base_url.'freedownload.gif" class="inlineimg" alt="'.$lang->browse['freedownload'].'" title="'.$lang->browse['freedownload'].'" />' '');
        
$issilver = ($torrents['silver'] == 'yes' || ($_silverleechmod && $torrents['ts_external'] != 'yes') ? '<img src="'.$BASEURL.'/'.$pic_base_url.'silverdownload.gif" class="inlineimg" alt="'.$lang->browse['silverdownload'].'" title="'.$lang->browse['silverdownload'].'" />' '');
        
$isrequest = ($torrents['isrequest'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'isrequest.gif" class="inlineimg" alt="'.$lang->browse['requested'].'" title="'.$lang->browse['requested'].'" />' '');
        
$isnuked = ($torrents['isnuked'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'isnuked.gif" class="inlineimg" alt="'.sprintf($lang->browse['nuked'], $torrents['WhyNuked']).'" title="'.sprintf($lang->browse['nuked'], $torrents['WhyNuked']).'" />' '');
        
$issticky = ($torrents['sticky'] == 'yes' '<img src="'.$BASEURL.'/'.$pic_base_url.'sticky.gif" alt="'.$lang->browse['sticky'].'" title="'.$lang->browse['sticky'].'" />' '');
        
$isexternal = ($torrents['ts_external'] == 'yes' && $showupdatebutton "<a href=\"#showtorrent".$torrents['id']."\" onclick=\"UpdateExternalTorrent('./include/ts_external_scrape/ts_update.php','id=".$torrents['id']."&ajax_update=true',".$torrents['id'].")\"><img src='".$BASEURL."/".$pic_base_url."external.gif' border='0' alt='".$lang->browse['update']."' title='".$lang->browse['update']."' class='inlineimg' /></a>" : (isset($_GET['tsuid']) && $_GET['tsuid'] == $torrents['id'] ? "<img src='".$BASEURL."/".$pic_base_url."input_true.gif' border='0' alt='".$lang->browse['updated']."' title='".$lang->browse['updated']."' />" ""));
        
$isdoubleupload = ($torrents['doubleupload'] == 'yes' || ($_x2mod && $torrents['ts_external'] != 'yes') ? '<img src="'.$BASEURL.'/'.$pic_base_url.'x2.gif" alt="'.$lang->browse['dupload'].'" title="'.$lang->browse['dupload'].'" class="inlineimg" />' '');
        
$javascript_tname addslashes(htmlspecialchars($torrents['name']));
        
$torrents['name'] = cutename($orj_name_,60);
        
$torrent_image '<a href="'.$seolink.'" target="_self" /><img src="'.$BASEURL.'/'.$pic_base_url.$table_cat.'/'.$torrents['image'].'" border="0" alt="'.$categoryinfo.'" title$categoryinfo.'" /></a>';
        
$imagineat=htmlspecialchars_uni($torrents['t_image']);
$name_torrent = '<a href="'.$seolink2.'" onmouseover="return overlib(\'<table width=100%><tr><td><img src='.$imagineat.' width=150 height=200></td></tr></table>\',  WIDTH, 150, DELAY, 100);" onmouseout="return nd();"><b>'.$torrents['name']).'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>';
        if (
$torrents['moderated'] == 'yes'){
            
$torrent_download_link = (!$is_bookmarked_page '<a href="'.$seolink3.'" title="'.$downloadinfo.'" alt="'.$downloadinfo.'" '.$warnexternal.'><img src="../pic/yes.png"></a>' '<a href="'.$BASEURL.'/bookmarks.php?torrentid='.$torrents['id'].'&action=delete" title="" alt="" /><img src="'.$BASEURL.'/'.$pic_base_url.'delete.gif"></a>');
            }
        if (
$torrents['moderated'] == 'error'){
            
$torrent_download_link = (!$is_bookmarked_page '<img src="../pic/bad.png" width="20" height="20" title="Hibás feltöltés, javítás alatt!">' '');
            }
        if (
$torrents['moderated'] == 'no'){
            
$torrent_download_link = (!$is_bookmarked_page '<img src="../pic/um.png" width="20" height="20" title="Ez a torrent még nincs moderálva!">' '');
            }
        if (
$progressbar == 'yes')
        {
            
$shareratio = ($torrents['seeders'] == : ($torrents['leechers'] == 100 sprintf("%.2f", ($torrents['seeders'] / $torrents['leechers']) * 100)));
            
$health ts_external_share_ratio($shareratio);
            
$torrent_info '<td align="center">'.$health.'</td>';
        }

        if (
$torrentspeed == 'yes')
        {
            if (
$torrents['ts_external'] == 'yes')
            {
                
$speed $lang->browse['external'];
            }
            else
            {
                if (
$torrents['seeders'] > && $torrents['leechers'] > 0)
                {
                    
$speed mksize($torrents['totalspeed']) . '/s';
                }
                else
                {
                    
$speed $lang->browse['notraffic'];
                }
            }
            
$speed '<td align="center">'.$speed.'</td>';
        }

        
$torrents['size'] = mksize($torrents['size']);

        
$ShowImdb=false;
        if (
$IMDBRating TSSEGetIMDBRatingImage($torrents['t_link']))
        {
            
$ShowImdb=true;
        }

        
$TorrentAdded '&nbsp;<b>'.$lang->global['added'].':</b> '.my_datee($dateformat$torrents['added']).' '.my_datee($timeformat$torrents['added']).($ShowImdb '<font color=#790000><b>IMDb:</b></font>&nbsp;'.$IMDBRating['image'].' '.$IMDBRating['rating'] : '').('&nbsp;&nbsp;<font color=black><b>Mûfaj:&nbsp; '.$genre.'</b></font>');

/**
 * @author mmisu120000
 * @copyright 2010
 * @mod name Show torrents by day
 * @version v1.1
 */

/** Make some date varibles **/
$day_added $torrents['added'];
$day_show strtotime($day_added);
$thisdate date('Y-m-d',$day_show);

/** If date already exist, disable $cleandate varible **/
if($thisdate==$prevdate){
$cleandate '';

/** If date does not exist, make some varibles **/
}else{
$day_added 'Torrent feltöltve:  '.my_datee($dateformat$torrents['added']); // You can change this to something else
$cleandate "<tr><td align = 'center' style='background-color: #999999; color: black;' colspan=15><b>$day_added</b></td></tr>\n"// This also...
}
/** Prevent that "torrents added..." wont appear again with the same date **/
$prevdate $thisdate;

/** If torrents not listed by added date **/

if ($torrents["sticky"] == "no")
if(!
$_GET['sort'] && !$_GET['d']){
   
$zzzzzz $cleandate;
}
        
$contentmiddle .= $zzzzzz '
        <tr'
.($torrents['sticky'] == 'yes' ' class="sticky"' '').'>





            <td width="1">'
.$torrent_image.'</td>
            <td align="left">'
.$showwait.'<a name="#showtorrent'.$torrents['id'].'"></a>&nbsp;'.$name_torrent.$TorrentAdded.($isScene '&nbsp;'.$isScene '').'</td>
            <td align="center">'
.$torrent_download_link.'</td>
            <td align="center">'
.$torrent_files.'</td>
            <td align="center">'
.$torrent_comments.'</td>
            <td align="center"><div id="seeders_'
.$torrents['id'].'">'.$torrent_seeders.'</div></td>
            <td align="center"><div id="leechers_'
.$torrents['id'].'">'.$torrent_leechers.'</div></td>
            '
.$torrent_info.'
            '
.$speed.'
            <td align="center">'
.$torrents['size'].''.$torrent_snatched.'</td>
            <td align="center">'
.$uploader.'</td>
            '
.($is_mod '
            <td align="center"><input type="checkbox" name="torrentid[]" value="'
.$torrents['id'].'" checkme="group1" /></td>' '').'
        </tr>'
;

        
$menu_nav .= ($UseQuickMenu '
        <script type="text/javascript">
            menu_register("torrentmenu'
.$torrents['id'].'", true);
        </script>
        <div id="torrentmenu'
.$torrents['id'].'_menu" class="menu_popup" style="display:none;">
            <table border="1" cellspacing="0" cellpadding="2">
                <tr>
                    <td colspan="2" align="center" class="thead"><b>'
.$lang->global['quickmenu'].'</b></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$seolink3.'" title="'.$downloadinfo.'" alt="'.$downloadinfo.'"'.$warnexternal.' /><b>'.$lang->browse['download'].'</b></a></td>
                    <td rowspan="'
.($is_mod 3).'" align="center" valign="middle"><div align="center">'.(!empty($torrents['t_image']) ? '<a href="javascript:popImage(\''.htmlspecialchars_uni($torrents['t_image']).'\',\'Image Preview\')"><span class="smalltext">'.$lang->browse['t_image'].'</span></a><img src="'.htmlspecialchars_uni($torrents['t_image']).'" border="0" height="150" width="150" alt="'.strip_tags($torrents['name']).'" title="'.strip_tags($torrents['name']).'" \>' $lang->browse['nopreview']).'</div></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$seolink2.'"><b>'.$lang->browse['viewtorrent'].'</b></a></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/details.php?id='.$torrents['id'].'&tab=comments"><b>'.$lang->browse['viewcomments'].'</b></a></td>
                </tr>'
.($is_mod '
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/admin/index.php?act=torrent_info&id='.$torrents['id'].'"><b>'.$lang->browse['tinfo'].'</b></a></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/edit.php?id='.$torrents['id'].'"><b>'.$lang->browse['edit'].'</b></a></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="#quickedit" onClick="QuickEditTorrentSubject(\''
.$torrents['id'].'\', \''.$javascript_tname.'\');"><b>'.$lang->browse['quickedit'].'</b></a></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/admin/index.php?act=nuketorrent&id='.$torrents['id'].'"><b>'.$lang->browse['nuke'].'</b></a></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/admin/index.php?act=fastdelete&id='.$torrents['id'].'"><b>'.$lang->browse['delete'].'</b></a></td></td>
                </tr>' 
'').'
            </table>
        </div>' 
'').($disable_user_menu == false '
        <script type="text/javascript">
            menu_register("torrentuser'
.$torrents['owner'].$torrents['id'].'", true);
        </script>
        <div id="torrentuser'
.$torrents['owner'].$torrents['id'].'_menu" class="menu_popup" style="display:none;">
            <table border="1" cellspacing="0" cellpadding="2">
                <tr>
                    <td align="center" class="thead"><b>'
.$lang->global['quickmenu'].' '.$torrents['username'].'</b></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.ts_seo($torrents['owner'], $torrents['username']).'">'.$lang->global['qinfo1'].'</a></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/browse.php?do=search&keywords='.htmlspecialchars_uni($torrents['username']).'&category=0&search_type=t_uploader">'.sprintf($lang->global['qinfo9'], $torrents['username']).'</a></td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/sendmessage.php?receiver='.$torrents['owner'].'">'.sprintf($lang->global['qinfo2'], $torrents['username']).'</td>
                </tr>
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/friends.php?action=add_friend&friendid='.$torrents['owner'].'">'.sprintf($lang->global['qinfo5'], $torrents['username']).'</td>
                </tr>
                '
.($is_mod '
                <tr>
                    <td class="subheader"><a href="'
.$BASEURL.'/admin/edituser.php?action=edituser&userid='.$torrents['owner'].'">'.$lang->global['qinfo6'].'</a></td></tr><tr><td class="subheader"><a href="'.$BASEURL.'/admin/edituser.php?action=warnuser&userid='.$torrents['owner'].'">'.$lang->global['qinfo7'].'</td>
                </tr>' 
'').'
            </table>
        </div>' 
'');
    }
}
else
{
    
$contentmiddle '
        <tr>
            <td colspan="'
.$__colspan.'">
                '
.$lang->browse['tryagain'].'
            </td>
        </tr>'
;
}

$contentmiddle .= ($is_mod '
<tr>
    <td colspan="'
.$__colspan.'" align="right">
        <p id="selectaction" style="display:block; margin-top: 5px; margin-right: 5px;">
                Mûvelet kiválasztása:
            <select name="actiontype" onchange="check_it(this)">
                <option value="0">Mûvelet választás</option>
                <option value="move">Torrent áthelyezése</option>
                <option value="delete">Torrent törlése</option>
                <option value="sticky">A torrent ajánlott legyen vagy ne</option>
                <option value="free">A torrent ingyenes legyen vagy ne</option>
                <option value="silver">A torrent ezüst legyen vagy ne</option>
                <option value="visible">A torrent látható legyen vagy ne</option>
                <option value="anonymous">A torrent névtelen legyen vagy ne</option>
                <option value="banned">A torrent bannolt legyen vagy ne</option>
                <option value="nuke">Nuke torrent vagy ne</option>
                <option value="doubleupload">Dupla feltöltésû legyen IGEN/NEM</option>
                <option value="openclose">A torrent hozzászólást tilt vagy nem</option>
            </select>
        </p>
        <p id="movetorrent" style="display:none; margin-right: 5px;">
            Select Category: '
.$catdropdown.'
        </p>
        <p id="doaction" style="display:block; margin-right: 5px;">
            <input type="submit" value="mehet"> <input type="reset" value="alaphelyzet" />
        </p>
    </td>
</tr>
</form>
</table>
'</table>').'
'
.$menu_nav.'
<script type="text/javascript">
    menu.activate(true);
</script>
<script type="text/javascript" src="'
.$BASEURL.'/scripts/ts_update.js?v='.O_SCRIPT_VERSION.'"></script>';

if (
count($pagelinks) > 0)
{
    
$hiddenvalues;
    foreach (
$pagelinks as $name)
    {
        
$values explode('='$name);
        
$hiddenvalues .= '
        <input type="hidden" name="'
.$values[0].'" value="'.$values[1].'" />
        '
;
    }
}

if (isset(
$_GET['category']) && is_valid_id($_GET['category']) && empty($quick_search))
{
    
$sqfield "&browse_categories&category=".intval($_GET['category']);
}

$finishcontent '
<table width="100%" cellpadding="5" cellspacing="0" border="0">
    <tr>
        <td class="none" width="40%">
            <fieldset style="text-align: center; line-height: 25px; padding: 5px; border: solid 1px #000;">
                <LEGEND>'
.$lang->browse['b_info'].'</LEGEND>
                '
.str_replace("|link|""$BASEURL/$pic_base_url"$lang->browse['legend_browse']).'
            </fieldset>
        </td>
        <td class="none" width="60%">
            <fieldset style="text-align: center; line-height: 25px; padding: 5px; border: solid 1px #000;">
                <LEGEND>'
.$lang->browse['f_options'].'</LEGEND>
                <span style="float: right;">
                    <form method="post" action="'
.$_SERVER['SCRIPT_NAME'].'?page='.intval(isset($_GET['page']) ? $_GET['page']: 0).(isset($sqfield) ? $sqfield '').'">
                        <input type="hidden" name="sort_order" value="yes" />
                        <input type="hidden" name="page" value="'
.intval(isset($_GET['page']) ? $_GET['page']: 0).'" />
                        '
.(isset($hiddenvalues) ? $hiddenvalues '').'
                        '
.$lang->browse['sortby1'].'
                        <select name="sortby">
                            <option value="added"'
.(isset($sortby) && $sortby == 'added' ' selected="selected"' '').'>'.$lang->global['added'].'</option>
                            <option value="numfiles"'
.(isset($sortby) && $sortby == 'numfiles' ' selected="selected"' '').'>'.$lang->browse['sortby2'].'</option>
                            <option value="comments"'
.(isset($sortby) && $sortby == 'comments' ' selected="selected"' '').'>'.$lang->browse['sortby3'].'</option>
                            <option value="seeders"'
.(isset($sortby) && $sortby == 'seeders' ' selected="selected"' '').'>'.$lang->browse['sortby4'].'</option>
                            <option value="leechers"'
.(isset($sortby) && $sortby == 'leechers' ' selected="selected"' '').'>'.$lang->browse['sortby5'].'</option>
                            <option value="size"'
.(isset($sortby) && $sortby == 'size' ' selected="selected"' '').'>'.$lang->browse['sortby6'].'</option>
                            <option value="times_completed"'
.(isset($sortby) && $sortby == 'times_completed' ' selected="selected"' '').'>'.$lang->browse['sortby7'].'</option>
                            <option value="owner"'
.(isset($sortby) && $sortby == 'owner' ' selected="selected"' '').'>'.$lang->browse['sortby8'].'</option>
                            <option value="sticky"'
.(isset($sortby) && $sortby == 'sticky' ' selected="selected"' '').'>'.$lang->browse['sortby9'].'</option>
                            '
.($torrentspeed == 'yes' '<option value="totalspeed"'.(isset($sortby) && $sortby == 'totalspeed' ' selected="selected"' '').'>'.$lang->browse['speed'].'</option>' '').'
                        </select>
                        '
.$lang->browse['orderby1'].'
                        <select name="orderby">
                            <option value="ASC"'
.(isset($orderby) && $orderby == 'ASC' ' selected="selected"' '').'>'.$lang->browse['orderby3'].'</option>
                            <option value="DESC"'
.(isset($orderby) && $orderby == 'DESC' ' selected="selected"' '').'>'.$lang->browse['orderby2'].'</option>
                        </select>
                        <input type="image" class="none" style="vertical-align: middle;" src="'
.$BASEURL.'/'.$pic_base_url.'torrent_search.gif" alt="'.$lang->browse['tsearch'].'" />&nbsp;&nbsp;
                    </form>
                </span>
            </fieldset>
        </td>
    </tr>
</table>
'
;

$QuickEditTorrentSubject='';
if (
$is_mod)
{
    
$QuickEditTorrentSubject '
    <script type="text/javascript">
        function checkSubject()
        {
            var userEntered = document.getElementById(\'subject\').value;
            if (userEntered == "")
            {
                alert("'
.$lang->global['dontleavefieldsblank'].'");
                document.QuickEditForm.subject.focus();
                return false;
            }
            else
            {
                return true;
            }
        }
        function QuickEditTorrentSubject(TorrentID,TorrentSubject)
        {
            document.getElementById(\'quickedit\').innerHTML = \'<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center"><tr><td class="thead">'
.$lang->browse['quickedit'].'</td></tr><tr><td><form method="post" action="'.$_SERVER['SCRIPT_NAME'].'?page='.intval(isset($_GET['page']) ? $_GET['page'] : 0).'&'.(isset($pagelinks) && count($pagelinks) > implode('&'$pagelinks).'&' '').(isset($pagelinks2) && count($pagelinks2) > implode('&'$pagelinks2) : '').'" onSubmit="return checkSubject()" name="QuickEditForm"><input type="hidden" name="tid" value="\'+TorrentID+\'" /> <input type="text" id="subject" name="subject" value="\'+TorrentSubject+\'" size="100" /> <input type="submit" value="'.$lang->global['buttonsave'].'" class="button" /> <input type="reset" value="'.$lang->global['buttonreset'].'" class="button" /></form></td></tr></table>\';
        }
    </script>
    '
;
}
echo 
$___notice.$categories.$search.($pagertop $pagertop '<p></p>').'<div style="display:block;" id="showcontents">'.$contentheader.$contentmiddle.'</div>'.($pagerbottom $pagerbottom '').$finishcontent.$QuickEditTorrentSubject;
unset(
$categories,$search,$contentheader,$contentmiddle,$finishcontent);
stdfoot();
# Function get_slr_color v.0.1
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";
}
# Function unesc v.0.1
function unesc($x)
{
    if (
get_magic_quotes_gpc()) return stripslashes($x);
    return 
$x;
}
?>


mmisu120000 19th May 2011 13:29

what is no good? dosn't work? errors?be more explicit ....

Omenke 19th May 2011 14:25

re
 
Quote:

Originally Posted by mmisu120000 (Post 28005)
what is no good? dosn't work? errors?be more explicit ....


hello
I do not work! If you just replace the code blank white oldl receive and nothing else

z3ro 19th May 2011 14:34

Error message
 
Error message
Code:

Parse error:  syntax error, unexpected ')' in /storage/www/virtual/my site/htdocs/browse.php on line 618

:wallbash:

smoky28 19th May 2011 16:28

Quote:

Originally Posted by Próba12 (Post 28008)
Error message

Code:

Parse error:  syntax error, unexpected ')' in /storage/www/virtual/my site/htdocs/browse.php on line 618
:wallbash:

listen to a little syntax error which can only be a good signal to cause excess
PHP Code:

'.($seolink2.' 


mmisu120000 19th May 2011 18:30

That line looks like that :

PHP Code:

$name_torrent '<a href="'.$seolink2.'" onmouseover="return overlib(\'<table width=100%><tr><td><img src='.$imagineat.' width=150 height=200></td></tr></table>\',  WIDTH, 150, DELAY, 100);" onmouseout="return nd();"><b>'.$torrents['name'].'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'


DARCK 19th May 2011 18:59

Quote:

Originally Posted by mmisu120000 (Post 28012)
That line looks like that :

PHP Code:

$name_torrent '<a href="'.$seolink2.'" onmouseover="return overlib(\'<table width=100%><tr><td><img src='.$imagineat.' width=150 height=200></td></tr></table>\',  WIDTH, 150, DELAY, 100);" onmouseout="return nd();"><b>'.$torrents['name'].'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'


good job :drink:

turktiger 20th May 2011 09:58

Tooltip ?
 
1 Attachment(s)
it seems very far from mouse and only thumb like in the attachment , cant we show seeders and leechers in it like 7.2 (i use 5.6 )

mmisu120000 20th May 2011 11:47

Quote:

Originally Posted by turktiger (Post 28023)
it seems very far from mouse and only thumb like in the attachment , cant we show seeders and leechers in it like 7.2 (i use 5.6 )

at your page there maybe a problem in css ... in header perhaps ...

I will work on a balloon that shows seeders/leechers, etc. ... but what's the point in that, you can see those values in the browse page right on the torrent you're pointing ... maybe it's not a good idea in loading the tracker with thousands of graphics and gizmos ... but, as I said, i'll work on a balloon like that

Bump: Ok, here is the version with seeders/leechers/category/size shown in the window ...:


for those who never changed browse.php:

find:
PHP Code:

$name_torrent '<a href="'.($UseQuickMenu '#' $seolink2).'" id="torrentmenu'.$torrents['id'].'" /><b>'.(!empty($keywords) ? highlight(htmlspecialchars_uni($keywords), $torrents['name']) : $torrents['name']).'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

and replace it with:
PHP Code:

$res12 mysql_query("SELECT name FROM categories WHERE id=$torrents[category]");
        
$arr1 mysql_fetch_assoc($res12);
        
$cat1 $arr1["name"];
        
$size1 mksize($torrents["size"]);
        
$imagineat=htmlspecialchars_uni($torrents['t_image']);
$name_torrent '<a href="'.$seolink2.'" onmouseover="return overlib(\'<table width=100%><tr><td bgcolor=black align=center><img src='.$imagineat.' width=150 height=200></td><td bgcolor=black align=center ><b><font color=white>'.$torrents['name'].'</font></b><font color=yellow><b>Tip:&nbsp;'.$cat1.'</font><font color=lime><b>'.$torrents['seeders'].'&nbsp;Seederi</font><font color=red>'.$torrents['leechers'].'&nbsp;Leecheri</font><font color=white>Marime:&nbsp;'.$size1.'</font></td></tr></table>\',  WIDTH, 150, DELAY, 100);" onmouseout="return nd();"><b>'.$torrents['name'].'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span  id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

For those who already made the ballon modification from the first post:

in browse.php

find:
PHP Code:

$imagineat=htmlspecialchars_uni($torrents['t_image']);
$name_torrent '<a href="'.$seolink2.'" onmouseover="return overlib(\'<table width=100%><tr><td><img src='.$imagineat.' width=150 height=200></td></tr></table>\',  WIDTH, 150, DELAY, 100); ..... etc 

and replace it with:
PHP Code:

$res12 mysql_query("SELECT name FROM categories WHERE id=$torrents[category]");
        
$arr1 mysql_fetch_assoc($res12);
        
$cat1 $arr1["name"];
        
$size1 mksize($torrents["size"]);
        
$imagineat=htmlspecialchars_uni($torrents['t_image']);
$name_torrent '<a href="'.$seolink2.'" onmouseover="return overlib(\'<table width=100%><tr><td bgcolor=black align=center><img src='.$imagineat.' width=150 height=200></td><td bgcolor=black align=center ><b><font color=white>'.$torrents['name'].'</font></b><font color=yellow><b>Tip:&nbsp;'.$cat1.'</font><font color=lime><b>'.$torrents['seeders'].'&nbsp;Seederi</font><font color=red>'.$torrents['leechers'].'&nbsp;Leecheri</font><font color=white>Marime:&nbsp;'.$size1.'</font></td></tr></table>\',  WIDTH, 150, DELAY, 100);" onmouseout="return nd();"><b>'.$torrents['name'].'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span  id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

that should do it ....

turktiger 20th May 2011 14:11

1 Attachment(s)
or replace with this ; Another modification


PHP Code:

$imagineat=htmlspecialchars_uni($torrents['t_image']);
$name_torrent '<a href="'.$seolink2.'" onmouseover="return overlib(\'<table width=100%><tr><td><img src='.$imagineat.' width=200 height=250></td><td class=tablea bgcolor=black align=center ><b><font color=yellow>'.$torrents['name'].'</font></b><font color=yellow><b>Tür:&nbsp;'.$torrents['categoryname'].'</font><font color=Yellow><b>Yükleyen:&nbsp;'.$torrents['username'].'</font><font color=white><b>'.$torrents['seeders'].'&nbsp;Gönderen</font><font color=white>'.$torrents['leechers'].'&nbsp;Çeken</font><font color=cyan></font><font color=cyan>'.$torrents['times_completed'].' Defa İndirildi</font><font color=white>Boyut:&nbsp;'.mksize($torrents['size']).'</font><font color=cyan>Ortalama Hız:&nbsp;'.mksize($torrents['totalspeed']).'&nbsp;sn</font></td>  </tr></table>\',  WIDTH, 150, DELAY, 100);" onmouseout="return nd();"><b>'.$torrents['name'].'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'


i ve added uploader and speed

Darkness 28th November 2011 02:56

Hi!
 
Thx http://www.bvlist.com/images/avatars...atar6633_1.gif mmisu120000 for this great work!
For me it`s ok, working like a charm ....many thx to yo man :drink:

Metalmania 17th April 2012 15:19

Nice job, it works fine

Tones 1st November 2012 15:42

Good job!
 
Thx m8 works perfect!!


All times are GMT +2. The time now is 02:18.

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