rendered paste body/* LOAD CACHED PAGE */$file = "cache/main-".(int)$_GET['sort']."-".(int)$_GET['day'].".html";$timeout = 1; // 5 minutes$cache_age = @time() - @filemtime($file); // we refresh the contentif (!file_exists($file) || (file_exists($file) && $cache_age > $timeout) ){ touch($file); $fp = @fopen($file, "w+b"); $sort = tsort ($_GET['sort']); ///////////////////////////////// $news = mysql_query("SELECT * FROM top5 ORDER BY date DESC LIMIT 5")or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($news) > 0) { $output .= '<center><b>Select you preferred Top5 by clicking on the category below</b></center>'; $output .='<center><a onclick="sndReqDetails1(\'top5\',\'All\'); " /><b>All</b></a> - <a onclick="sndReqDetails1(\'top5\',\'Movies\'); " /><b>Movies</b></a> - <a onclick="sndReqDetails1(\'top5\',\'Games\');" /><b>Games</b></a> - <a onclick="sndReqDetails1(\'top5\',\'XXX\'); " /><b>XXX</b></a> - <a onclick="sndReqDetails1(\'top5\',\'Music\'); " /><b>Music</b></a></center>'; ?><br><? $output .= '<div id="i_top5">'; $output .= "<table align=center cellpadding=4 cellspacing=4 style='border-collapse: collapse' bordercolor=#D6D9DB border=1> <tr>"; $cat_sorting = array("Movies" => 3, "XXX" => 1, "Games" => 1, "Music" =>1); foreach ($cat_sorting as $cat => $lim) { $news = mysql_query("SELECT * FROM top5 WHERE category = '".$cat."' ORDER BY date DESC LIMIT ".$lim."")or sqlerr(__FILE__, __LINE__); while ($row = mysql_fetch_array($news)) { extract($row); $output .= "<td width='94'><a href='$link'><img border='0' src='$image' alt=\"$name / $category\" title=\"$name / $category\" width='100' height='153' /></a></td>"; } } $output .= "</tr></table>"; $output .= "</div>"; } /////////////Mod to show torrents from today and the last five days selectable $j = date('Y'); $m = date('m'); $d = date('d'); $count = 0; $tage = 7; //$output .= "<table class=days width=95%><tr class=days>"; while ($count<$tage){ $tag = date('d.m.Y',mktime(0,0,0,$m,$d-$count,$j)); $output .= " <a href=\"index.php?day=$count\"><center>$tag</center></a>"; $count++;} //$output .= "</TR></TABLE>"; $j = date('Y'); $m = date('m'); $d = date('d'); $morgen = date('Y-m-d',mktime(0,0,0,$m,$d+1,$j)); $heute = date('Ymd'); $heute = (isset($_GET['day']) && $_GET['day'] >= 1 && $_GET['day'] <= 4) ? date('Y-m-d', strtotime('-' . ($_GET['day']+0) . ' day')) : date('Y-m-d'); ?><br><? $res85 = mysql_query("SELECT COUNT(*) FROM torrents WHERE torrents.datum='$heute'") or sqlerr(); $arr85 = mysql_fetch_row($res85); $number = $arr85[0]; $output .= "Wenn Ihr eure Torrents eintragt, BITTE lasst irgendwelche speziellen Bezeichnungen weg. Ich meine im speziellen Mystik Torrent, von denen ein paar Spezialisten alles mögliche im Filenamen haben nur nicht das worum es wirklich geht! Also BITTE stellt Euch nicht so doof an und macht es richtig, so bleiben Eure Files auch in der Liste..."; $output .= "<table class=days><tr class=days><td><font size=1px>Torrents posted Today:".$number."</font></td></tr></table><br>"; $output .= "<u><b><font size=2>Torrents vom: " .date_mysql2german($heute). "</font></b></u><br>\n"; $date=date("d.m.y - H:i", time()); ///////////////////////////////////////////////////// foreach ($catt as $catval) { $result = mysql_query("SELECT * FROM torrents LEFT JOIN filetype ON torrents.filetype = filetype.tid LEFT JOIN categories ON torrents.subcat = categories.subid WHERE maincat = '$catval' AND torrents.datum='$heute' $sort")or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($result) == 0) { } else { $output .= '<br /><a name="'.$catnamet[$catval].'"></a><h1><a href="cat.php?id='.$catval.'">'.$catnamet[$catval].'</a></h1>'; $output .= '<table class="tor" cellpadding="1" cellspacing="0" border="0">