All pastes #821661 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-12-18 07:29 UTC
rendered paste body
<?php
require 'include/bittorrent.php';
gzip();
dbconn(true);
loggedinorreturn(true);
maxsysop ();
get_referrer ();
$lang->load('index');

//---------------------------------
//---- Get Referrer v0.5 by xam
//---------------------------------
function get_referrer () {
	global $ref;
	if ($ref == 'yes') {
	unset($uref);
	$uref=$_SERVER['HTTP_REFERER'];
		if (isset($uref)) {
			if (!preg_match('/templateshares/i', $uref)) { 
				if (!$_COOKIE['referrer'] || $_COOKIE['referrer'] != $uref) {
					setcookie('referrer', $uref, TIMENOW+3600);  /* expire in 1 hour */
					if ($uref != '')
						sql_query('INSERT INTO referrer (referrer_url) VALUES ('.sqlesc($uref).')');
				}
			}
		}
	}
}
//---------------------------------
//---- Get Referrer v0.5 by xam
//---------------------------------

function legend ($linebreak = true) {
	global $rootpath,$pic_base_url, $lang;
	if ($linebreak)
		echo '<br><br>';
	echo sprintf($lang->global['legend'], $rootpath.$pic_base_url);
}

if (($showwhatsgoinon == 'yes') OR ($showwhatsgoinon == 'staffonly' AND get_user_class() >= UC_MODERATOR)) {
	$no24=false;
	$a = @mysql_fetch_array(@sql_query('SELECT id,username,invisible FROM users WHERE status=\'confirmed\' ORDER BY id DESC LIMIT 1')) or sqlerr(__FILE__, __LINE__);
	if ($CURUSER)
		$latestuser = '<a href=userdetails.php?id=' . $a['id'] . '>' . $a['username'] . '</a>';
	else
		$latestuser = $a['username'];		
	$dt24 = gmtime() - 24 * 60 * 60;
	$arr = mysql_fetch_array(sql_query('SELECT * FROM avps WHERE arg=\'last24\'')) or $no24=true;
	$res=sql_query('SELECT * FROM users WHERE last_access >= \''. get_date_time($dt24). '\' ORDER BY username') or sqlerr(__FILE__, __LINE__);
	$totalonline24 = mysql_num_rows($res);	
	$_ss24 = ($totalonline24 != 1 ? 's' :'');	
	$last24record = get_date_time($arr['value_u']);
	$last24 = $arr['value_i'];
	if ($no24 || $totalonline24 > $last24 )
	{
		$last24 = $totalonline24;	
		$period = strtotime(gmdate('Y-m-d H:i:s'));
		sql_query(($no24 ? 'INSERT':'UPDATE'). " avps SET value_i = $last24 , value_u = $period ". ($no24 ? ", arg='last24'":"WHERE arg='last24'")) or sqlerr(__FILE__,__LINE__);
	}	
	$colors = array(null,'#f9a200','#009F00','#6464FF','#ff5151','#B000B0','#2587A7','darkred');
	$activeusers24 = '';
	while ($arr = mysql_fetch_array($res))
	{
	 	if ($arr['invisible'] == 'yes' AND get_user_class() < UC_MODERATOR AND $arr['id'] != $CURUSER['id'])
	 		continue;
		if ($activeusers24)
			$activeusers24  .= ', ';
		if($arr['class'] != '0')
			$arr['username'] = '<font color='. $colors[$arr['class']] .'>'.$arr['username'].'</font>';		
		if($donator = $arr['donor'] === 'yes');
			$activeusers24 .= '<nobr>';
		if ($warned = $arr['warned'] === 'yes')
			$activeusers24 .= '<nobr>';
		if ($CURUSER)
			$activeusers24 .= '<a href=userdetails.php?id='.$arr['id'].'><b>'.$arr['username'].'</b></a>';
		else
			$activeusers24 .= '<b>'.$arr['username'].'</b>';
		if ($invisible = $arr['invisible'] === 'yes')
			$activeusers24 .= '+';
		if ($donator)
			$activeusers24 .= '<img src=\''.$pic_base_url.'star.gif\' style=\'vertical-align: middle;\' title=\''.$lang->global['imgdonated'].'\'></nobr>';
		if ($warned)
			$activeusers24 .= '<img src=\''.$pic_base_url.'warned.gif\' style=\'vertical-align: middle;\' title=\''.$lang->global['imgwarned'].'\'></nobr>';		
	}
	
	if (!$activeusers24)
		$activeusers24 = $lang->index['nolast24visits'];
}

if (($showstats == 'yes') OR ($showstats == 'staffonly' AND get_user_class() >= UC_MODERATOR)) {
	$unverified = number_format(get_row_count('users', 'WHERE status=\'pending\''));
	$donated = number_format(get_row_count('users', 'WHERE donor = \'yes\''));
	$torrents = number_format(get_row_count('torrents'));
	$dead = number_format(get_row_count('torrents', 'WHERE visible=\'no\''));		
	$seeders = get_row_count('peers', 'WHERE seeder=\'yes\'');
	$leechers = get_row_count('peers', 'WHERE seeder=\'no\'');
	$peers = $seeders + $leechers;
	if ($leechers == 0)
		$ratio = 0;
	else
		$ratio = round($seeders / $leechers * 100);
	$warnedu = number_format(get_row_count('users', 'WHERE warned=\'yes\' OR leechwarn = \'yes\' AND enabled = \'yes\''));
	$disabled = number_format(get_row_count('users', 'WHERE enabled=\'no\''));
	$VIP    = number_format(get_row_count('users', 'WHERE class=\''.UC_VIP.'\''));	
	$result = sql_query('SELECT SUM(downloaded) AS totaldl, SUM(uploaded) AS totalul, COUNT(id) AS totaluser FROM users') or sqlerr(__FILE__, __LINE__);
	$row = mysql_fetch_array($result);
	$totaldownloaded = $row['totaldl'];
	$totaluploaded = $row['totalul'];
	$registered = $row['totaluser'];
}

if (($showwhatsgoinon == 'yes') OR ($showwhatsgoinon == 'staffonly' AND get_user_class() >= UC_MODERATOR)) {
	$dt = gmtime() - 180;
	$dt = sqlesc(get_date_time($dt));
	$res = sql_query('SELECT id, username, class, invisible, donated, warned FROM users WHERE last_access >= '.$dt.' ORDER BY username') or sqlerr(__FILE__, __LINE__);		
	$webtotal = number_format(get_row_count('users', 'WHERE last_access >= '.$dt));	
	$activeusers = '';
	while ($arr = mysql_fetch_array($res))
	{
	 		if ($arr['invisible'] == 'yes' AND get_user_class() < UC_MODERATOR AND $arr['id'] != $CURUSER['id'])
	 		continue;
	 		
		if ($activeusers)
			$activeusers .= ', ';
		switch ($arr['class'])
			{
			case UC_STAFFLEADER:
			$arr['username'] = '<font color=darkred>' . $arr['username'] . '</font>';
			break;
			case UC_SYSOP:
			$arr['username'] = '<font color=#2587A7>' . $arr['username'] . '</font>';
			break;
			case UC_ADMINISTRATOR:
			$arr['username'] = '<font color=#B000B0>' . $arr['username'] . '</font>';
			break;
			case UC_MODERATOR:
			$arr['username'] = '<font color=#ff5151>' . $arr['username'] . '</font>';
			break;
			case UC_UPLOADER:
			$arr['username'] = '<font color=#6464FF>' . $arr['username'] . '</font>';
			break;
			case UC_VIP:
			$arr['username'] = '<font color=#009F00>' . $arr['username'] . '</font>';
			break;
			case UC_POWER_USER:
			$arr['username'] = '<font color=#f9a200>' . $arr['username'] . '</font>';
			break;
			}
	$dispclass = get_user_class_name($arr['class']);
	$donator = $arr['donated'] > 0;
	$warned = $arr['warned'] === 'yes';
	if ($donator)
		$activeusers .= '<nobr>';
	if ($warned)
		$activeusers .= '<nobr>';
	if ($CURUSER)
		$activeusers .= '<a href=userdetails.php?id=' . $arr['id'] . '><b>' . $arr['username'] . '</b></a>';
	else
		$activeusers .= '<b>'.$arr['username'].'</b>';
	if ($invisible = $arr['invisible'] === 'yes')
		$activeusers .= '+';
	if ($donator)
		$activeusers .= '<img src='.$pic_base_url.'star.gif style=\'vertical-align: middle;\' title=\''.$lang->global['imgdonated'].'\'></nobr>';
	if ($warned)
		$activeusers .= '<img src='.$pic_base_url.'warned.gif style=\'vertical-align: middle;\' title=\''.$lang->global['imgwarned'].'\'></nobr>';
	}
	if (!$activeusers)
		$activeusers = $lang->index['noactiveusersonline'];
}
stdhead(sprintf($lang->index['welcome'], $SITENAME));
print('<table class=main border=0 cellspacing=0 cellpadding=0 width=100%><tr><td class=embedded>');


?>

<br><h2>Radio TorrentFlame.org</h2>

<iframe src='http://www.distorsionfm.cl/a/radio.php' width='100%' height='85' frameborder='0' name='radio' marginwidth='0' scrolling="no" marginheight='0'></iframe><br><br>

<?

if (($showshoutbox == 'yes' AND $CURUSER) OR ($showshoutbox == 'staffonly' AND get_user_class() >= UC_MODERATOR)) {
    print("<br><h2>".$lang->index['shoutbox']."</h2>");
    print("<table border='1' cellspacing='0' cellpadding='5' width='100%'><tr><td class=text>\n");
    print("<form action='shoutbox.php' method='get' target='sbox' name='shbox' onSubmit=\"mySubmit()\">\n");
	print($lang->index['message']."<input type='text' maxlength=140 name='shbox_text' size='60' id='shoutbox'>  <input type='submit' value='".$lang->global['buttonshout']."' class='btn'> <input type='reset' value='".$lang->global['buttonclear']."' class='btn'> <input type='hidden' name='sent' value='yes'>\n");
?>
<center><a href="javascript: SmileIT(';-)','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/wink.gif width="20" height="20" border=0></a><a href="javascript: SmileIT(':-P','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/tongue.gif width="20" height="20" border=0></a><a href="javascript: SmileIT(':-)','shbox','shbox_text')"><img border=0 src=<?=$pic_base_url;?>smilies/smile1.gif></a><a href="javascript: SmileIT(':w00t:','shbox','shbox_text')"><img border=0 src=<?=$pic_base_url;?>smilies/w00t.gif></a><a href="javascript: SmileIT(':-D','shbox','shbox_text')"><img border=0 src=<?=$pic_base_url;?>smilies/grin.gif></a><a href="javascript: SmileIT(':lol:','shbox','shbox_text')"><img border=0 src=<?=$pic_base_url;?>smilies/laugh.gif></a><a href="javascript: SmileIT(':-/','shbox','shbox_text')"><img border=0 src=<?=$pic_base_url;?>smilies/confused.gif></a><a href="javascript: SmileIT(':-(','shbox','shbox_text')"><img border=0 src=<?=$pic_base_url;?>smilies/sad.gif></a><a href="javascript: SmileIT(':-O','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/ohmy.gif border=0></a><a href="javascript: SmileIT('8-)','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/cool1.gif width="18" height="18" border=0></a><a href="javascript: SmileIT(':sly:','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/sly.gif width="18" height="18" border=0></a><a href="javascript: SmileIT(':greedy:','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/greedy.gif width="18" height="18" border=0></a><a href="javascript: SmileIT(':weirdo:','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/weirdo.gif width="18" height="18" border=0></a><a href="javascript: SmileIT(':sneaky:','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/sneaky.gif width="18" height="18" border=0></a><a href="javascript: SmileIT(':wacko:','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/wacko.gif width="18" height="18" border=0></a><a href="javascript: SmileIT(':?:','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/question.gif width="18" height="18" border=0></a><a href="javascript: SmileIT(':!:','shbox','shbox_text')"><img src=<?=$pic_base_url;?>smilies/excl.gif width="18" height="18" border=0></a></center>
<b><center><a href="javascript: PopMoreSmiles('shbox','shbox_text')">Mas Emoticones</a></center></b>
<?
	print("<iframe src='shoutbox.php' width='100%' height='250' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe><br><br>\n");
    print('</td></tr></table></form>');
}

print('<h2>'.$lang->index['recentnews']);
if (get_user_class() >= UC_ADMINISTRATOR)
	print(' - <font class=small>[<a class=altlink href='.$BASEURL.'/admin/news.php>'.$lang->index['newspage'].'</a>]</font>');
print('</h2>');
$res = sql_query('SELECT * FROM news WHERE ADDDATE(added, INTERVAL 45 DAY) > NOW() ORDER BY added DESC LIMIT 10') or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0)
{
	print('<table border=1 cellspacing=0 cellpadding=5 width=100%><tr><td class=text><ul>');
	while($array = mysql_fetch_array($res))
	{		
		if ($news_flag == 0) {		
			print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><img border=\"0\" src=\"".$pic_base_url."minus.gif\" id=\"pica".$array['id']."\" title=\"".$lang->global['imgshowhide']."\" alt=\"".$lang->global['imgshowhide']."\">&nbsp;" . gmdate("d.m.Y",strtotime($array['added'])) . " - " ."<b>". htmlspecialchars($array['title']) . "</b> </a>");
			print("<div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0)." </div> ");
			++$news_flag;
		}
		else {		
			print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><br><img border=\"0\" src=\"".$pic_base_url."plus.gif\" id=\"pica".$array['id']."\" title=\"".$lang->global['imgshowhide']."\" alt=\"".$lang->global['imgshowhide']."\">&nbsp;" . gmdate("d.m.Y",strtotime($array['added'])) . " - " ."<b>". htmlspecialchars($array['title']) . "</b></a>");
			print("<div id=\"ka".$array['id']."\" style=\"display: none;\"> ".format_comment($array["body"],0)." </div> ");
		}
		if (get_user_class() >= UC_ADMINISTRATOR)
		{
			print(" <font size=\"-2\"> &nbsp; [<a class=altlink href=$BASEURL/admin/news.php?action=edit&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['SCRIPT_NAME']) . "><b>E</b></a>]</font>");
			print(" <font size=\"-2\">[<a class=altlink href=$BASEURL/admin/news.php?action=delete&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['SCRIPT_NAME']) . "><b>D</b></a>]</font>");
		}
		print("<div id=\"ka".$array['id']."\" style=\"display: none;\"> ".format_comment($array["body"],0)."</div>");
	}
	print('</ul></td></tr></table>');
}

if (($showpolls == 'yes' AND $CURUSER) OR ($showpolls == 'staffonly' AND get_user_class() >= UC_MODERATOR AND $CURUSER)) {
	?>
		<br>		
		<link rel="stylesheet" href="<?=$BASEURL;?>/include/templates/<?=$defaulttemplate;?>/style/ajax-poller.css" type="text/css" media="screen" />
		<script type="text/javascript" src="scripts/ajax.js"></script>
		<script type="text/javascript" src="scripts/ajax-poller.js"></script>
		<form action="<? echo $_SERVER['SCRIPT_NAME']; ?>" onsubmit="return false" method="post" name="poll">
		<table class=main border=0 cellspacing=0 cellpadding=0 width=100%><tr><td class=embedded>
		<div id="poll" style="display: none;"></div>
		<h2><?=$lang->index['latestpoll'];?></h2>
		<table width=100% border=1 cellspacing=0 cellpadding=10>
		<tr><td class=text>	
		<?
		$res = sql_query("select * from poller ORDER by ID DESC LIMIT 1");
		if (mysql_num_rows($res)) {
		$inf = mysql_fetch_array($res);
		$pollerId = (int)$inf['ID'];
		?>
		
		<div class="poller">		
			<div class="poller_question" id="poller_question<? echo $pollerId; ?>">
			<?
			if(($inf)){
				echo "<p class=\"pollerTitle\">".$inf["pollerTitle"]."</p>";
				
				$resOptions = sql_query("select * from poller_option where pollerID='$pollerId' order by pollerOrder");
				while($infOptions = mysql_fetch_array($resOptions)){
					if($infOptions["defaultChecked"])$checked=" checked"; else $checked = "";
					echo "<p class=\"pollerOption\"><input$checked type=\"radio\" value=\"".$infOptions["ID"]."\" name=\"vote[".$inf["ID"]."]\" id=\"pollerOption".$infOptions["ID"]."\"><label for=\"pollerOption".$infOptions["ID"]."\" id=\"optionLabel".$infOptions["ID"]."\">".$infOptions["optionText"]."</label></p>";	
			
				}
			}			
			?>			
			<a href="#poll" onclick="castMyVote(<? echo $pollerId; ?>,document.forms['poll'])"><img src="<?=$pic_base_url;?>vote_button.gif"></a>
			</div>
			<div class="poller_waitMessage" id="poller_waitMessage<? echo $pollerId; ?>">
				<?=$lang->index['gettingresults'];?>
			</div>
			<div class="poller_results" id="poller_results<? echo $pollerId; ?>">
			</div>
		</div>
		
		<script type="text/javascript">
		if(useCookiesToRememberCastedVotes){
			var cookieValue = Poller_Get_Cookie('ts_poller_<? echo $pollerId; ?>');
			if(cookieValue && cookieValue.length>0)displayResultsWithoutVoting(<? echo $pollerId; ?>); 
		
		}
		</script>
	<div class="clear"></div>
</form>
</td></tr></table></td></tr></table>
		<?
		}
	}
if (($showlastxforumposts == 'yes' AND $CURUSER) OR ($showlastxforumposts == 'staffonly' AND get_user_class() >= UC_MODERATOR AND $CURUSER)) {
		$limit = 5; // How many threads you want to show?
		$notin = '16,17,18,20,21,22,23,24'; // Set private forum ids.
		if (get_user_class() >= UC_MODERATOR)
			$extraquery = ' WHERE visible=1';
		else
			$extraquery = ' WHERE visible=1 AND fid NOT IN ('.$notin.')';

		$query = sql_query("SELECT * FROM ".TABLE_PREFIX."threads".$extraquery." ORDER BY `lastpost` DESC LIMIT ".$limit);
		echo '<br><table width=100% id=torrenttable border=1 cellspacing=0 cellpadding=5>
		<tr>'.sprintf($lang->index['latesttopics'], $limit).'
		<td class=colhead align=left>'.$lang->index['topictitle'].'</td>
		<td class=colhead align=center>'.$lang->index['views'].'</td>
		<td class=colhead align=left>'.$lang->index['replies'].'</td>
		<td class=colhead align=center>'.$lang->index['author'].'</td>
		<td class=colhead align=center>'.$lang->index['lastposter'].'</td>
		<td class=colhead align=left>'.$lang->index['postedat'].'</td>
		</tr>';
		while($fetch = mysql_fetch_array($query)){
			$date = gmdate("m-d-Y H:i:s", $fetch['lastpost']);
			echo '<tr>
			<td align=left><a href="'.$BASEURL.'/forums.php?showthread='.$fetch['tid'].'" [b]style="color: orange"[/b]>'.$fetch['subject'].'</a></td>
			<td align=center>'.$fetch['views'].'</td>
			<td align=center>'.$fetch['replies'].'</td>
			<td align=center><a href='.$BASEURL.'/userdetails.php?id='.$fetch['uid'].'>'.$fetch['username'].'</a></td>
			<td align=center><a href='.$BASEURL.'/userdetails.php?id='.$fetch['lastposteruid'].'>'.$fetch['lastposter'].'</a></td>
			<td align=left>'.$date.'</td>
			</tr>';
		}
		echo '</table>';
}
if (($showlastxtorrents == 'yes' AND $CURUSER) OR ($showlastxtorrents == 'staffonly' AND get_user_class() >= UC_MODERATOR AND $CURUSER)) {	
		$sql = 'SELECT torrents.id,torrents.name,torrents.seeders,torrents.leechers,categories.minclassread FROM torrents LEFT JOIN categories ON torrents.category = categories.id where visible=\'yes\' ORDER BY added DESC LIMIT 5';
		$result = sql_query($sql) or die('No torrents found');
		if( mysql_num_rows($result) != 0 )
			{				
				print '<br>'.$lang->index['lasttorrents'].'</center>';
				print'<table border=1 cellspacing=0 cellpadding=5 width=100%>';
				print'<tr>';
				print'<td class=colhead align=left>'.$lang->index['name'].'</td>';
				print'<td class=colhead align=center>'.$lang->index['seeders'].'</td>';
				print'<td class=colhead align=center>'.$lang->index['leechers'].'</td>';
				print'</tr>';
				
				while( $row = mysql_fetch_array($result) )
				{
					if ($CURUSER['class'] < $row['minclassread'])
						continue;
					print'<tr>';
					print'<a href="details.php?id=' . $row['id'] . '&hit=1"><td align=left><a href="details.php?id=' . $row['id'] . '&hit=1"><b>' . htmlspecialchars($row['name']) . '</b></td></a>';
					print'<td align=center>&nbsp;&nbsp;&nbsp;&nbsp;' . $row['seeders'] . '</td>';
					print'<td align=center>&nbsp;&nbsp;&nbsp;&nbsp;' . $row['leechers'] . '</td>';			
					print'</tr>';
				}
				print '</table>';
		}
}
	
	if (($showstats == 'yes' AND $CURUSER) OR ($showstats == 'staffonly' AND get_user_class() >= UC_MODERATOR AND $CURUSER)) {
		?>
		<br>
		<?=$lang->index['trackerstats'];?>
		<table width="100%" class="main" border="1" cellspacing="0" cellpadding="10"><tbody>
		<tr>	
		<td class="rowhead"><div align="right"><?=$lang->index['registeredusers'];?></div></td>
		<td class="rowhead"><div align="right"><b><?=$registered?> / <?=$maxusers?></b></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['unconfirmedusers'];?> <img src=<?=$pic_base_url;?>warned9.gif></div></td>
		<td class="rowhead"><div align="right"><b><?=$unverified?></b></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['torrents'];?></div></td>
		<td class="rowhead"><div align="right"><b><?=$torrents?></b></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['deadtorrents'];?> </div></td>
		<td class="rowhead"><div align="right"><b><?=$dead?></b></div></td>
		</tr>
		<tr>
		<td class="rowhead"><div align="right"><?=$lang->index['warnedusers'];?> <img src=<?=$pic_base_url;?>warned.gif></div></td>
		<td class="rowhead"><div align="right"><b><?=$warnedu?></b></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['bannedusers'];?> <img src=<?=$pic_base_url;?>disabled.gif></div></td>
		<td class="rowhead"><div align="right"><b><?=$disabled?></b></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['seeders'];?> <img src="<?=$pic_base_url;?>torr_seed.png"></div></td>
		<td class="rowhead"><div align="right"><?=$seeders?></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['leechers'];?> <img src="<?=$pic_base_url;?>torr_leech.png"></div></td>
		<td class="rowhead"><div align="right"><?=$leechers?></div></td>
		</tr>
		<tr>
		<td class="rowhead"><div align="right"><?=$lang->index['vips'];?> <img src=<?=$pic_base_url;?>star.gif></div></td>
		<td class="rowhead"><div align="right"><?=$VIP?></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['donors'];?> <img src=<?=$pic_base_url;?>star.gif></div></td>
		<td class="rowhead"><div align="right"><?=$donated?></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['peers'];?> <img src="<?=$pic_base_url;?>torr_seed.png"><img src="<?=$pic_base_url;?>torr_leech.png"></div></td>
		<td class="rowhead"><div align="right"><?=$peers?></div></td>
		<td class="rowhead"><div align="right"><?=$lang->index['seedleechratio'];?></div></td>
		<td class="rowhead"><div align="right"><?=$ratio?></div></td>
		</tr>
		<tr>
		<td colspan="2" class="rowhead"><div align="right"><?=$lang->index['totaldown'];?></div></td>
		<td colspan="2" class="rowhead"><div align="center"><?=mksize($totaldownloaded)?></div></td>
		<td colspan="2" class="rowhead"><div align="right"><?=$lang->index['uotalup'];?></div></td>
		<td colspan="2" class="rowhead"><div align="center"><?=mksize($totaluploaded)?></div></td>
		</tr>
		</tbody></table>
		<?
	}

if (($showtrackerload == 'yes') OR ($showtrackerload == 'staffonly' AND get_user_class() >= UC_MODERATOR)) {
	?>
	<br><?=$lang->index['trackerload'];?>
	<table width=100% border=1 cellspacing=5 cellpadding=10><tr><td align=center>
	<?
	function getmicrotime(){
	    list($usec, $sec) = explode(' ',microtime());
	    return ((float)$usec + (float)$sec);
	    }
	$time_start = getmicrotime();	
	$time = round(getmicrotime() - $time_start,4);
	$percent = $time * 60;	
	$time = round(getmicrotime() - $time_start,4);
	$percent = $time * 60;
	echo "<div align=\"center\">".$lang->index['ourtrackerload']." ($percent %)</div><table class=blocklist align=center border=0 width=400><tr><td style='padding: 0px; background-image: url(".$pic_base_url."loadbarbg.gif); background-repeat: repeat-x'>";	
	if ($percent <= 70) $pic_base_urll = $pic_base_url."loadbargreen.gif";
	     elseif ($percent <= 90) $pic_base_urll = $pic_base_url."loadbaryellow.gif";
	      	else $pic_base_urll = $pic_base_url."loadbarred.gif";
	$width = $percent * 4;
	echo "<img height=15 width=$width src=\"$pic_base_urll\" alt='$percent%'></td></tr></table><br>";
	echo "<center>" . trim(exec('uptime')) . "</center><br>";	
	if (isset($load))
		print("<tr><td class=blocklist>".$lang->index['loadav']." (%)</td><td align=right>$load</td></tr>\n");
	print("<br>");	
	$time = round(getmicrotime() - $time_start,4);
	$percent = $time * 60;
	echo "<div align=\"center\">".$lang->index['globaltrackerload']." ($percent %)</div><table class=main align=center border=0 width=400><tr><td style='padding: 0px; background-image: url(".$pic_base_url."); background-repeat: repeat-x'>";	
	if ($percent <= 70) $pic_base_urll = $pic_base_url."loadbargreen.gif";
	  elseif ($percent <= 90) $pic_base_urll = $pic_base_url."loadbaryellow.gif";
	   else $pic_base_urll = $pic_base_url."loadbarred.gif";
	 $width = $percent * 4;
	echo "<img height=15 width=$width src=\"$pic_base_urll\" alt='$percent%'></td></tr></table></table>";
}

if (($showwhatsgoinon == 'yes') OR ($showwhatsgoinon == 'staffonly' AND get_user_class() >= UC_MODERATOR)) {
	?>
	<table border="1" cellpadding="10" cellspacing="0" width="100%" class="main"><tbody><tr><td align="left" class=embedded>
	<br>
	<?=$lang->index['whatsgoinon'];?>
	<table border=1 cellspacing=0 cellpadding=10 width=100%><tr><td class=text>
	<?=sprintf($lang->index['last24visits'], $totalonline24);?>		
	<?
	//-Mod by Bioadmin--//
	print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><img border=\"0\" src=\"".$pic_base_url."plus.gif\" id=\"pica".$array['id']."\" alt=\"".$lang->global['imgshowhide']."\" title=\"".$lang->global['imgshowhide']."\"></a><u></u><div id=\"ka".$array['id']."\" style=\"display: none;\"><p>$activeusers24</div>\n");
	?>
	<br>
	<?=sprintf($lang->index['newestmember'], $latestuser);?>		
	<br>
	<?=$lang->index['activeusers'];?> <?=$webtotal;?> (<?=$activeusers?>)
	<?=legend();?>
	</td></tr></tbody></table></table>
	<?
}

?>
<table class=main border=0 cellspacing=0 cellpadding=0 width=100%><tr><td class=embedded>
<br><?=$lang->index['diclaimer'];?>
<table width=100% border=1 cellspacing=0 cellpadding=10>
<tr><td class=text>
<div align=justify>
<?=sprintf($lang->index['diclaimermessage'], $DEFAULTBASEURL);?>
</div></table></td></tr></table>
</td></tr></table>
<table class=none border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>
<div align="left"><br>
<?=sprintf($lang->index['note'], $pic_base_url);?>
</div>
</td></tr></table>
<script language=javascript>
function SmileIT(smile,form,text){
   document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
   document.forms[form].elements[text].focus();
}
function PopMoreSmiles(form,name) {
         link='moresmiles.php?form='+form+'&text='+name
         newWin=window.open(link,'moresmile','height=500,width=400,resizable=yes,scrollbars=yes');
         if (window.focus) {newWin.focus()}
}

</script>
<?
stdfoot();
?>