/* Project : T-Xore version 0.0.4 released on 06/2006 By Bogaa This piece of software is free to use by anyone and may be redistributed and modified by anyone in any way. We can't be held liable for damage or copyright infringement claims. Read the documentation! Bogaa's Homepage : http://www.meganova.org Project Homepage : http://www.devnova.org */ /* cat. array *******************/ $catt[0] = 1; $catt[1] = 2; $catt[2] = 3; $catt[3] = 4; $catt[4] = 5; $catt[5] = 6; $catt[6] = 7; $catnamet[1] = 'Movies'; $catnamet[2] = 'Series'; $catnamet[3] = 'Music'; $catnamet[4] = 'Games'; $catnamet[5] = 'Software'; $catnamet[6] = 'Anime'; $catnamet[7] = 'Misc'; require_once "config.php"; connect ($dbhost, $dbuser, $dbpass, $database); stheader(''); $sort = tsort ($_GET['sort']); //////////////// $CONF['sql']['size'] = 'size'; $CONF['sql']['tbl_name'] = 'torrents'; $stats = new stats; $stats->conf = $CONF; $stats->runstats(); class stats { var $conf = array(); var $html = ""; function runstats() { $sql = mysql_query("SELECT sum(size) AS size, count(*) AS count FROM torrents"); while ( $data = mysql_fetch_array( $sql ) ) { $data['size'] = $this->get_size( $data['size'] ); $this->html .= "
'; echo '
'; foreach ($catt as $catval) { $result = mysql_query("SELECT * FROM torrents LEFT JOIN categories ON torrents.subcat = categories.subid WHERE maincat = '$catval' $sort LIMIT 10") or die (mysql_error()); if (mysql_num_rows($result) == 0) { } else { echo 'Category | ||||
---|---|---|---|---|
'.$subname.' | '; echo ''.regicon($registration,$tracker).' '.desc($description).''.$torrentname.' | '; echo ''.torsize($size).' | '; //echo ''.getpeer($seeds).' | '; //echo ''.getpeer($peers).' | '; echo '