Witam,
mam taki kod:
<?
require_once("bbcode.php");
$cb = new bb;
/*
This program was written by bogaa @ http://www.bogaa.org
all rights reserved, this program may be modified and
redistributed, all copyright notices must be left intact,
and so does this comment.
*/
/* check if file is being accessed directly */
if (eregi("details.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php?idx="); }
$id = $_GET['id'];
require_once("include/config.php");
$result= mysql_query ("SELECT COUNT(*) AS countrows FROM namemap WHERE info_hash = '$id'") or
die ("query error"); {
}
if ($countrows == 0)
{
Header("Location: index.php?idx="); }
?>
<ul id="tabs"><li id="tab_selected"><a href="index.php?idx=details&id=
<? echo $id;?>">Ogólne informacje</a></li>
<li><a href="index.php?idx=report&id=
<?echo $id;?>">Wyslij problem</a></li></ul><br />
<?
/*fetches the needed data to display the newest torrents*/
$result= mysql_query ("SELECT summary.info_hash AS hash, summary.seeds, summary.leechers, format( summary.finished, 0 ) AS finished, summary.dlbytes AS dwned, namemap.filename, namemap.opis, namemap.u
rl, namemap.info, summary.speed,
namemap.data , namemap.lastupdate,namemap.reqreg as regi, namemap.announce_url a
s announce, categories.image, categories.name AS cname, namemap.category AS
catid, namemap.size, namemap.external, namemap.uploader
FROM summary
LEFT JOIN namemap ON summary.info_hash = namemap.info_hash
LEFT JOIN categories ON categories.id = namemap.category
WHERE namemap.info_hash = '$id'")
{
/* get size and suffix*/
if ($size >= 1099511627776)
{
$return = round($size / 1024
/ 1024
/ 1024
/ 1024
, 2
); $suffix = "TB";
}
elseif ($size >= 1073741824)
{
$return = round($size / 1024
/ 1024
/ 1024
, 2
); $suffix = "GB";
}
elseif ($size >= 1048576)
{
$return = round($size / 1024
/ 1024
, 2
); $suffix = "MB";
}
elseif ($size >= 1024)
{
$return = round($size / 1024
, 2
); $suffix = "KB";
}
else
{
$return = $size;
$suffix = "Byte";
}
if ($regi == 1)
{
$regi = "<tr><td>Wymagana rejestracja:</td><td>Tak, wejdz na glowna strone trackera po info.</td></tr>";
}
else
{
$regi = "<tr><td>Wymagana rejestracja:</td><td>Nie</td>";
}
if ($row['speed'] < 0) {
$speed = "N/D";
}
else if ($row['speed'] > 2097152) {
$speed = round($row['speed']/1048576,2) . " MB/sec"; }
else {
$speed = round($row['speed'] / 1024, 2) . " KB/sec"; }
print("<tr><td align=right class="header">".Szybkość
.": </td><td class="lista
" >" . $speed . "</td></tr>");
"
<h1><a href="download.php?id=$hash">$filename</a></h1>
<table class="infotable" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="15%">Kategoria</td>
<td class="underline"><a href="index.php?idx=order&cat=$catid">$cname</a></td>
</tr>
<tr>
<td>Rozmiar</td>
<td>$return $suffix</td>
</tr>
<tr>
<td>Seedów</td>
<td><div class="r">$seeds</div></td>
</tr>
<tr>
<td>Peerów</td>
<td><div class="b">$leechers</div></td>
</tr>
<tr>
<td>Pobrano</td>
<td><div class="g">$finished</div></td>
</tr>
<tr>
<td>Tracker</td>
<td>$announce</td>
</tr>
<tr>
$regi
</tr>
<tr>
<td>Dodany</td>
<td>$data</td>
</tr>
<tr>
<td>Ostatnia aktualizacja</td>
<td class="underline">$lastupdate <a href="index.php?idx=recheck&id=$id">Aktualizuj!</a></td>
</tr>
<tr>
<td>Ssaj</td>
<td class="underline"><a href="download.php?id=$hash"><img src="download2.png"></a> <a href="forum"><img src="chat.png"></a></td>
</tr>
<tr>
/////TUTAJ/////TUTAJ////
<td>Opis</td>
<td class="underline">.$cb->bbcode($row[opis]).</td>
</tr>
</table>
";
}
?>
I teraz chcę, aby
opis na dole wykorzystywał bbcode

niestety jak narazie nie udało mi się tego osiągnąć

Co może być nie tak?
////////////////////////////////////////////////
EOT -> problem solved
Ten post edytował Hubi.pl 27.12.2005, 17:03:14