Jump to content

border help


gemma134uk

Recommended Posts

hi im trying to add a border round my files but not sure where to start in the pic below is what they look like and the pic below that is what i would like them to look like (with borders)

 

mine

http://img362.imageshack.us/img362/1092/70728577qt7.jpg

 

id like the borders round the files like the pic below

http://img100.imageshack.us/img100/4397/83419719uy4.jpg

 

below is my browse.php file

 

<?php


ob_start("ob_gzhandler");

require_once("include/bittorrent.php");
loggedinorreturn();

$cats = nzbgenrelist();

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

$grpsearch = unesc($_GET["grpsearch"]);
$cleangrpsearch = searchfield($grpsearch);
if (empty($cleangrpsearch))
unset($cleangrpsearch);

if ($_GET['sort'] && $_GET['type']) {
    $column = '';
    $ascdesc = '';
    
    switch($_GET['sort']) {
        case '1': $column = "name"; break;
        case '2': $column = "added"; break;
        case '3': $column = "postdate"; break;
        default: $column = "id"; break;
    }
    switch($_GET['type']) {
        case 'asc': $ascdesc = "ASC"; break;
        case 'desc': $ascdesc = "DESC"; break;
        default: $ascdesc = "DESC"; break;
    }
    
    $orderby = "ORDER BY nzbs." . $column . " " . $ascdesc;
    $pagerlink = "sort=" . $_GET['sort'] . "&type=" . $_GET['type'] . "&";
} else {
    $orderby = "ORDER BY nzbs.id DESC";
    $pagerlink = "";
}

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

$category = (int)$_GET["cat"];

$all = $_GET["all"];

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&";
        }
      }
    }
    elseif ($category)
{
        if (!is_valid_id($category))
            stderr("Error", "Invalid category ID.");
        $wherecatina[] = $category;
        $addparam .= "cat=$category&";
}
else
{
        $all = True;
        foreach ($cats as $cat)
        {
            $all &= $_GET["c".$cat['id']];
            if ($_GET["c".$cat['id']])
            {
                $wherecatina[] = $cat['id'];
                $addparam .= "c".$cat['id']."=1&";
            }
        }
}

if ($all)
{
$wherecatina = array();
    $addparam = "";
}

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

$wherebase = $wherea;

$searchwhere = $_GET["searchwhere"];

if (isset($cleansearchstr))
{
    if ($searchwhere == "both") {
    	$wherea[] = "MATCH (nzbs.name, nzbs.search_text, nzbs.ori_descr) AGAINST (" . sqlesc($searchstr) . ")";
    	$addparam .= "search=" . urlencode($searchstr) . "&searchwhere=both&";
    }
    
    if ($searchwhere == "desc") {
    	$wherea[] = "MATCH (nzbs.ori_descr) AGAINST (" . sqlesc($searchstr) . ")";
    	$addparam .= "search=" . urlencode($searchstr) . "&searchwhere=desc&";
    }
    
    if ($searchwhere == "title") {
    	$wherea[] = "MATCH (nzbs.name) AGAINST (" . sqlesc($searchstr) . ")";
    	$addparam .= "search=" . urlencode($searchstr) . "&searchwhere=title&";
    }
}

if (isset($cleangrpsearch))
{
$wherea[] = "groups LIKE '%" . sqlwildcardesc($grpsearch) . "%'";
$addparam .= "grpsearch=" . urlencode($grpsearch) . "&";
}

// for retention:
$retent = nzbretention();
if ($retent)
    $wherea[] = "postdate > $retent";

$where = implode(" AND ", $wherea);
if ($wherecatin)
$where .= ($where ? " AND " : "") . "category IN(" . $wherecatin . ")";

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

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

if (!$count && isset($cleansearchstr)) {
$wherea = $wherebase;
$searcha = explode(" ", $cleansearchstr);
$sc = 0;
foreach ($searcha as $searchss) {
	if (strlen($searchss) <= 1)
		continue;
	$sc++;
	if ($sc > 5)
		break;
	$ssa = array();
	if (($searchwhere == "both") || ($searchwhere == "desc")) {
	    foreach (array("nzbs.name", "nzbs.search_text", "nzbs.ori_descr") as $sss)
		    $ssa[] = "$sss LIKE '%" . sqlwildcardesc($searchss) . "%'";
	} elseif ($searchwhere == "title") {
	    foreach (array("nzbs.name") 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 nzbs $where");
	$row = mysql_fetch_array($res);
	$count = $row[0];
}
}

$nzbsperpage = $CURUSER["nzbsperpage"];
if (!$nzbsperpage)
$nzbsperpage = 30; // Change to whatever default you want

if ($count)
{   
    if ($addparam != "") {
        if ($pagerlink != "") {
            if ($addparam{strlen($addparam)-1} != ";") { // & = &
                $addparam = $addparam . "&" . $pagerlink;
            } else {
                $addparam = $addparam . $pagerlink;
            }
        }
    } else {
        $addparam = $pagerlink;
    }  

list($pagertop, $pagerbottom, $limit) = pager($nzbsperpage, $count, "nzbbrowse.php?" . $addparam);
$query = "SELECT nzbs.id, nzbs.category, nzbs.name, nzbs.hits, nzbs.size, nzbs.added, nzbs.comments, nzbs.numfiles, nzbs.filename, nzbs.owner, nzbs.groups, nzbs.format, nzbs.imdbrating, nzbs.genre, nzbs.addtext, nzbs.autoimdb, nzbs.url, nzbs.postdate,  IF(nzbs.nfo <> '', 1, 0) as nfoav," .
"nzbcategories.name AS cat_name, nzbcategories.image AS cat_pic, users.username FROM nzbs LEFT JOIN nzbcategories ON category = nzbcategories.id LEFT JOIN users ON nzbs.owner = users.id $where $orderby $limit";
/* $query = "SELECT nzbs.id, nzbs.category, nzbs.name, nzbs.hits, nzbs.size, nzbs.added, nzbs.comments, nzbs.numfiles, nzbs.filename, nzbs.owner, nzbs.groups, nzbs.format, nzbs.imdbrating, nzbs.genre, nzbs.addtext, nzbs.autoimdb, nzbs.url, nzbs.postdate,  IF(nzbs.nfo <> '', 1, 0) as nfoav," .
"nzbcategories.name AS cat_name, nzbcategories.image AS cat_pic, users.username, users.advertisename FROM nzbs LEFT JOIN nzbcategories ON category = nzbcategories.id LEFT JOIN users ON nzbs.owner = users.id $where $orderby $limit"; // USE THIS QUERY IF ANONYMOUS UPLOADER MOD PRESENT */
$res = mysql_query($query) or die(mysql_error());
}
else
unset($res);
if (isset($cleansearchstr))
stdhead("NZB Search results for \"$searchstr\"");
else
stdhead("NZB's");

?>

<STYLE TYPE="text/css" MEDIA=screen>

  a.catlink:link, a.catlink:visited{
	text-decoration: none;
	font-size: 7pt;
}

a.catlink:hover {
	color: #444444;
	font-size: 7pt;
}

</STYLE>

<form method="get" action="nzbbrowse.php">
<table class="bottom">
<tr>
<td class="bottom">
<table class="bottom">
<tr>

    <?
    $i = 0;
    foreach ($cats as $cat)
    {
    	$catsperrow = 7;
    	print(($i && $i % $catsperrow == 0) ? "</tr><tr>" : "");
    	print("<td class=\"bottom\" style=\"padding-bottom: 2px;padding-left: 7px\"><input name=\"c$cat[id]\"  alt=\"Select multiple categories\" title=\"Select multiple categories\" type=\"checkbox\" " . (in_array($cat['id'],$wherecatina) ? "checked=\"checked\" " : "") . "value=\"1\" /><br /><a class=\"catlink\" href=\"nzbbrowse.php?cat=".$cat["id"]."\" alt=\"Show all in this category\" title=\"Show all in this category\">" . safe($cat['name']) . "</a></td>\n");
    	$i++;
    }
    
    $alllink = "<div align=\"left\">(<a href=\"nzbbrowse.php?all=1\" alt=\"Show all categories\" title=\"Show all categories\"><b>Show all</b></a>)</div>";
    
    $ncats = count($cats);
    $nrows = ceil($ncats/$catsperrow);
    $lastrowcols = $ncats % $catsperrow;
    
    if ($lastrowcols != 0)
    {
    	if ($catsperrow - $lastrowcols != 1)
    		{
    			print("<td class=\"bottom\" rowspan=\"" . ($catsperrow  - $lastrowcols - 1) . "\"> </td>");
    		}
    	print("<td class=\"bottom\" style=\"padding-left: 5px\">$alllink</td>\n");
    }
    ?>
</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">All</option>
		</select>
        </td>
        <?
        if ($ncats % $catsperrow == 0)
        	print("<td class=\"bottom\" style=\"padding-left: 15px\" rowspan=\"$nrows\" valign=\"center\" align=\"right\">$alllink</td>\n");
        ?>

    </tr>
    <tr>
        <td class="bottom" style="padding: 1px;padding-left: 10px">
            <div align="center">
            <input type="submit" class="codebuttons" style="width:80px;height:25px;" alt="Show all selected categories" title="Show all selected categories" value="Go!" />
            </div>
        </td>
    </tr>
</table>
</td>
</tr>
</table>
</form>
<!-- Search -->
<p>
<table width="750" class="main" border="0" cellspacing="0" cellpadding="0"><tr><td class="embedded">
<form method="get" action="nzbbrowse.php">
<p align="center">
Search 
<select name="searchwhere">
    <option value="title">titles</option>
    <option value="desc"<?=($searchwhere=="desc"?" selected=\"selected\"":"")?>>descriptions</option>
    <option value="both"<?=($searchwhere=="both"?" selected=\"selected\"":"")?>>both</option>
</select>
 for 
<input type="text" name="search" size="40" value="<?= safe($searchstr) ?>" />
 in 
<select name="cat">
<option value="0">(all types)</option>
<?


$cats = nzbgenrelist();
$catdropdown = "";
foreach ($cats as $cat) {
    $catdropdown .= "<option value=\"" . $cat["id"] . "\"";
    if ($cat["id"] == $_GET["cat"])
        $catdropdown .= " selected=\"selected\"";
    $catdropdown .= ">" . safe($cat["name"]) . "</option>\n";
}

?>
<?= $catdropdown ?>
</select>
<br /><br />
<input type="submit" class="codebuttons" style="width:80px;height:25px;" value="Search!" />
</p>
</form>
</td></tr></table>
<!-- End Search -->
<?

if (isset($cleansearchstr))
print("<h2>Search results for \"" . safe($searchstr) . "\"</h2>\n");

if ($count) {
print($pagertop);

nzbtable($res);

print($pagerbottom);
}
else {
if (isset($cleansearchstr)) {
	print("<h2>Nothing found!</h2>\n");
	print("<p>Try again with a refined search string.</p>\n");
}
else {
	print("<h2>Nothing here!</h2>\n");
	print("<p>Sorry pal </p>\n");
}
}

mysql_query("UPDATE users SET last_nzbrowse=".gmtime()." where id=".$CURUSER['id']);

stdfoot();

?>

 

thanx in advance x

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.