Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Strike
Reply
Thread Tools
  #1  
Old 2nd January 2009, 20:57
marc234 marc234 is offline
Senior Member
 
Join Date: Apr 2008
France
Posts: 38
Default how can I fix the poll to -->> Last 10 Torrents
help :-)

how can I fix the poll to -->> Last 10 Torrents ( torrentstrikefull ) from index

my index:
Code:
<?
ob_start("ob_gzhandler");

require "include/bittorrent.php";
loggedinorreturn();

if ($_SERVER["REQUEST_METHOD"] == "POST")
{
  $choice = $_POST["choice"];
  if ($CURUSER && $choice != "" && $choice < 256 && $choice == floor($choice))
  {
    $res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();
    $arr = mysql_fetch_assoc($res) or die("No poll");
    $pollid = $arr["id"];
    $userid = $CURUSER["id"];
    $res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid && userid=$userid") or sqlerr();
    $arr = mysql_fetch_assoc($res);
    if ($arr) die("Dupe vote");
    mysql_query("INSERT INTO pollanswers VALUES(0, $pollid, $userid, $choice)") or sqlerr();
    if (mysql_affected_rows() != 1)
      stderr("Error", "An error occured. Your vote has not been counted.");
    header("Location: $BASEURL/");
    die;
  }
  else
    //////////////////////////FlashGames/////////////////////////////

$user = $CURUSER['id'];
if($_GET["act"]=="Arcade")
{
if($_POST['gname'] == "asteroids")
{
$game = 1;
$level = 1;
$score = $_POST['score'];
}
if($_POST['gname'] == "breakout")
{
$game = 2;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "hexxagon")
{
$game = 3;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "invaders")
{
$game = 4;
$level = 1;
$score = $_POST['score'];
}
if($_POST['gname'] == "moonlander")
{
$game = 5;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "pacman")
{
$game = 6;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "psol")
{
$game = 7;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "simon")
{
$game = 8;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "snake")
{
$game = 9;
if($_POST['levelName'] == "LEVEL: SLUG")
{
$level = 1;
}
if($_POST['levelName'] == "LEVEL: WORM")
{
$level = 2;
}
if($_POST['levelName'] == "LEVEL: PYTHON")
{
$level = 3;
}
$score = $_POST['score'];
}
if($_POST['gname'] == "tetris")
{
$game = 10;
$level = $_POST['level'];
$score = $_POST['gscore'];
}
mysql_query("INSERT INTO `flashscores` ( `ID` , `game` , `user` , `level` , `score` ) VALUES ( '', '".$game."', '".$user."', '".$level."', '".$score."');") OR DIE(MySQL_ERROR());
$url="flashscores.php";
print("<html><head><meta http-equiv=refresh content='0;url=$url'></head>\n");

}else{
stderr("Error", "An error occured.");
}
}

///////////////////////////////End//////////////////////////////


if ($CURUSER)
{
$a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or die(mysql_error());
if ($CURUSER)
{
$file2 = "$CACHE/index/newestuser.txt";
$expire = 2*60; // 2 minutes
if (file_exists($file2) && filemtime($file2) > (time() - $expire)) {
    $newestuser = unserialize(file_get_contents($file2));
} else {

$res = mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1") or die(mysql_error());
while ($user = mysql_fetch_array($res) ) {
        $newestuser[] = $user;
    }
    $OUTPUT = serialize($newestuser);
    $fp = fopen($file2,"w");
    fputs($fp, $OUTPUT);
    fclose($fp);
} // end else
foreach ($newestuser as $a)
{
  $latestuser = "<a href=userdetails.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";
}
}

$file = "$CACHE/index/stats.txt";
$expire = 10*60; // 10 minutes
if (file_exists($file) &&
    filemtime($file) > (time() - $expire)) {
$a=unserialize(file_get_contents($file));
$male = $a[1];
$female= $a[2];
$registered = $a[3];
$unverified = $a[4];
$torrents = $a[5];
$ratio = $a[6];
$peers = $a[7];
$seeders = $a[8];
$leechers = $a[9];
$dead = $a[10];
$NAT = $a[11];
} else {
$male = number_format(get_row_count("users", "WHERE gender='Male'"));  
$female = number_format(get_row_count("users", "WHERE gender='Female'"));
$registered = number_format(get_row_count("users"));
$unverified = number_format(get_row_count("users", "WHERE status='pending'"));
$torrents = number_format(get_row_count("torrents"));
$dead = number_format(get_row_count("torrents", "WHERE visible='no'"));
$NAT    = number_format(get_row_count("peers", "WHERE connectable='no'"));

$r = mysql_query("SELECT value_u FROM avps WHERE arg='seeders'") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$seeders = 0 + $a[0];
$r = mysql_query("SELECT value_u FROM avps WHERE arg='leechers'") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$leechers = 0 + $a[0];
$seeders = get_row_count("peers", "WHERE seeder='yes'");
$leechers = get_row_count("peers", "WHERE seeder='no'"); 
if ($leechers == 0)
  $ratio = 0;
else
  $ratio = round($seeders / $leechers * 100);
$peers = number_format($seeders + $leechers);
$seeders = number_format($seeders);
$leechers = number_format($leechers);
$stats1 = array(1 => "$male", "$female", "$registered", "$unverified", "$torrents", "$ratio", "$peers", "$seeders", "$leechers", "$dead", "$NAT");
$stats2 = serialize($stats1);
$fh = fopen($file, "w");
fwrite($fh,$stats2);
fclose($fh);
}
}

stdhead();
//echo "<font class=\"small\">Welcome to our newest member, <b>$latestuser</b>!</font>\n";

$news_title = "Recent news";

print("<table width=\"100%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"embedded\">");
//print("<h2>Recent news");
if (get_user_class() >= UC_ADMINISTRATOR)
$news_title.=" - <font class=\"small\">[<a class=\"altlink\" href=\"news.php\"><b>News page</b></a>]</font>";
//print("</h2>\n");
$res = mysql_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 width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td class=\"text\">\n<ul>");
begin_frame($news_title,false,5);
print("<ul>");
while($array = mysql_fetch_array($res))
{
$user = mysql_fetch_assoc(mysql_query("SELECT username FROM users WHERE id = $array[userid]")) or sqlerr();
if ($news_flag == 0) {

print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><br><img border=\"0\" src=\"pic/minus.gif\" id=\"pica".$array['id']."\" alt=\"Show/Hide\">&nbsp;" . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b>". $array['title'] . "</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Posted by $user[username] </a>");
print("<p>");
print("<div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0)." </div><br> ");

$news_flag = 1;
}
else {

print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><br><img border=\"0\" src=\"pic/plus.gif\" id=\"pica".$array['id']."\" alt=\"Show/Hide\">&nbsp;" . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b>". $array['title'] . "</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Posted by $user[username] </a>");
print("<div id=\"ka".$array['id']."\" style=\"display: none;\"> ".format_comment($array["body"],0)." </div><br> ");
}
if (get_user_class() >= UC_ADMINISTRATOR)
{
print(" <font size=\"-2\"> &nbsp; [<a class=altlink href=news.php?action=edit&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><b>E</b></a>]</font>");
print(" <font size=\"-2\">[<a class=altlink href=news.php?action=delete&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><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>\n");
end_frame();
}

 if ($CURUSER)
{
  // Get current Last 10 Torrents
  $res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();
  if($pollok=(mysql_num_rows($res)))
  {
  	$arr = mysql_fetch_assoc($res);
  	$pollid = $arr["id"];
  	$userid = $CURUSER["id"];
  	$question = $arr["question"];
  	$o = array($arr["option0"], $arr["option1"], $arr["option2"], $arr["option3"], $arr["option4"],
    	$arr["option5"], $arr["option6"], $arr["option7"], $arr["option8"], $arr["option9"],
    	$arr["option10"], $arr["option11"], $arr["option12"], $arr["option13"], $arr["option14"],
    	$arr["option15"], $arr["option16"], $arr["option17"], $arr["option18"], $arr["option19"]);

  // Check if user has already voted
  	$res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid AND userid=$userid") or sqlerr();
  	$arr2 = mysql_fetch_assoc($res);
  }

  //print("<h2>Poll");
  
  $poll_title = "Poll";

  if (get_user_class() >= UC_MODERATOR)
  {
  	$poll_title.="<font class=\"small\">";
		$poll_title.=" - [<a class=\"altlink\" href=\"makepoll.php?returnto=main\"><b>New Poll</b></a>]\n";
		if($pollok) {
  		$poll_title.=" - [<a class=\"altlink\" href=\"makepoll.php?action=edit&amp;pollid=$arr[id]&amp;returnto=main\"><b>Edit</b></a>]\n";
			$poll_title.=" - [<a class=\"altlink\" href=\"polls.php?action=delete&amp;pollid=$arr[id]&amp;returnto=main\"><b>Delete</b></a>]";
		}
		$poll_title.="</font>";
	}
	//print("</h2>\n");
	if($pollok) {
		//print("<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td align=\"center\">\n");
		begin_frame($poll_title,true,5);
  	print("<table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"text\">");
  	print("<p align=\"center\"><b>$question</b></p>\n");
  	$voted = $arr2;
  	if ($voted)
  	{
    	// display results
    	if ($arr["selection"])
      	$uservote = $arr["selection"];
    	else
      	$uservote = -1;
			// we reserve 255 for blank vote.
    	$res = mysql_query("SELECT selection FROM pollanswers WHERE pollid=$pollid AND selection < 20") or sqlerr();

    	$tvotes = mysql_num_rows($res);

    	$vs = array(); // array of
    	$os = array();

    	// Count votes
    	while ($arr2 = mysql_fetch_row($res))
      	$vs[$arr2[0]] += 1;

    	reset($o);
    	for ($i = 0; $i < count($o); ++$i)
      	if ($o[$i])
        	$os[$i] = array($vs[$i], $o[$i]);

    	function srt($a,$b)
    	{
      	if ($a[0] > $b[0]) return -1;
      	if ($a[0] < $b[0]) return 1;
      	return 0;
    	}

    	// now os is an array like this: array(array(123, "Option 1"), array(45, "Option 2"))
    	if ($arr["sort"] == "yes")
    		usort($os, srt);

    	print("<table class=\"main\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
    	$i = 0;
    	while ($a = $os[$i])
    	{
      	if ($i == $uservote)
        	$a[1] .= "&nbsp;*";
      	if ($tvotes == 0)
      		$p = 0;
      	else
      		$p = round($a[0] / $tvotes * 100);
      	if ($i % 2)
        	$c = "";
      	else
        	$c = "";
      	print("<tr><td width=\"1%\" class=\"embedded\" $c>" . $a[1] . "&nbsp;&nbsp;</td><td width=\"99%\" class=\"embedded\" $c>" .
        	"<img src=\"pic/bar_left.gif\" alt=\"\" /><img src=\"pic/bar.gif\" height=\"9\" width=\"" . ($p * 3) .
        	"\" alt=\"\" /><img src=\"pic/bar_right.gif\" alt=\"\" /> $p%</td></tr>\n");
      	++$i;
    	}
    	print("</table>\n");
			$tvotes = number_format($tvotes);
    	print("<p align=\"center\">Votes: $tvotes</p>\n");
  	}
  	else
  	{
    	print("<form method=\"post\" action=\"index.php\">\n");
    	$i = 0;
    	while ($a = $o[$i])
    	{
      	print("<input type=\"radio\" name=\"choice\" value=\"$i\" />$a<br />\n");
      	++$i;
    	}
    	print("<br />");
    	print("<input type=\"radio\" name=\"choice\" value=\"255\" />Blank vote (a.k.a. \"I just want to see the results!\")<br />\n");
    	print("<p align=\"center\"><input type=\"submit\" value=\"Vote!\" class=\"btn\" /></p></form>");
  	}
?>
</td></tr></table>
<?
if ($voted)
  print("<p align=\"center\"><a href=\"polls.php\">Previous polls</a></p>\n");
end_frame();
?>



<?
	} else {
      begin_frame($poll_title,true,5);
      echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td align=\"center\">\n";
  	echo "<table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"text\">";
  	echo"<h3>No Active Polls</h3>\n";
  	echo "</td></tr></table></td></tr></table>";
      end_frame();
	}
}
?>
<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();
}
</script>
<script LANGUAGE="JavaScript"><!--
function mySubmit() {
   setTimeout('document.shbox.reset()',100);
}
//--></SCRIPT>
<?begin_frame("shoutbox",true,5);?>
<iframe src='./shoutbox.php' width='100%' height='200' align='center' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe><br><br>
<form action='./shoutbox.php' method='get' target='sbox' name='shbox' onSubmit="mySubmit()">
<p align="center">Message: <input type='text' name='shbox_text' size='80'> <input type='submit' value=' Shout '>
<input type='hidden' name='sent' value='yes'><br>
<center><font size="1"><a href='./shoutbox.php' target='sbox'>refresh</a><span class="smallfont"></center>
<center><a href="javascript: SmileIT(':-)','shbox','shbox_text')"><img border=0 src=pic/smilies/smile1.gif></a>
<a href="javascript: SmileIT(':smile:','shbox','shbox_text')"><img border=0 src=pic/smilies/smile2.gif></a>
<a href="javascript: SmileIT(':-D','shbox','shbox_text')"><img border=0 src=pic/smilies/grin.gif></a>
<a href="javascript: SmileIT(':evo:','shbox','shbox_text')"><img src=pic/smilies/evo.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':-|','shbox','shbox_text')"><img border=0 src=pic/smilies/noexpression.gif></a>
<a href="javascript: SmileIT(':-/','shbox','shbox_text')"><img border=0 src=pic/smilies/confused.gif></a>
<a href="javascript: SmileIT(':-(','shbox','post')"><img border=0 src=pic/smilies/sad.gif></a>
<a href="javascript: SmileIT(':weep:','shbox','shbox_text')"><img src=pic/smilies/weep.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':-O','shbox','shbox_text')"><img src=pic/smilies/ohmy.gif border=0></a>
<a href="javascript: SmileIT('8-)','shbox','shbox_text')"><img src=pic/smilies/cool1.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':yawn:','shbox','shbox_text')"><img src=pic/smilies/yawn.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':sly:','shbox','shbox_text')"><img src=pic/smilies/sly.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':greedy:','shbox','shbox_text')"><img src=pic/smilies/greedy.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':weirdo:','shbox','shbox_text')"><img src=pic/smilies/weirdo.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':sneaky:','shbox','shbox_text')"><img src=pic/smilies/sneaky.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':kiss:','shbox','shbox_text')"><img src=pic/smilies/kiss.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':geek:','shbox','shbox_text')"><img src=pic/smilies/geek.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':evil:','shbox','shbox_text')"><img src=pic/smilies/evil.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':yucky:','shbox','shbox_text')"><img src=pic/smilies/yucky.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':shit:','shbox','shbox_text')"><img src=pic/smilies/shit.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':?:','shbox','shbox_text')"><img src=pic/smilies/question.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':!:','shbox','shbox_text')"><img src=pic/smilies/idea.gif width="18" height="18" border=0></a></center>
</td></form>
<?end_frame();?>

<?begin_frame(Stats,true,5);?>
<?begin_table();?>
<tr><td class="rowhead">Users Registered</td><td class="rowhead" align="right"><?=$registered?></td></tr>
<tr><td class="rowhead2">Users Unverified</td><td class="rowhead2" align=right><?=$unverified?></td></tr>
<tr><td class="rowhead">Male Users</td><td class="rowhead" align="right"><?=$male?></td></tr>
<tr><td class="rowhead2">Female Users</td><td class="rowhead2" align=right><?=$female?></td></tr>
<tr><td class="rowhead">Unconnectable Users</td><td class="rowhead" align="right"><?=$NAT?></td></tr>


</table></td>
<td align="center" style="border: none;"><table class=main border=1 cellspacing=0 cellpadding=5>
<?begin_table();?>
<tr><td class="rowhead">Torrents</td><td class="rowhead" align=right><?=$torrents?></td></tr>
<tr><td class="rowhead2">Dead Torrents</td><td class="rowhead2" align=right><?=$dead?></td></tr>
<tr><td class="rowhead">Total Peers Ratio</td><td class="rowhead" align=right><?=$peers?></td></tr>
<? if (isset($peers)) { ?>
<tr><td class="rowhead2">Seeders</td><td class="rowhead2" align=right><?=$seeders?></td></tr>
<tr><td class="rowhead">Leechers</td><td class="rowhead" align=right><?=$leechers?></td></tr>
<tr><td class="rowhead2">Leechers/Seeders (%)</td><td class="rowhead2" align=right><?=$ratio?></td></tr>

</table></td>
<td align="center" style="border: none;"><table class=main border=1 cellspacing=0 cellpadding=5>
<?begin_table();?>
<tr><td class="rowhead">Last Lottery</td><td class="rowhead" align="left"><?=count($who_won)?> <?=$winners?></td></tr>
<tr><td class="rowhead2">Last Lottery <?=$winners?></td><td class="rowhead2" align="left"><?=$lottery_winners?></td></tr>
<tr><td class="rowhead">Last Amount Won<?=$each?></td><td class="rowhead" align="left"><?=mksize($arr_config['lottery_winners_amount'])?></td></tr>
<tr><td class="rowhead2">Date Of Last Lottery</td><td class="rowhead2" align="left"><?=$arr_config['lottery_winners_time']?></td></tr>
<? } ?>
<?end_table();?>
<?end_frame();?>


<? //WILBA'S SERVERLOAD//
begin_frame("Server load",true,5);?>
<?
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\">Our Tracker Load: ($percent %)</div><table class=blocklist align=center border=0 width=400><tr><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x'>";

//TRACKER LOAD
if ($percent <= 70) $pic_base_url = "pic/loadbargreen.gif";
     elseif ($percent <= 90) $pic_base_url = "pic/loadbaryellow.gif";
      else $pic_base_url = "pic/loadbarred.gif";
           $width = $percent * 4;
echo "<img height=15 width=$width src=\"$pic_base_url\" alt='$percent%'></td></tr></table><br>";
echo "<center>" . trim(exec('uptime')) . "</center><br>";

if (isset($load))
print("<tr><td class=blocklist>10min load average (%)</td><td align=right>$load</td></tr>\n");

print (date("l d<\sup>S</\sup> F Y h:i A"));

$time = round(getmicrotime() - $time_start,4);
$percent = $time * 60;
echo "<div align=\"center\">Global Server Load (All websites on current host servers): ($percent %)</div><table class=blocklist align=center border=0 width=400><tr><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x'>";

if ($percent <= 70) $pic_base_url = "pic/loadbargreen.gif";
  elseif ($percent <= 90) $pic_base_url = "pic/loadbaryellow.gif";
   else $pic_base_url = "pic/loadbarred.gif";
        $width = $percent * 4;
echo "<img height=15 width=$width src=\"$pic_base_url\" alt='$percent%'></td></tr></table>";
?>
<br>
<?end_frame();?>


<?

// ---- online users
if($CURUSER) {
   $f_sql = 'SELECT friendid FROM friends WHERE userid='.$CURUSER['id'];
   $f_res = mysql_query($f_sql);
   while($farr = mysql_fetch_object($f_res)) {
        $friends[] = $farr->friendid;
   }
}
$dt = gmtime() - 300;
$dt = sqlesc(get_date_time($dt));
$numberactive = number_format(get_row_count("users", "WHERE last_access >=$dt"));
$res = mysql_query("SELECT id, username, class, avatar, warned, donor FROM users WHERE last_access >=$dt ORDER BY class DESC") or print(mysql_error());
while ($arr = mysql_fetch_assoc($res))
{
  if ($activeusers) $activeusers .= ",\n";
  switch ($arr["class"])
  {
   case UC_SYSOP:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#0F6CEE>" . $arr["username"] . "</font></a>";
      break;
    case UC_ADMINISTRATOR:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#30EE0F>" . $arr["username"] . "</font></a>";
      break;
    case UC_MODERATOR:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#EE950F>" . $arr["username"] . "</font></a>";
      break;
     case UC_UPLOADER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#EAEE0F>" . $arr["username"] . "</font></a>";
      break;
     case UC_VIP:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#9C2FE0>" . $arr["username"] . "</font></a>";
      break;
     case UC_POWER_USER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#D21E36>" . $arr["username"] . "</font></a>";
      break;
    case UC_USER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#000000>" . $arr["username"] . "</font></a>";
      break;
  }

 
if(@in_array($arr['id'],$friends))
$arr["username"] = "<font color=#4040CO>" . $arr["username"] . "<img src=pic/friend.jpg alt='Friend'>" . "</font>";

if ($arr["donor"] == "yes")  $star = "<img src=\"pic/star.gif\" alt=\"Donated\"/>";
else $star = "";

if ($arr["warned"] == "yes")  $warn = "<img src=\"pic/warned.gif\" alt=\"Warned\"/>";
else $warn = "";

$donator = $arr["donated"] > 0;

  if ($donator)
    $activeusers .= "";
    $activeusers .= "" . $arr["username"] . $star . $warn . "";
  if ($donator)
    $activeusers .= "";

}
if (!$activeusers)
  $activeusers = "There have been no active users in the last 15 minutes.";
 

?>
 <? begin_frame("Users Online (".$numberactive.")",false,5) ?>
 
 
<?
begin_table(true);
echo "<tr><td class=\"colhead\">";
echo $activeusers;
echo "</td></tr>";
end_table();
?>

<center>
<font class="small" color="#0F6CEE">Sysop</font> | 
<font class="small" color="#30EE0F">Administator</font> | 
<font class="small" color="#EE950F">Moderator</font> | 
<font class="small" color="#EAEE0F">Uploader</font> | 
<font class="small" color="#9C2FE0">VIP</font> | 
<font class="small" color="#D21E36">PowerUser</font> | User


<?
echo "<br/><font class=\"small\">Welcome to our newest member <b>$latestuser</b>!</font></center>\n";
end_frame ();
// -------------------------------


?> 




<p><font class="small">Disclaimer: None of the files shown here are actually hosted on this server. The links are provided solely by this site's users.
The administrator of this site (torrentstrike.info) cannot be held responsible for what its users post, or any other actions of its users.
You may not use this site to distribute or download any material when you do not have the legal rights to do so.
It is your own responsibility to adhere to these terms.</font></p>


</td></tr></table>

<?
stdfoot();
?>

Last 10 Torrents:
Code:
<?begin_frame("Last 10 Torrents",true,5);?>
<?
//Start of Last X torrents with poster and marquee mod
$query="SELECT id, name, poster FROM torrents WHERE poster <> '' ORDER BY added DESC LIMIT 10";
$result=mysql_query($query);$num = mysql_num_rows($result);
print("<marquee scrollAmount=3 onMouseover=this.scrollAmount=0 onMouseout=this.scrollAmount=3 scrolldelay=0 direction=left>");
while ($row = mysql_fetch_assoc($result))  {
$id = $row['id'];
$name = $row['name'];
$poster = $row['poster'];
$name = str_replace('_', ' ' , $name);
$name = str_replace('.', ' ' , $name);
$name = substr($name, 0, 50);
print("<a href=$BASEURL/details.php?id=$id title=$name><img src=$poster width=100 height=142 title=$name border=0></a>");
}
print("</marquee></tr>");
//End of Last X torrents with poster and marquee mod

?>
<?end_frame();?>
Thanks
Reply With Quote
  #2  
Old 2nd January 2009, 21:15
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
Code:
<?
ob_start("ob_gzhandler");

require "include/bittorrent.php";
loggedinorreturn();

if ($_SERVER["REQUEST_METHOD"] == "POST")
{
  $choice = $_POST["choice"];
  if ($CURUSER && $choice != "" && $choice < 256 && $choice == floor($choice))
  {
    $res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();
    $arr = mysql_fetch_assoc($res) or die("No poll");
    $pollid = $arr["id"];
    $userid = $CURUSER["id"];
    $res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid && userid=$userid") or sqlerr();
    $arr = mysql_fetch_assoc($res);
    if ($arr) die("Dupe vote");
    mysql_query("INSERT INTO pollanswers VALUES(0, $pollid, $userid, $choice)") or sqlerr();
    if (mysql_affected_rows() != 1)
      stderr("Error", "An error occured. Your vote has not been counted.");
    header("Location: $BASEURL/");
    die;
  }
  else
    //////////////////////////FlashGames/////////////////////////////

$user = $CURUSER['id'];
if($_GET["act"]=="Arcade")
{
if($_POST['gname'] == "asteroids")
{
$game = 1;
$level = 1;
$score = $_POST['score'];
}
if($_POST['gname'] == "breakout")
{
$game = 2;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "hexxagon")
{
$game = 3;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "invaders")
{
$game = 4;
$level = 1;
$score = $_POST['score'];
}
if($_POST['gname'] == "moonlander")
{
$game = 5;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "pacman")
{
$game = 6;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "psol")
{
$game = 7;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "simon")
{
$game = 8;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "snake")
{
$game = 9;
if($_POST['levelName'] == "LEVEL: SLUG")
{
$level = 1;
}
if($_POST['levelName'] == "LEVEL: WORM")
{
$level = 2;
}
if($_POST['levelName'] == "LEVEL: PYTHON")
{
$level = 3;
}
$score = $_POST['score'];
}
if($_POST['gname'] == "tetris")
{
$game = 10;
$level = $_POST['level'];
$score = $_POST['gscore'];
}
mysql_query("INSERT INTO `flashscores` ( `ID` , `game` , `user` , `level` , `score` ) VALUES ( '', '".$game."', '".$user."', '".$level."', '".$score."');") OR DIE(MySQL_ERROR());
$url="flashscores.php";
print("<html><head><meta http-equiv=refresh content='0;url=$url'></head>\n");

}else{
stderr("Error", "An error occured.");
}
}

///////////////////////////////End//////////////////////////////


if ($CURUSER)
{
$a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or die(mysql_error());
if ($CURUSER)
{
$file2 = "$CACHE/index/newestuser.txt";
$expire = 2*60; // 2 minutes
if (file_exists($file2) && filemtime($file2) > (time() - $expire)) {
    $newestuser = unserialize(file_get_contents($file2));
} else {

$res = mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1") or die(mysql_error());
while ($user = mysql_fetch_array($res) ) {
        $newestuser[] = $user;
    }
    $OUTPUT = serialize($newestuser);
    $fp = fopen($file2,"w");
    fputs($fp, $OUTPUT);
    fclose($fp);
} // end else
foreach ($newestuser as $a)
{
  $latestuser = "<a href=userdetails.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";
}
}

$file = "$CACHE/index/stats.txt";
$expire = 10*60; // 10 minutes
if (file_exists($file) &&
    filemtime($file) > (time() - $expire)) {
$a=unserialize(file_get_contents($file));
$male = $a[1];
$female= $a[2];
$registered = $a[3];
$unverified = $a[4];
$torrents = $a[5];
$ratio = $a[6];
$peers = $a[7];
$seeders = $a[8];
$leechers = $a[9];
$dead = $a[10];
$NAT = $a[11];
} else {
$male = number_format(get_row_count("users", "WHERE gender='Male'"));  
$female = number_format(get_row_count("users", "WHERE gender='Female'"));
$registered = number_format(get_row_count("users"));
$unverified = number_format(get_row_count("users", "WHERE status='pending'"));
$torrents = number_format(get_row_count("torrents"));
$dead = number_format(get_row_count("torrents", "WHERE visible='no'"));
$NAT    = number_format(get_row_count("peers", "WHERE connectable='no'"));

$r = mysql_query("SELECT value_u FROM avps WHERE arg='seeders'") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$seeders = 0 + $a[0];
$r = mysql_query("SELECT value_u FROM avps WHERE arg='leechers'") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$leechers = 0 + $a[0];
$seeders = get_row_count("peers", "WHERE seeder='yes'");
$leechers = get_row_count("peers", "WHERE seeder='no'"); 
if ($leechers == 0)
  $ratio = 0;
else
  $ratio = round($seeders / $leechers * 100);
$peers = number_format($seeders + $leechers);
$seeders = number_format($seeders);
$leechers = number_format($leechers);
$stats1 = array(1 => "$male", "$female", "$registered", "$unverified", "$torrents", "$ratio", "$peers", "$seeders", "$leechers", "$dead", "$NAT");
$stats2 = serialize($stats1);
$fh = fopen($file, "w");
fwrite($fh,$stats2);
fclose($fh);
}
}

stdhead();
//echo "<font class=\"small\">Welcome to our newest member, <b>$latestuser</b>!</font>\n";

$news_title = "Recent news";

print("<table width=\"100%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"embedded\">");
//print("<h2>Recent news");
if (get_user_class() >= UC_ADMINISTRATOR)
$news_title.=" - <font class=\"small\">[<a class=\"altlink\" href=\"news.php\"><b>News page</b></a>]</font>";
//print("</h2>\n");
$res = mysql_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 width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td class=\"text\">\n<ul>");
begin_frame($news_title,false,5);
print("<ul>");
while($array = mysql_fetch_array($res))
{
$user = mysql_fetch_assoc(mysql_query("SELECT username FROM users WHERE id = $array[userid]")) or sqlerr();
if ($news_flag == 0) {

print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><br><img border=\"0\" src=\"pic/minus.gif\" id=\"pica".$array['id']."\" alt=\"Show/Hide\">&nbsp;" . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b>". $array['title'] . "</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Posted by $user[username] </a>");
print("<p>");
print("<div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0)." </div><br> ");

$news_flag = 1;
}
else {

print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><br><img border=\"0\" src=\"pic/plus.gif\" id=\"pica".$array['id']."\" alt=\"Show/Hide\">&nbsp;" . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b>". $array['title'] . "</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Posted by $user[username] </a>");
print("<div id=\"ka".$array['id']."\" style=\"display: none;\"> ".format_comment($array["body"],0)." </div><br> ");
}
if (get_user_class() >= UC_ADMINISTRATOR)
{
print(" <font size=\"-2\"> &nbsp; [<a class=altlink href=news.php?action=edit&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><b>E</b></a>]</font>");
print(" <font size=\"-2\">[<a class=altlink href=news.php?action=delete&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><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>\n");
end_frame();
}

 if ($CURUSER)
{
  // Get current Last 10 Torrents
  $res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();
  if($pollok=(mysql_num_rows($res)))
  {
      $arr = mysql_fetch_assoc($res);
      $pollid = $arr["id"];
      $userid = $CURUSER["id"];
      $question = $arr["question"];
      $o = array($arr["option0"], $arr["option1"], $arr["option2"], $arr["option3"], $arr["option4"],
        $arr["option5"], $arr["option6"], $arr["option7"], $arr["option8"], $arr["option9"],
        $arr["option10"], $arr["option11"], $arr["option12"], $arr["option13"], $arr["option14"],
        $arr["option15"], $arr["option16"], $arr["option17"], $arr["option18"], $arr["option19"]);

  // Check if user has already voted
      $res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid AND userid=$userid") or sqlerr();
      $arr2 = mysql_fetch_assoc($res);
  }

  //print("<h2>Poll");
  
  $poll_title = "Poll";

  if (get_user_class() >= UC_MODERATOR)
  {
      $poll_title.="<font class=\"small\">";
        $poll_title.=" - [<a class=\"altlink\" href=\"makepoll.php?returnto=main\"><b>New Poll</b></a>]\n";
        if($pollok) {
          $poll_title.=" - [<a class=\"altlink\" href=\"makepoll.php?action=edit&amp;pollid=$arr[id]&amp;returnto=main\"><b>Edit</b></a>]\n";
            $poll_title.=" - [<a class=\"altlink\" href=\"polls.php?action=delete&amp;pollid=$arr[id]&amp;returnto=main\"><b>Delete</b></a>]";
        }
        $poll_title.="</font>";
    }
    //print("</h2>\n");
    if($pollok) {
        //print("<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td align=\"center\">\n");
        begin_frame($poll_title,true,5);
      print("<table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"text\">");
      print("<p align=\"center\"><b>$question</b></p>\n");
      $voted = $arr2;
      if ($voted)
      {
        // display results
        if ($arr["selection"])
          $uservote = $arr["selection"];
        else
          $uservote = -1;
            // we reserve 255 for blank vote.
        $res = mysql_query("SELECT selection FROM pollanswers WHERE pollid=$pollid AND selection < 20") or sqlerr();

        $tvotes = mysql_num_rows($res);

        $vs = array(); // array of
        $os = array();

        // Count votes
        while ($arr2 = mysql_fetch_row($res))
          $vs[$arr2[0]] += 1;

        reset($o);
        for ($i = 0; $i < count($o); ++$i)
          if ($o[$i])
            $os[$i] = array($vs[$i], $o[$i]);

        function srt($a,$b)
        {
          if ($a[0] > $b[0]) return -1;
          if ($a[0] < $b[0]) return 1;
          return 0;
        }

        // now os is an array like this: array(array(123, "Option 1"), array(45, "Option 2"))
        if ($arr["sort"] == "yes")
            usort($os, srt);

        print("<table class=\"main\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
        $i = 0;
        while ($a = $os[$i])
        {
          if ($i == $uservote)
            $a[1] .= "&nbsp;*";
          if ($tvotes == 0)
              $p = 0;
          else
              $p = round($a[0] / $tvotes * 100);
          if ($i % 2)
            $c = "";
          else
            $c = "";
          print("<tr><td width=\"1%\" class=\"embedded\" $c>" . $a[1] . "&nbsp;&nbsp;</td><td width=\"99%\" class=\"embedded\" $c>" .
            "<img src=\"pic/bar_left.gif\" alt=\"\" /><img src=\"pic/bar.gif\" height=\"9\" width=\"" . ($p * 3) .
            "\" alt=\"\" /><img src=\"pic/bar_right.gif\" alt=\"\" /> $p%</td></tr>\n");
          ++$i;
        }
        print("</table>\n");
            $tvotes = number_format($tvotes);
        print("<p align=\"center\">Votes: $tvotes</p>\n");
      }
      else
      {
        print("<form method=\"post\" action=\"index.php\">\n");
        $i = 0;
        while ($a = $o[$i])
        {
          print("<input type=\"radio\" name=\"choice\" value=\"$i\" />$a<br />\n");
          ++$i;
        }
        print("<br />");
        print("<input type=\"radio\" name=\"choice\" value=\"255\" />Blank vote (a.k.a. \"I just want to see the results!\")<br />\n");
        print("<p align=\"center\"><input type=\"submit\" value=\"Vote!\" class=\"btn\" /></p></form>");
      }
?>
</td></tr></table>
<?
if ($voted)
  print("<p align=\"center\"><a href=\"polls.php\">Previous polls</a></p>\n");
end_frame();
?>



<?
    } else {
      begin_frame($poll_title,true,5);
      echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td align=\"center\">\n";
      echo "<table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"text\">";
      echo"<h3>No Active Polls</h3>\n";
      echo "</td></tr></table></td></tr></table>";
      end_frame();
    }
}
?>
<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();
}
</script>
<script LANGUAGE="JavaScript"><!--
function mySubmit() {
   setTimeout('document.shbox.reset()',100);
}
//--></SCRIPT>
<?begin_frame("shoutbox",true,5);?>
<iframe src='./shoutbox.php' width='100%' height='200' align='center' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe><br><br>
<form action='./shoutbox.php' method='get' target='sbox' name='shbox' onSubmit="mySubmit()">
<p align="center">Message: <input type='text' name='shbox_text' size='80'> <input type='submit' value=' Shout '>
<input type='hidden' name='sent' value='yes'><br>
<center><font size="1"><a href='./shoutbox.php' target='sbox'>refresh</a><span class="smallfont"></center>
<center><a href="javascript: SmileIT(':-)','shbox','shbox_text')"><img border=0 src=pic/smilies/smile1.gif></a>
<a href="javascript: SmileIT(':smile:','shbox','shbox_text')"><img border=0 src=pic/smilies/smile2.gif></a>
<a href="javascript: SmileIT(':-D','shbox','shbox_text')"><img border=0 src=pic/smilies/grin.gif></a>
<a href="javascript: SmileIT(':evo:','shbox','shbox_text')"><img src=pic/smilies/evo.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':-|','shbox','shbox_text')"><img border=0 src=pic/smilies/noexpression.gif></a>
<a href="javascript: SmileIT(':-/','shbox','shbox_text')"><img border=0 src=pic/smilies/confused.gif></a>
<a href="javascript: SmileIT(':-(','shbox','post')"><img border=0 src=pic/smilies/sad.gif></a>
<a href="javascript: SmileIT(':weep:','shbox','shbox_text')"><img src=pic/smilies/weep.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':-O','shbox','shbox_text')"><img src=pic/smilies/ohmy.gif border=0></a>
<a href="javascript: SmileIT('8-)','shbox','shbox_text')"><img src=pic/smilies/cool1.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':yawn:','shbox','shbox_text')"><img src=pic/smilies/yawn.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':sly:','shbox','shbox_text')"><img src=pic/smilies/sly.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':greedy:','shbox','shbox_text')"><img src=pic/smilies/greedy.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':weirdo:','shbox','shbox_text')"><img src=pic/smilies/weirdo.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':sneaky:','shbox','shbox_text')"><img src=pic/smilies/sneaky.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':kiss:','shbox','shbox_text')"><img src=pic/smilies/kiss.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':geek:','shbox','shbox_text')"><img src=pic/smilies/geek.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':evil:','shbox','shbox_text')"><img src=pic/smilies/evil.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':yucky:','shbox','shbox_text')"><img src=pic/smilies/yucky.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':shit:','shbox','shbox_text')"><img src=pic/smilies/shit.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':?:','shbox','shbox_text')"><img src=pic/smilies/question.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':!:','shbox','shbox_text')"><img src=pic/smilies/idea.gif width="18" height="18" border=0></a></center>
</td></form>
<?end_frame();?>

<?begin_frame("Last 10 Torrents",true,5);?>
<?
//Start of Last X torrents with poster and marquee mod
$query="SELECT id, name, poster FROM torrents WHERE poster <> '' ORDER BY added DESC LIMIT 10";
$result=mysql_query($query);$num = mysql_num_rows($result);
print("<marquee scrollAmount=3 onMouseover=this.scrollAmount=0 onMouseout=this.scrollAmount=3 scrolldelay=0 direction=left>");
while ($row = mysql_fetch_assoc($result))  {
$id = $row['id'];
$name = $row['name'];
$poster = $row['poster'];
$name = str_replace('_', ' ' , $name);
$name = str_replace('.', ' ' , $name);
$name = substr($name, 0, 50);
print("<a href=$BASEURL/details.php?id=$id title=$name><img src=$poster width=100 height=142 title=$name border=0></a>");
}
print("</marquee></tr>");
//End of Last X torrents with poster and marquee mod

?>
<?end_frame();?>

<?begin_frame(Stats,true,5);?>
<?begin_table();?>
<tr><td class="rowhead">Users Registered</td><td class="rowhead" align="right"><?=$registered?></td></tr>
<tr><td class="rowhead2">Users Unverified</td><td class="rowhead2" align=right><?=$unverified?></td></tr>
<tr><td class="rowhead">Male Users</td><td class="rowhead" align="right"><?=$male?></td></tr>
<tr><td class="rowhead2">Female Users</td><td class="rowhead2" align=right><?=$female?></td></tr>
<tr><td class="rowhead">Unconnectable Users</td><td class="rowhead" align="right"><?=$NAT?></td></tr>


</table></td>
<td align="center" style="border: none;"><table class=main border=1 cellspacing=0 cellpadding=5>
<?begin_table();?>
<tr><td class="rowhead">Torrents</td><td class="rowhead" align=right><?=$torrents?></td></tr>
<tr><td class="rowhead2">Dead Torrents</td><td class="rowhead2" align=right><?=$dead?></td></tr>
<tr><td class="rowhead">Total Peers Ratio</td><td class="rowhead" align=right><?=$peers?></td></tr>
<? if (isset($peers)) { ?>
<tr><td class="rowhead2">Seeders</td><td class="rowhead2" align=right><?=$seeders?></td></tr>
<tr><td class="rowhead">Leechers</td><td class="rowhead" align=right><?=$leechers?></td></tr>
<tr><td class="rowhead2">Leechers/Seeders (%)</td><td class="rowhead2" align=right><?=$ratio?></td></tr>

</table></td>
<td align="center" style="border: none;"><table class=main border=1 cellspacing=0 cellpadding=5>
<?begin_table();?>
<tr><td class="rowhead">Last Lottery</td><td class="rowhead" align="left"><?=count($who_won)?> <?=$winners?></td></tr>
<tr><td class="rowhead2">Last Lottery <?=$winners?></td><td class="rowhead2" align="left"><?=$lottery_winners?></td></tr>
<tr><td class="rowhead">Last Amount Won<?=$each?></td><td class="rowhead" align="left"><?=mksize($arr_config['lottery_winners_amount'])?></td></tr>
<tr><td class="rowhead2">Date Of Last Lottery</td><td class="rowhead2" align="left"><?=$arr_config['lottery_winners_time']?></td></tr>
<? } ?>
<?end_table();?>
<?end_frame();?>


<? //WILBA'S SERVERLOAD//
begin_frame("Server load",true,5);?>
<?
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\">Our Tracker Load: ($percent %)</div><table class=blocklist align=center border=0 width=400><tr><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x'>";

//TRACKER LOAD
if ($percent <= 70) $pic_base_url = "pic/loadbargreen.gif";
     elseif ($percent <= 90) $pic_base_url = "pic/loadbaryellow.gif";
      else $pic_base_url = "pic/loadbarred.gif";
           $width = $percent * 4;
echo "<img height=15 width=$width src=\"$pic_base_url\" alt='$percent%'></td></tr></table><br>";
echo "<center>" . trim(exec('uptime')) . "</center><br>";

if (isset($load))
print("<tr><td class=blocklist>10min load average (%)</td><td align=right>$load</td></tr>\n");

print (date("l d<\sup>S</\sup> F Y h:i A"));

$time = round(getmicrotime() - $time_start,4);
$percent = $time * 60;
echo "<div align=\"center\">Global Server Load (All websites on current host servers): ($percent %)</div><table class=blocklist align=center border=0 width=400><tr><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x'>";

if ($percent <= 70) $pic_base_url = "pic/loadbargreen.gif";
  elseif ($percent <= 90) $pic_base_url = "pic/loadbaryellow.gif";
   else $pic_base_url = "pic/loadbarred.gif";
        $width = $percent * 4;
echo "<img height=15 width=$width src=\"$pic_base_url\" alt='$percent%'></td></tr></table>";
?>
<br>
<?end_frame();?>


<?

// ---- online users
if($CURUSER) {
   $f_sql = 'SELECT friendid FROM friends WHERE userid='.$CURUSER['id'];
   $f_res = mysql_query($f_sql);
   while($farr = mysql_fetch_object($f_res)) {
        $friends[] = $farr->friendid;
   }
}
$dt = gmtime() - 300;
$dt = sqlesc(get_date_time($dt));
$numberactive = number_format(get_row_count("users", "WHERE last_access >=$dt"));
$res = mysql_query("SELECT id, username, class, avatar, warned, donor FROM users WHERE last_access >=$dt ORDER BY class DESC") or print(mysql_error());
while ($arr = mysql_fetch_assoc($res))
{
  if ($activeusers) $activeusers .= ",\n";
  switch ($arr["class"])
  {
   case UC_SYSOP:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#0F6CEE>" . $arr["username"] . "</font></a>";
      break;
    case UC_ADMINISTRATOR:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#30EE0F>" . $arr["username"] . "</font></a>";
      break;
    case UC_MODERATOR:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#EE950F>" . $arr["username"] . "</font></a>";
      break;
     case UC_UPLOADER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#EAEE0F>" . $arr["username"] . "</font></a>";
      break;
     case UC_VIP:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#9C2FE0>" . $arr["username"] . "</font></a>";
      break;
     case UC_POWER_USER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#D21E36>" . $arr["username"] . "</font></a>";
      break;
    case UC_USER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#000000>" . $arr["username"] . "</font></a>";
      break;
  }

 
if(@in_array($arr['id'],$friends))
$arr["username"] = "<font color=#4040CO>" . $arr["username"] . "<img src=pic/friend.jpg alt='Friend'>" . "</font>";

if ($arr["donor"] == "yes")  $star = "<img src=\"pic/star.gif\" alt=\"Donated\"/>";
else $star = "";

if ($arr["warned"] == "yes")  $warn = "<img src=\"pic/warned.gif\" alt=\"Warned\"/>";
else $warn = "";

$donator = $arr["donated"] > 0;

  if ($donator)
    $activeusers .= "";
    $activeusers .= "" . $arr["username"] . $star . $warn . "";
  if ($donator)
    $activeusers .= "";

}
if (!$activeusers)
  $activeusers = "There have been no active users in the last 15 minutes.";
 

?>
 <? begin_frame("Users Online (".$numberactive.")",false,5) ?>
 
 
<?
begin_table(true);
echo "<tr><td class=\"colhead\">";
echo $activeusers;
echo "</td></tr>";
end_table();
?>

<center>
<font class="small" color="#0F6CEE">Sysop</font> | 
<font class="small" color="#30EE0F">Administator</font> | 
<font class="small" color="#EE950F">Moderator</font> | 
<font class="small" color="#EAEE0F">Uploader</font> | 
<font class="small" color="#9C2FE0">VIP</font> | 
<font class="small" color="#D21E36">PowerUser</font> | User


<?
echo "<br/><font class=\"small\">Welcome to our newest member <b>$latestuser</b>!</font></center>\n";
end_frame ();
// -------------------------------


?> 




<p><font class="small">Disclaimer: None of the files shown here are actually hosted on this server. The links are provided solely by this site's users.
The administrator of this site (torrentstrike.info) cannot be held responsible for what its users post, or any other actions of its users.
You may not use this site to distribute or download any material when you do not have the legal rights to do so.
It is your own responsibility to adhere to these terms.</font></p>


</td></tr></table>

<?
stdfoot();
?>
Reply With Quote
  #3  
Old 2nd January 2009, 21:30
marc234 marc234 is offline
Senior Member
 
Join Date: Apr 2008
France
Posts: 38
Default
Thank you clocktower for your answering. I just want the poll to take out from index, as in imag out and see, sorry for my bad english !!!!

Click the image to open in full size.
Reply With Quote
  #4  
Old 2nd January 2009, 21:31
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
u want the poll out?
Reply With Quote
  #5  
Old 2nd January 2009, 21:32
marc234 marc234 is offline
Senior Member
 
Join Date: Apr 2008
France
Posts: 38
Default
yes it is :-)
Reply With Quote
  #6  
Old 2nd January 2009, 21:33
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
Code:
<?
ob_start("ob_gzhandler");

require "include/bittorrent.php";
loggedinorreturn();

if ($_SERVER["REQUEST_METHOD"] == "POST")
{
  $choice = $_POST["choice"];
  if ($CURUSER && $choice != "" && $choice < 256 && $choice == floor($choice))
  {
    $res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();
    $arr = mysql_fetch_assoc($res) or die("No poll");
    $pollid = $arr["id"];
    $userid = $CURUSER["id"];
    $res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid && userid=$userid") or sqlerr();
    $arr = mysql_fetch_assoc($res);
    if ($arr) die("Dupe vote");
    mysql_query("INSERT INTO pollanswers VALUES(0, $pollid, $userid, $choice)") or sqlerr();
    if (mysql_affected_rows() != 1)
      stderr("Error", "An error occured. Your vote has not been counted.");
    header("Location: $BASEURL/");
    die;
  }
  else
    //////////////////////////FlashGames/////////////////////////////

$user = $CURUSER['id'];
if($_GET["act"]=="Arcade")
{
if($_POST['gname'] == "asteroids")
{
$game = 1;
$level = 1;
$score = $_POST['score'];
}
if($_POST['gname'] == "breakout")
{
$game = 2;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "hexxagon")
{
$game = 3;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "invaders")
{
$game = 4;
$level = 1;
$score = $_POST['score'];
}
if($_POST['gname'] == "moonlander")
{
$game = 5;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "pacman")
{
$game = 6;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "psol")
{
$game = 7;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "simon")
{
$game = 8;
$level = 1;
$score = $_POST['gscore'];
}
if($_POST['gname'] == "snake")
{
$game = 9;
if($_POST['levelName'] == "LEVEL: SLUG")
{
$level = 1;
}
if($_POST['levelName'] == "LEVEL: WORM")
{
$level = 2;
}
if($_POST['levelName'] == "LEVEL: PYTHON")
{
$level = 3;
}
$score = $_POST['score'];
}
if($_POST['gname'] == "tetris")
{
$game = 10;
$level = $_POST['level'];
$score = $_POST['gscore'];
}
mysql_query("INSERT INTO `flashscores` ( `ID` , `game` , `user` , `level` , `score` ) VALUES ( '', '".$game."', '".$user."', '".$level."', '".$score."');") OR DIE(MySQL_ERROR());
$url="flashscores.php";
print("<html><head><meta http-equiv=refresh content='0;url=$url'></head>\n");

}else{
stderr("Error", "An error occured.");
}
}

///////////////////////////////End//////////////////////////////


if ($CURUSER)
{
$a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or die(mysql_error());
if ($CURUSER)
{
$file2 = "$CACHE/index/newestuser.txt";
$expire = 2*60; // 2 minutes
if (file_exists($file2) && filemtime($file2) > (time() - $expire)) {
    $newestuser = unserialize(file_get_contents($file2));
} else {

$res = mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1") or die(mysql_error());
while ($user = mysql_fetch_array($res) ) {
        $newestuser[] = $user;
    }
    $OUTPUT = serialize($newestuser);
    $fp = fopen($file2,"w");
    fputs($fp, $OUTPUT);
    fclose($fp);
} // end else
foreach ($newestuser as $a)
{
  $latestuser = "<a href=userdetails.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";
}
}

$file = "$CACHE/index/stats.txt";
$expire = 10*60; // 10 minutes
if (file_exists($file) &&
    filemtime($file) > (time() - $expire)) {
$a=unserialize(file_get_contents($file));
$male = $a[1];
$female= $a[2];
$registered = $a[3];
$unverified = $a[4];
$torrents = $a[5];
$ratio = $a[6];
$peers = $a[7];
$seeders = $a[8];
$leechers = $a[9];
$dead = $a[10];
$NAT = $a[11];
} else {
$male = number_format(get_row_count("users", "WHERE gender='Male'"));  
$female = number_format(get_row_count("users", "WHERE gender='Female'"));
$registered = number_format(get_row_count("users"));
$unverified = number_format(get_row_count("users", "WHERE status='pending'"));
$torrents = number_format(get_row_count("torrents"));
$dead = number_format(get_row_count("torrents", "WHERE visible='no'"));
$NAT    = number_format(get_row_count("peers", "WHERE connectable='no'"));

$r = mysql_query("SELECT value_u FROM avps WHERE arg='seeders'") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$seeders = 0 + $a[0];
$r = mysql_query("SELECT value_u FROM avps WHERE arg='leechers'") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$leechers = 0 + $a[0];
$seeders = get_row_count("peers", "WHERE seeder='yes'");
$leechers = get_row_count("peers", "WHERE seeder='no'"); 
if ($leechers == 0)
  $ratio = 0;
else
  $ratio = round($seeders / $leechers * 100);
$peers = number_format($seeders + $leechers);
$seeders = number_format($seeders);
$leechers = number_format($leechers);
$stats1 = array(1 => "$male", "$female", "$registered", "$unverified", "$torrents", "$ratio", "$peers", "$seeders", "$leechers", "$dead", "$NAT");
$stats2 = serialize($stats1);
$fh = fopen($file, "w");
fwrite($fh,$stats2);
fclose($fh);
}
}

stdhead();
//echo "<font class=\"small\">Welcome to our newest member, <b>$latestuser</b>!</font>\n";

$news_title = "Recent news";

print("<table width=\"100%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"embedded\">");
//print("<h2>Recent news");
if (get_user_class() >= UC_ADMINISTRATOR)
$news_title.=" - <font class=\"small\">[<a class=\"altlink\" href=\"news.php\"><b>News page</b></a>]</font>";
//print("</h2>\n");
$res = mysql_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 width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td class=\"text\">\n<ul>");
begin_frame($news_title,false,5);
print("<ul>");
while($array = mysql_fetch_array($res))
{
$user = mysql_fetch_assoc(mysql_query("SELECT username FROM users WHERE id = $array[userid]")) or sqlerr();
if ($news_flag == 0) {

print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><br><img border=\"0\" src=\"pic/minus.gif\" id=\"pica".$array['id']."\" alt=\"Show/Hide\">&nbsp;" . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b>". $array['title'] . "</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Posted by $user[username] </a>");
print("<p>");
print("<div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0)." </div><br> ");

$news_flag = 1;
}
else {

print("<a href=\"javascript: klappe_news('a".$array['id']."')\"><br><img border=\"0\" src=\"pic/plus.gif\" id=\"pica".$array['id']."\" alt=\"Show/Hide\">&nbsp;" . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b>". $array['title'] . "</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Posted by $user[username] </a>");
print("<div id=\"ka".$array['id']."\" style=\"display: none;\"> ".format_comment($array["body"],0)." </div><br> ");
}
if (get_user_class() >= UC_ADMINISTRATOR)
{
print(" <font size=\"-2\"> &nbsp; [<a class=altlink href=news.php?action=edit&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><b>E</b></a>]</font>");
print(" <font size=\"-2\">[<a class=altlink href=news.php?action=delete&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><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>\n");
end_frame();
}

?>
<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();
}
</script>
<script LANGUAGE="JavaScript"><!--
function mySubmit() {
   setTimeout('document.shbox.reset()',100);
}
//--></SCRIPT>
<?begin_frame("shoutbox",true,5);?>
<iframe src='./shoutbox.php' width='100%' height='200' align='center' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe><br><br>
<form action='./shoutbox.php' method='get' target='sbox' name='shbox' onSubmit="mySubmit()">
<p align="center">Message: <input type='text' name='shbox_text' size='80'> <input type='submit' value=' Shout '>
<input type='hidden' name='sent' value='yes'><br>
<center><font size="1"><a href='./shoutbox.php' target='sbox'>refresh</a><span class="smallfont"></center>
<center><a href="javascript: SmileIT(':-)','shbox','shbox_text')"><img border=0 src=pic/smilies/smile1.gif></a>
<a href="javascript: SmileIT(':smile:','shbox','shbox_text')"><img border=0 src=pic/smilies/smile2.gif></a>
<a href="javascript: SmileIT(':-D','shbox','shbox_text')"><img border=0 src=pic/smilies/grin.gif></a>
<a href="javascript: SmileIT(':evo:','shbox','shbox_text')"><img src=pic/smilies/evo.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':-|','shbox','shbox_text')"><img border=0 src=pic/smilies/noexpression.gif></a>
<a href="javascript: SmileIT(':-/','shbox','shbox_text')"><img border=0 src=pic/smilies/confused.gif></a>
<a href="javascript: SmileIT(':-(','shbox','post')"><img border=0 src=pic/smilies/sad.gif></a>
<a href="javascript: SmileIT(':weep:','shbox','shbox_text')"><img src=pic/smilies/weep.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':-O','shbox','shbox_text')"><img src=pic/smilies/ohmy.gif border=0></a>
<a href="javascript: SmileIT('8-)','shbox','shbox_text')"><img src=pic/smilies/cool1.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':yawn:','shbox','shbox_text')"><img src=pic/smilies/yawn.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':sly:','shbox','shbox_text')"><img src=pic/smilies/sly.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':greedy:','shbox','shbox_text')"><img src=pic/smilies/greedy.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':weirdo:','shbox','shbox_text')"><img src=pic/smilies/weirdo.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':sneaky:','shbox','shbox_text')"><img src=pic/smilies/sneaky.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':kiss:','shbox','shbox_text')"><img src=pic/smilies/kiss.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':geek:','shbox','shbox_text')"><img src=pic/smilies/geek.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':evil:','shbox','shbox_text')"><img src=pic/smilies/evil.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':yucky:','shbox','shbox_text')"><img src=pic/smilies/yucky.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':shit:','shbox','shbox_text')"><img src=pic/smilies/shit.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':?:','shbox','shbox_text')"><img src=pic/smilies/question.gif width="18" height="18" border=0></a>
<a href="javascript: SmileIT(':!:','shbox','shbox_text')"><img src=pic/smilies/idea.gif width="18" height="18" border=0></a></center>
</td></form>
<?end_frame();?>

<?begin_frame("Last 10 Torrents",true,5);?>
<?
//Start of Last X torrents with poster and marquee mod
$query="SELECT id, name, poster FROM torrents WHERE poster <> '' ORDER BY added DESC LIMIT 10";
$result=mysql_query($query);$num = mysql_num_rows($result);
print("<marquee scrollAmount=3 onMouseover=this.scrollAmount=0 onMouseout=this.scrollAmount=3 scrolldelay=0 direction=left>");
while ($row = mysql_fetch_assoc($result))  {
$id = $row['id'];
$name = $row['name'];
$poster = $row['poster'];
$name = str_replace('_', ' ' , $name);
$name = str_replace('.', ' ' , $name);
$name = substr($name, 0, 50);
print("<a href=$BASEURL/details.php?id=$id title=$name><img src=$poster width=100 height=142 title=$name border=0></a>");
}
print("</marquee></tr>");
//End of Last X torrents with poster and marquee mod

?>
<?end_frame();?>

<?begin_frame(Stats,true,5);?>
<?begin_table();?>
<tr><td class="rowhead">Users Registered</td><td class="rowhead" align="right"><?=$registered?></td></tr>
<tr><td class="rowhead2">Users Unverified</td><td class="rowhead2" align=right><?=$unverified?></td></tr>
<tr><td class="rowhead">Male Users</td><td class="rowhead" align="right"><?=$male?></td></tr>
<tr><td class="rowhead2">Female Users</td><td class="rowhead2" align=right><?=$female?></td></tr>
<tr><td class="rowhead">Unconnectable Users</td><td class="rowhead" align="right"><?=$NAT?></td></tr>


</table></td>
<td align="center" style="border: none;"><table class=main border=1 cellspacing=0 cellpadding=5>
<?begin_table();?>
<tr><td class="rowhead">Torrents</td><td class="rowhead" align=right><?=$torrents?></td></tr>
<tr><td class="rowhead2">Dead Torrents</td><td class="rowhead2" align=right><?=$dead?></td></tr>
<tr><td class="rowhead">Total Peers Ratio</td><td class="rowhead" align=right><?=$peers?></td></tr>
<? if (isset($peers)) { ?>
<tr><td class="rowhead2">Seeders</td><td class="rowhead2" align=right><?=$seeders?></td></tr>
<tr><td class="rowhead">Leechers</td><td class="rowhead" align=right><?=$leechers?></td></tr>
<tr><td class="rowhead2">Leechers/Seeders (%)</td><td class="rowhead2" align=right><?=$ratio?></td></tr>

</table></td>
<td align="center" style="border: none;"><table class=main border=1 cellspacing=0 cellpadding=5>
<?begin_table();?>
<tr><td class="rowhead">Last Lottery</td><td class="rowhead" align="left"><?=count($who_won)?> <?=$winners?></td></tr>
<tr><td class="rowhead2">Last Lottery <?=$winners?></td><td class="rowhead2" align="left"><?=$lottery_winners?></td></tr>
<tr><td class="rowhead">Last Amount Won<?=$each?></td><td class="rowhead" align="left"><?=mksize($arr_config['lottery_winners_amount'])?></td></tr>
<tr><td class="rowhead2">Date Of Last Lottery</td><td class="rowhead2" align="left"><?=$arr_config['lottery_winners_time']?></td></tr>
<? } ?>
<?end_table();?>
<?end_frame();?>



<?

// ---- online users
if($CURUSER) {
   $f_sql = 'SELECT friendid FROM friends WHERE userid='.$CURUSER['id'];
   $f_res = mysql_query($f_sql);
   while($farr = mysql_fetch_object($f_res)) {
        $friends[] = $farr->friendid;
   }
}
$dt = gmtime() - 300;
$dt = sqlesc(get_date_time($dt));
$numberactive = number_format(get_row_count("users", "WHERE last_access >=$dt"));
$res = mysql_query("SELECT id, username, class, avatar, warned, donor FROM users WHERE last_access >=$dt ORDER BY class DESC") or print(mysql_error());
while ($arr = mysql_fetch_assoc($res))
{
  if ($activeusers) $activeusers .= ",\n";
  switch ($arr["class"])
  {
   case UC_SYSOP:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#0F6CEE>" . $arr["username"] . "</font></a>";
      break;
    case UC_ADMINISTRATOR:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#30EE0F>" . $arr["username"] . "</font></a>";
      break;
    case UC_MODERATOR:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#EE950F>" . $arr["username"] . "</font></a>";
      break;
     case UC_UPLOADER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#EAEE0F>" . $arr["username"] . "</font></a>";
      break;
     case UC_VIP:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#9C2FE0>" . $arr["username"] . "</font></a>";
      break;
     case UC_POWER_USER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#D21E36>" . $arr["username"] . "</font></a>";
      break;
    case UC_USER:
      $username = $arr["username"];
      $avatarover = $arr["avatar"];
      $arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img src=&quot;$avatarover&quot; width=&quot;48&quot;>', CAPTION, '$username');\" onmouseout=\"return nd();\"><font color=#000000>" . $arr["username"] . "</font></a>";
      break;
  }

 
if(@in_array($arr['id'],$friends))
$arr["username"] = "<font color=#4040CO>" . $arr["username"] . "<img src=pic/friend.jpg alt='Friend'>" . "</font>";

if ($arr["donor"] == "yes")  $star = "<img src=\"pic/star.gif\" alt=\"Donated\"/>";
else $star = "";

if ($arr["warned"] == "yes")  $warn = "<img src=\"pic/warned.gif\" alt=\"Warned\"/>";
else $warn = "";

$donator = $arr["donated"] > 0;

  if ($donator)
    $activeusers .= "";
    $activeusers .= "" . $arr["username"] . $star . $warn . "";
  if ($donator)
    $activeusers .= "";

}
if (!$activeusers)
  $activeusers = "There have been no active users in the last 15 minutes.";
 

?>
 <? begin_frame("Users Online (".$numberactive.")",false,5) ?>
 
 
<?
begin_table(true);
echo "<tr><td class=\"colhead\">";
echo $activeusers;
echo "</td></tr>";
end_table();
?>

<center>
<font class="small" color="#0F6CEE">Sysop</font> | 
<font class="small" color="#30EE0F">Administator</font> | 
<font class="small" color="#EE950F">Moderator</font> | 
<font class="small" color="#EAEE0F">Uploader</font> | 
<font class="small" color="#9C2FE0">VIP</font> | 
<font class="small" color="#D21E36">PowerUser</font> | User


<?
echo "<br/><font class=\"small\">Welcome to our newest member <b>$latestuser</b>!</font></center>\n";
end_frame ();
// -------------------------------


?> 




<p><font class="small">Disclaimer: None of the files shown here are actually hosted on this server. The links are provided solely by this site's users.
The administrator of this site (torrentstrike.info) cannot be held responsible for what its users post, or any other actions of its users.
You may not use this site to distribute or download any material when you do not have the legal rights to do so.
It is your own responsibility to adhere to these terms.</font></p>


</td></tr></table>

<?
stdfoot();
?>
Reply With Quote
The Following User Says Thank You to wMan For This Useful Post:
marc234 (2nd January 2009)
  #7  
Old 2nd January 2009, 21:36
marc234 marc234 is offline
Senior Member
 
Join Date: Apr 2008
France
Posts: 38
Default
Thanks thanks :-)
Reply With Quote
Reply

Tags
>> , 10 , fix , poll , torrents


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod Poll TS SE v 5.6 overhedge Mods & Themes 0 2nd April 2010 14:51
poll screwd wMan BT.Manager (phpMyBitTorrent) 5 3rd September 2009 05:48
POLL - Do you own a Torrents Tracker ? Fynnon Community Cafe 0 10th February 2009 23:25
Bug with Poll kp380lv Yuna Scatari Edition (YSE) 0 27th August 2008 17:57
Deleting poll !! Nilsons Yuna Scatari Edition (YSE) 2 2nd July 2008 19:34



All times are GMT +2. The time now is 17:15. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.