masz tutaj ten kod bo cos krzaczki były w powyższym poscie jka dałem:
Kod:
<?
require_once("include/bittorrent.php");
dbconn(false);
loggedinorreturn();
stdhead("Dzisiaj wstawione torrenty");
$orderby = "ORDER BY torrents.id DESC";
$date_time=get_date_time(time()-(3600*24)); // the 72 is the hours you want listed
$id_result= mysql_query("SELECT id FROM categories");
$noofcats=mysql_num_rows($id_result);
while ( $cat_array = mysql_fetch_array($id_result, MYSQL_ASSOC) and $_GET["cat"] == 0) {
$id_array = $cat_array["id"];
$result= mysql_query("SELECT * FROM torrents where category ='$id_array' AND visible = 'yes' AND added>='$date_time'");
$nooftor=mysql_num_rows($result);
$result= mysql_query("SELECT name FROM categories where id='$id_array'");
$temp=mysql_fetch_assoc($result);
$catname=$temp["name"];
if ($nooftor <> 0) {
begin_frame("$catname", center);
$dead=1;
if ($_GET["incldead"] == 1) {
$addparam .= "incldead=1&";
if (!isset($CURUSER) || get_user_class < UC_ADMINISTRATOR)
$wherea[] = "banned != 'yes'";
**
else
if ($_GET["incldead"] == 2)
$wherea[] = "seeders = '0'";
else
$wherea[] = "seeders >= '1'";
$where = "WHERE seeders >= '0' AND category = '$id_array'";
$query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments,torrents.numfiles,torrents.filename,torrents.nfo,torrents.owner,IF(torrents.nfo <> '', 1, 0) as nfoav," .
"IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, categories.name AS cat_name, categories.image AS cat_pic, users.username, users.anonymous FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where AND torrents.added>='$date_time' $orderby $limit";
$res = mysql_query($query)
or die(mysql_error());
if ($CURUSER != ""){
if ($nooftor) {
list($pagertop, $pagerbottom, $limit) = pager(1000, $count, "index.php?" . $addparam);
echo '<br>';
torrenttable($res);
echo '<br>';
**
if (!$nooftor){
begin_frame("Nie znaleziono!");
echo"<BR><BR>Nie uploadowano dzisiaj torrentów!<BR><BR>";
end_frame();
**
**
else
bark2("Musisz być zalogowany, aby ogl±dać najnowsze torrenty!", "Zarejetruj sie, i zaloguj się, aby je obejrzeć!");
end_frame();
**
$catcount=$catcount+1;
**
stdfoot();
?>
zamist tego ** wstaw klamerke czyli zamkniecie i otwarcie
Bookmarks