09 tbdev caticons in browse

Started by Jctheboss, January 29, 2016, 07:31:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jctheboss

Quote from: whocares on February 01, 2016, 10:27:47 PM
IN include/bittorrent.php
REPLACE
Code (php) Select
$res = mysql_query("SELECT id, name FROM categories ORDER BY name");
WITH
Code (php) Select
$res = mysql_query("SELECT id, name, image FROM categories ORDER BY name");

IN browse.php
REPLACE
Code (php) Select
<input name='c".$cat['id']."' type=\"checkbox\" " . (in_array($cat['id'],$wherecatina) ? "checked='checked' " : "") . "value='1' /><a class='catlink' href='browse.php?cat={$cat['id']}'>" . htmlspecialchars($cat['name']) . "</a></td>\n";
WITH
Code (php) Select
<input name='c".$cat['id']."' type=\"checkbox\" " . (in_array($cat['id'],$wherecatina) ? "checked='checked' " : "") . "value='1' /><a class='catlink' href='browse.php?cat={$cat['id']}'><img border='0' src='{$TBDEV['pic_base_url']}caticons/{$cat['image']}' alt='{$cat['name']}' /></a></td>\n";

thank you bro , work fine :) ;)

whocares

IN include/bittorrent.php
REPLACE
Code (php) Select
$res = mysql_query("SELECT id, name FROM categories ORDER BY name");
WITH
Code (php) Select
$res = mysql_query("SELECT id, name, image FROM categories ORDER BY name");

IN browse.php
REPLACE
Code (php) Select
<input name='c".$cat['id']."' type=\"checkbox\" " . (in_array($cat['id'],$wherecatina) ? "checked='checked' " : "") . "value='1' /><a class='catlink' href='browse.php?cat={$cat['id']}'>" . htmlspecialchars($cat['name']) . "</a></td>\n";
WITH
Code (php) Select
<input name='c".$cat['id']."' type=\"checkbox\" " . (in_array($cat['id'],$wherecatina) ? "checked='checked' " : "") . "value='1' /><a class='catlink' href='browse.php?cat={$cat['id']}'><img border='0' src='{$TBDEV['pic_base_url']}caticons/{$cat['image']}' alt='{$cat['name']}' /></a></td>\n";
Unless stated otherwise code is untested

Jctheboss

Quote from: MelvinMeow on January 31, 2016, 02:42:32 PM
You have to post your "includes/torrenttable_functions.php" as well.

Based off your browse.php your loading the query to load the images correctly so I am guessing the above mentioned page is where your issue lies.

torrenttable_functons.php

<?php
/*
+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
function linkcolor($num) {
    if (!
$num)
        return 
"red";
//    if ($num == 1)
//        return "yellow";
    
return "green";
}

function 
torrenttable($res$variant "index") {
    global 
$TBDEV$CURUSER$lang;

    
$wait 0;
    
$htmlout '';
    
    if (
$CURUSER["class"] < UC_VIP)
    {
      
$gigs $CURUSER["uploaded"] / (1024*1024*1024);
      
$ratio = (($CURUSER["downloaded"] > 0) ? ($CURUSER["uploaded"] / $CURUSER["downloaded"]) : 0);
      if (
$ratio 0.5 || $gigs 5$wait 48;
      elseif (
$ratio 0.65 || $gigs 6.5$wait 24;
      elseif (
$ratio 0.8 || $gigs 8$wait 12;
      elseif (
$ratio 0.95 || $gigs 9.5$wait 6;
      else 
$wait 0;
    }

    
$htmlout .= "<table border='1' cellspacing='0' cellpadding='5'>
    <tr>
    <td class='colhead' align='center'>
{$lang["torrenttable_type"]}</td>
    <td class='colhead' align='left'>
{$lang["torrenttable_name"]}</td>
    <!--<td class='heading' align='left'>
{$lang["torrenttable_dl"]}</td>-->";

if ($wait)
{
$htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_wait"]}</td>\n";
}

if ($variant == "mytorrents")
  {
  
$htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_edit"]}</td>\n";
    
$htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_visible"]}</td>\n";
}


    
$htmlout .= "<td class='colhead' align='right'>{$lang["torrenttable_files"]}</td>
    <td class='colhead' align='right'>
{$lang["torrenttable_comments"]}</td>
    <!--<td class='colhead' align='center'>
{$lang["torrenttable_rating"]}</td>-->
    <td class='colhead' align='center'>
{$lang["torrenttable_added"]}</td>
    <td class='colhead' align='center'>
{$lang["torrenttable_ttl"]}</td>
    <td class='colhead' align='center'>
{$lang["torrenttable_size"]}</td>
    <!--
    <td class='colhead' align='right'>
{$lang["torrenttable_views"]}</td>
    <td class='colhead' align='right'>
{$lang["torrenttable_hits"]}</td>
    -->
    <td class='colhead' align='center'>
{$lang["torrenttable_snatched"]}</td>
    <td class='colhead' align='right'>
{$lang["torrenttable_seeders"]}</td>
    <td class='colhead' align='right'>
{$lang["torrenttable_leechers"]}</td>";


    if (
$variant == 'index')
        
$htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_uppedby"]}</td>\n";

    
$htmlout .= "</tr>\n";

    while (
$row mysql_fetch_assoc($res)) 
    {
        
$id $row["id"];
        
$htmlout .= "<tr>\n";

        
$htmlout .= "<td align='center' style='padding: 0px'>";
        if (isset(
$row["cat_name"])) 
        {
            
$htmlout .= "<a href='browse.php?cat={$row['category']}'>";
            if (isset(
$row["cat_pic"]) && $row["cat_pic"] != "")
                
$htmlout .= "<img border='0' src='{$TBDEV['pic_base_url']}caticons/{$row['cat_pic']}' alt='{$row['cat_name']}' />";
            else
            {
                
$htmlout .= $row["cat_name"];
            }
            
$htmlout .= "</a>";
        }
        else
        {
            
$htmlout .= "-";
        }
        
$htmlout .= "</td>\n";

        
$dispname htmlspecialchars($row["name"]);
        
        
$htmlout .= "<td align='left'><a href='details.php?";
        if (
$variant == "mytorrents")
            
$htmlout .= "returnto=" urlencode($_SERVER["REQUEST_URI"]) . "&amp;";
        
$htmlout .= "id=$id";
        if (
$variant == "index")
            
$htmlout .= "&amp;hit=1";
        
$htmlout .= "'><b>$dispname</b></a>\n";

if ($wait)
{
  $elapsed floor((time() - $row["added"]) / 3600);
        if ($elapsed $wait)
        {
          $color dechex(floor(127*($wait $elapsed)/48 128)*65536);
          $htmlout .= "<td align='center'><span style='white-space: nowrap;'><a href='faq.php#dl8'><font color='$color'>" number_format($wait $elapsed) . " ".$lang["torrenttable_wait_h"]."</font></a></span></td>\n";
        }
        else
          $htmlout .= "<td align='center'><span style='white-space: nowrap;'>{$lang["torrenttable_wait_none"]}</span></td>\n";
        }

/*
        if ($row["nfoav"] && get_user_class() >= UC_POWER_USER)
          print("<a href='viewnfo.php?id=$row[id]''><img src='{$TBDEV['pic_base_url']}viewnfo.gif" border='0' alt='".$lang["torrenttable_view_nfo_alt"]."' /></a>\n");
        if ($variant == "index")
            print("<a href='download.php/$id/" . rawurlencode($row["filename"]) . "'><img src='{$TBDEV['pic_base_url']}download.gif' border='0' alt='".$lang["torrenttable_download_alt"]."' /></a>\n");

        else */ 
        
if ($variant == "mytorrents")
            
$htmlout .= "</td><td align='center'><a href='edit.php?returnto=" urlencode($_SERVER["REQUEST_URI"]) . "&amp;id={$row['id']}'>".$lang["torrenttable_edit"]."</a>\n";
        
$htmlout .= "</td>\n";
        
        if (
$variant == "mytorrents"
        {
            
$htmlout .= "<td align='right'>";
            if (
$row["visible"] == "no")
                
$htmlout .= "<b>".$lang["torrenttable_not_visible"]."</b>";
            else
                
$htmlout .= "".$lang["torrenttable_visible"]."";
            
$htmlout .= "</td>\n";
        }

        if (
$row["type"] == "single")
        {
            
$htmlout .= "<td align='right'>{$row["numfiles"]}</td>\n";
        }
        else 
        {
            if (
$variant == "index")
            {
                
$htmlout .= "<td align='right'><b><a href='filelist.php?id=$id'>" $row["numfiles"] . "</a></b></td>\n";
            }
            else
            {
                
$htmlout .= "<td align='right'><b><a href='filelist.php?id=$id'>" $row["numfiles"] . "</a></b></td>\n";
            }
        }

        if (!
$row["comments"])
        {
            
$htmlout .= "<td align='right'>{$row["comments"]}</td>\n";
        }
        else 
        {
            if (
$variant == "index")
            {
                
$htmlout .= "<td align='right'><b><a href='details.php?id=$id&amp;hit=1&amp;tocomm=1'>" $row["comments"] . "</a></b></td>\n";
            }
            else
            {
                
$htmlout .= "<td align='right'><b><a href='details.php?id=$id&amp;page=0#startcomments'>" $row["comments"] . "</a></b></td>\n";
            }
        }

/*
        print("<td align='center'>");
        if (!isset($row["rating"]))
            print("---");
        else {
            $rating = round($row["rating"] * 2) / 2;
            $rating = ratingpic($row["rating"]);
            if (!isset($rating))
                print("---");
            else
                print($rating);
        }
        print("</td>\n");
*/
        
$htmlout .= "<td align='center'><span style='white-space: nowrap;'>" str_replace(",""<br />"get_date$row['added'],'')) . "</span></td>\n";
        
$ttl = (28*24) - floor((time() - $row["added"]) / 3600);

if ($ttl == 1
                   
$ttl .= "<br />".$lang["torrenttable_hour_singular"].""
                else 
                   
$ttl .= "<br />".$lang["torrenttable_hour_plural"]."";
    
    
$htmlout .= "<td align='center'>$ttl</td>\n
    <td align='center'>" 
str_replace(" ""<br />"mksize($row["size"])) . "</td>\n";
//        print("<td align='right'>" . $row["views"] . "</td>\n");
//        print("<td align='right'>" . $row["hits"] . "</td>\n");

        
        
if ($row["times_completed"] != 1)
          
$_s "".$lang["torrenttable_time_plural"]."";
        else
          
$_s "".$lang["torrenttable_time_singular"]."";
        
$htmlout .= "<td align='center'>" number_format($row["times_completed"]) . "<br />$_s</td>\n";

        if (
$row["seeders"]) 
        {
            if (
$variant == "index")
            {
               if (
$row["leechers"]) $ratio $row["seeders"] / $row["leechers"]; else $ratio 1;
                
$htmlout .= "<td align='right'><b><a href='peerlist.php?id=$id#seeders'>
                <font color='" 
.get_slr_color($ratio) . "'>{$row["seeders"]}</font></a></b></td>\n";
            }
            else
            {
                
$htmlout .= "<td align='right'><b><a class='" linkcolor($row["seeders"]) . "' href='peerlist.php?id=$id#seeders'>{$row["seeders"]}</a></b></td>\n";
            }
        }
        else
        {
            
$htmlout .= "<td align='right'><span class='" linkcolor($row["seeders"]) . "'>" $row["seeders"] . "</span></td>\n";
        }

        if (
$row["leechers"]) 
        {
            if (
$variant == "index")
                
$htmlout .= "<td align='right'><b><a href='peerlist.php?id=$id#leechers'>" .
                   
number_format($row["leechers"]) . "</a></b></td>\n";
            else
                
$htmlout .= "<td align='right'><b><a class='" linkcolor($row["leechers"]) . "' href='peerlist.php?id=$id#leechers'>{$row["leechers"]}</a></b></td>\n";
        }
        else
            
$htmlout .= "<td align='right'>0</td>\n";

        if (
$variant == "index")
            
$htmlout .= "<td align='center'>" . (isset($row["username"]) ? ("<a href='userdetails.php?id=" $row["owner"] . "'><b>" htmlspecialchars($row["username"]) . "</b></a>") : "<i>(".$lang["torrenttable_unknown_uploader"].")</i>") . "</td>\n";

       
$htmlout .= "</tr>\n";
    }

    
$htmlout .= "</table>\n";

    return 
$htmlout;
}

function 
commenttable($rows)
{
global $CURUSER$TBDEV;


$lang load_language'torrenttable_functions' );

$htmlout '';
$count 0;

$htmlout .= begin_main_frame();
$htmlout .= begin_frame();

foreach ($rows as $row)
{
$htmlout .= "<p class='sub'>#{$row["id"]} {$lang["commenttable_by"]} ";
    if (isset(
$row["username"]))
{
$title $row["title"];
if ($title == "")
$title get_user_class_name($row["class"]);
else
$title htmlspecialchars($title);
        
$htmlout .= "<a name='comm{$row["id"]}' href='userdetails.php?id={$row["user"]}'><b>" .
        
htmlspecialchars($row["username"]) . "</b></a>" . ($row["donor"] == "yes" "<img src='{$TBDEV['pic_base_url']}star.gif' alt='".$lang["commenttable_donor_alt"]."' />" "") . ($row["warned"] == "yes" "<img src=".
    
"'{$TBDEV['pic_base_url']}warned.gif' alt='".$lang["commenttable_warned_alt"]."' />" "") . " ($title)\n";
}
else
   
$htmlout .= "<a name='comm{$row["id"]}'><i>(".$lang["commenttable_orphaned"].")</i></a>\n";

$htmlout .= get_date$row['added'],'');
$htmlout .= ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR "- [<a href='comment.php?action=edit&amp;cid={$row['id']}'>".$lang["commenttable_edit"]."</a>]" "") .
(get_user_class() >= UC_MODERATOR "- [<a href='comment.php?action=delete&amp;cid={$row['id']}'>".$lang["commenttable_delete"]."</a>]" "") .
($row["editedby"] && get_user_class() >= UC_MODERATOR "- [<a href='comment.php?action=vieworiginal&amp;cid={$row['id']}'>".$lang["commenttable_view_original"]."</a>]" "") . "</p>\n";
$avatar = ($CURUSER["avatars"] == "yes" htmlspecialchars($row["avatar"]) : "");

if (!$avatar)
$avatar "{$TBDEV['pic_base_url']}default_avatar.gif";
$text format_comment($row["text"]);
    if (
$row["editedby"])
    
$text .= "<p><font size='1' class='small'>".$lang["commenttable_last_edited_by"]." <a href='userdetails.php?id={$row['editedby']}'><b>{$row['username']}</b></a> ".$lang["commenttable_last_edited_at"]." ".get_date($row['editedat'],'DATE')."</font></p>\n";
$htmlout .= begin_table(true);
$htmlout .= "<tr valign='top'>\n";
$htmlout .= "<td align='center' width='150' style='padding: 0px'><img width='{$row['av_w']}' height='{$row['av_h']}' src='{$avatar}' alt='' /></td>\n";
$htmlout .= "<td class='text'>$text</td>\n";
$htmlout .= "</tr>\n";
     
$htmlout .= end_table();
  }
$htmlout .= end_frame();
$htmlout .= end_main_frame();

return $htmlout;
}


?>


MelvinMeow

You have to post your "includes/torrenttable_functions.php" as well.

Based off your browse.php your loading the query to load the images correctly so I am guessing the above mentioned page is where your issue lies.

Jctheboss

how to insert the icons of cats in browser?
get the names and put the images
please help me

use tbdev 2009

<?php
/*
+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
ob_start("ob_gzhandler");

require_once(
"include/bittorrent.php");
require_once 
"include/user_functions.php";
require_once 
"include/torrenttable_functions.php";
require_once 
"include/pager_functions.php";

dbconn(false);

loggedinorreturn();

    
$lang array_mergeload_language('global'), load_language('browse'), load_language('torrenttable_functions') );
    
    
$HTMLOUT '';
    
    
$cats genrelist();

    if(isset(
$_GET["search"])) 
    {
      
$searchstr unesc($_GET["search"]);
      
$cleansearchstr searchfield($searchstr);
      if (empty(
$cleansearchstr))
        unset(
$cleansearchstr);
    }

    
$orderby "ORDER BY torrents.id DESC";

    
$addparam "";
    
$wherea = array();
    
$wherecatina = array();

    if (isset(
$_GET["incldead"]) &&  $_GET["incldead"] == 1)
    {
      
$addparam .= "incldead=1&amp;";
      if (!isset(
$CURUSER) || get_user_class() < UC_ADMINISTRATOR)
        
$wherea[] = "banned != 'yes'";
    }
    else
    {
      if (isset(
$_GET["incldead"]) && $_GET["incldead"] == 2)
      {
      
$addparam .= "incldead=2&amp;";
        
$wherea[] = "visible = 'no'";
      }
      else
        
$wherea[] = "visible = 'yes'";
    }
    
    
$category = (isset($_GET["cat"])) ? (int)$_GET["cat"] : false;

    
$all = isset($_GET["all"]) ? $_GET["all"] : false;

    if (!
$all)
    {
      if (!
$_GET && $CURUSER["notifs"])
      {
        
$all True;
        foreach (
$cats as $cat)
        {
          
$all &= $cat['id'];
          if (
strpos($CURUSER["notifs"], "[cat" $cat['id'] . "]") !== False)
          {
            
$wherecatina[] = $cat['id'];
            
$addparam .= "c{$cat['id']}=1&amp;";
          }
        }
      }
      elseif (
$category)
      {
        if (!
is_valid_id($category))
          
stderr("{$lang['browse_error']}""{$lang['browse_invalid_cat']}");
        
$wherecatina[] = $category;
        
$addparam .= "cat=$category&amp;";
      }
      else
      {
        
$all True;
        foreach (
$cats as $cat)
        {
          
$all &= isset($_GET["c{$cat['id']}"]);
          if (isset(
$_GET["c{$cat['id']}"]))
          {
            
$wherecatina[] = $cat['id'];
            
$addparam .= "c{$cat['id']}=1&amp;";
          }
        }
      }
    }
    
    if (
$all)
    {
      
$wherecatina = array();
      
$addparam "";
    }

    if (
count($wherecatina) > 1)
      
$wherecatin implode(",",$wherecatina);
    elseif (
count($wherecatina) == 1)
      
$wherea[] = "category = $wherecatina[0]";

    
$wherebase $wherea;

    if (isset(
$cleansearchstr))
    {
      
$wherea[] = "MATCH (search_text, ori_descr) AGAINST (" sqlesc($searchstr) . ")";
      
//$wherea[] = "0";
      
$addparam .= "search=" urlencode($searchstr) . "&amp;";
      
$orderby "";
      
      
/////////////// SEARCH CLOUD MALARKY //////////////////////

        
$searchcloud sqlesc($cleansearchstr);
       
// $r = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM searchcloud WHERE searchedfor = $searchcloud"), MYSQL_NUM);
        //$a = $r[0];
        //if ($a)
           // mysql_query("UPDATE searchcloud SET howmuch = howmuch + 1 WHERE searchedfor = $searchcloud");
        //else
           // mysql_query("INSERT INTO searchcloud (searchedfor, howmuch) VALUES ($searchcloud, 1)");
        
@mysql_query("INSERT INTO searchcloud (searchedfor, howmuch) VALUES ($searchcloud, 1)
                    ON DUPLICATE KEY UPDATE howmuch=howmuch+1"
);
      
/////////////// SEARCH CLOUD MALARKY END ///////////////////
    
}

    
$where implode(" AND "$wherea);
    
    if (isset(
$wherecatin))
      
$where .= ($where " AND " "") . "category IN(" $wherecatin ")";

    if (
$where != "")
      
$where "WHERE $where";

    
$res mysql_query("SELECT COUNT(*) FROM torrents $where") or die(mysql_error());
    
$row mysql_fetch_array($res,MYSQL_NUM);
    
$count $row[0];

    if (!
$count && isset($cleansearchstr)) 
    {
      
$wherea $wherebase;
      
$orderby "ORDER BY id DESC";
      
$searcha explode(" "$cleansearchstr);
      
$sc 0;
      foreach (
$searcha as $searchss
      {
        if (
strlen($searchss) <= 1)
          continue;
        
$sc++;
        if (
$sc 5)
          break;
        
$ssa = array();
        foreach (array(
"search_text""ori_descr") as $sss)
          
$ssa[] = "$sss LIKE '%" sqlwildcardesc($searchss) . "%'";
        
$wherea[] = "(" implode(" OR "$ssa) . ")";
      }
    
      if (
$sc
      {
        
$where implode(" AND "$wherea);
        if (
$where != "")
          
$where "WHERE $where";
        
$res mysql_query("SELECT COUNT(*) FROM torrents $where");
        
$row mysql_fetch_array($res,MYSQL_NUM);
        
$count $row[0];
      }
    }

    
$torrentsperpage $CURUSER["torrentsperpage"];
    if (!
$torrentsperpage)
      
$torrentsperpage 15;

    if (
$count)
    {
      
//list($pagertop, $pagerbottom, $limit) = pager($torrentsperpage, $count, "browse.php?" . $addparam);
      
$pager pager($torrentsperpage$count"browse.php?" $addparam);

      
$query "SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.type,  torrents.comments,torrents.numfiles,torrents.filename,torrents.owner,IF(torrents.nfo <> '', 1, 0) as nfoav," .
    
//    "IF(torrents.numratings < {$TBDEV['minvotes']}, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, categories.name AS cat_name, categories.image AS cat_pic, users.username FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $orderby $limit";
      
"categories.name AS cat_name, categories.image AS cat_pic, users.username FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $orderby {$pager['limit']}";
      
$res mysql_query($query) or die(mysql_error());
    }
    else
    {
      unset(
$res);
    }
    
    if (isset(
$cleansearchstr))
      
$title "{$lang['browse_search']}\"$searchstr\"";
    else
      
$title '';





    
$HTMLOUT .= "<form method='get' action='browse.php'>
    <table class='bottom'>
    <tr>
    <td class='bottom'>
      <table class='bottom'>
      <tr>"
;


    
$i 0;
    
$catsperrow 7;
    foreach (
$cats as $cat)
    {
      
$HTMLOUT .= ($i && $i $catsperrow == 0) ? "</tr><tr>" "";
      
$HTMLOUT .= "<td class='bottom' style='padding-bottom: 2px;padding-left: 7px;align:left;border:1px solid;'>
      <input name='c"
.$cat['id']."' type=\"checkbox\" " . (in_array($cat['id'],$wherecatina) ? "checked='checked' " "") . "value='1' /><a class='catlink' href='browse.php?cat={$cat['id']}'>" htmlspecialchars($cat['name']) . "</a></td>\n";
      
$i++;
    }

    
$alllink "<div align='left'>(<a href='browse.php?all=1'><b>{$lang['browse_show_all']}</b></a>)</div>";

    
$ncats count($cats);
    
$nrows ceil($ncats/$catsperrow);
    
$lastrowcols $ncats $catsperrow;

    if (
$lastrowcols != 0)
    {
      if (
$catsperrow $lastrowcols != 1)
        {
          
$HTMLOUT .= "<td class='bottom' rowspan='" . ($catsperrow  $lastrowcols 1) . "'>&nbsp;</td>";
        }
      
$HTMLOUT .= "<td class='bottom' style=\"padding-left: 5px\">$alllink</td>\n";
    }

    
$selected = (isset($_GET["incldead"])) ? (int)$_GET["incldead"] : "";

    
$HTMLOUT .= "</tr>
    </table>
    </td>

    <td class='bottom'>
    <table class='main'>
      <tr>
        <td class='bottom' style='padding: 1px;padding-left: 10px'>
          <select name='incldead'>
    <option value='0'>
{$lang['browse_active']}</option>
    <option value='1'"
.($selected == " selected='selected'" "").">{$lang['browse_inc_dead']}</option>
    <option value='2'"
.($selected == " selected='selected'" "").">{$lang['browse_dead']}</option>
          </select>
        </td>"
;
        

    if (
$ncats $catsperrow == 0)
    {
      
$HTMLOUT .= "<td class='bottom' style='padding-left: 15px' rowspan='$nrows' valign='middle' align='right'>$alllink</td>\n";
    }

    
$HTMLOUT .= "</tr>
      <tr>
        <td class='bottom' style='padding: 1px;padding-left: 10px'>
        <div align='center'>
          <input type='submit' class='btn' value='
{$lang['browse_go']}' />
        </div>
        </td>
      </tr>
      </table>
    </td>
    </tr>
    </table>
    </form>"
;



    if (isset(
$cleansearchstr))
    {
      
$HTMLOUT .= "<h2>{$lang['browse_search']}\"" htmlentities($searchstrENT_QUOTES) . "\"</h2>\n";
    }
    
    if (
$count
    {
      
$HTMLOUT .= $pager['pagertop'];

      
$HTMLOUT .= torrenttable($res);

      
$HTMLOUT .= $pager['pagerbottom'];
    }
    else 
    {
      if (isset(
$cleansearchstr)) 
      {
        
$HTMLOUT .= "<h2>{$lang['browse_not_found']}</h2>\n";
        
$HTMLOUT .= "<p>{$lang['browse_tryagain']}</p>\n";
      }
      else 
      {
        
$HTMLOUT .= "<h2>{$lang['browse_nothing']}</h2>\n";
        
$HTMLOUT .= "<p>{$lang['browse_sorry']}(</p>\n";
      }
    }

/////////////////////// HTML OUTPUT //////////////////////////////

    
print stdhead($title) . $HTMLOUT stdfoot();

?>

[attachment deleted by admin]