i , try this if you want a torrent of week page , like torrent today.
Create this page torrents-week.php :
// TorrentTrader v2.x
// This file was last updated: 7/septembre/2008
//
// [url="http://www.torrenttrader.org"]http://www.torrenttrader.org[/url]
//
//
require_once("backend/functions.php");
dbconn(false);
//check permissions
if ($site_config["MEMBERSONLY"]){
loggedinonly();
if($CURUSER["view_torrents"]=="no")
show_error_msg("Error","You do not have permission to view torrents",1);
}
stdhead("Torrents de la semaine");
begin_frame("Torrents de la semaine");
$date_time=get_date_time(time()-(3600*168)); // the 24 is the hours you want listed
$catresult = mysql_query("SELECT id, name FROM categories ORDER BY sort_index");
while($cat = mysql_fetch_array($catresult))
{
$orderby = "ORDER BY torrents.id DESC"; //Order
$where = "WHERE banned = 'no' AND category='$cat[id]' AND visible='yes'";
//$limit = "LIMIT 50"; //Limit
$query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.safe, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where AND safe='yes' AND torrents.added>='$date_time' $orderby $limit";
$res = mysql_query($query);
$numtor = mysql_num_rows($res);
if ($numtor != 0) {
echo "<B><a href=torrents.php?cat=".$cat[id].">$cat[name]</a></B>";
list($pagertop, $pagerbottom, $limit) = pager(1000, $count, "torrents.php?" . $addparam); //adjust pager to match LIMIT
torrenttable($res);
echo "<BR>";
}
}
end_frame();
stdfoot();
?>
or put this file a the root of your site:
[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2836"]torrents_week.php[/url]
Create this page torrents-week.php :
<?php//// TorrentTrader v2.x
// This file was last updated: 7/septembre/2008
//
// [url="http://www.torrenttrader.org"]http://www.torrenttrader.org[/url]
//
//
require_once("backend/functions.php");
dbconn(false);
//check permissions
if ($site_config["MEMBERSONLY"]){
loggedinonly();
if($CURUSER["view_torrents"]=="no")
show_error_msg("Error","You do not have permission to view torrents",1);
}
stdhead("Torrents de la semaine");
begin_frame("Torrents de la semaine");
$date_time=get_date_time(time()-(3600*168)); // the 24 is the hours you want listed
$catresult = mysql_query("SELECT id, name FROM categories ORDER BY sort_index");
while($cat = mysql_fetch_array($catresult))
{
$orderby = "ORDER BY torrents.id DESC"; //Order
$where = "WHERE banned = 'no' AND category='$cat[id]' AND visible='yes'";
//$limit = "LIMIT 50"; //Limit
$query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.safe, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where AND safe='yes' AND torrents.added>='$date_time' $orderby $limit";
$res = mysql_query($query);
$numtor = mysql_num_rows($res);
if ($numtor != 0) {
echo "<B><a href=torrents.php?cat=".$cat[id].">$cat[name]</a></B>";
list($pagertop, $pagerbottom, $limit) = pager(1000, $count, "torrents.php?" . $addparam); //adjust pager to match LIMIT
torrenttable($res);
echo "<BR>";
}
}
end_frame();
stdfoot();
?>
or put this file a the root of your site:
[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2836"]torrents_week.php[/url]
