Running an XAMP server and trying to run a TBDEV tracker... gives me always the parse error on line 341
<p>here is the code i always get this error -_-
i cant seem to see the error but maybe the php cant connect to the database... although the XAMP is set up right i think... and the htdocs "secrets" file with the db info is correct</p>

<pre><code>&lt;?php {

ob_start("ob_gzhandler");
require "include/bittorrent.php";
dbconn(true);

$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)
  $latestuser = "&lt;a href=userdetails.php?id=" . $a["id"] . "&gt;" . $a["username"] . "&lt;/a&gt;";
else
  $latestuser = $a['username'];


$registered = number_format(get_row_count("users"));
$torrents = number_format(get_row_count("torrents"));

$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];
if ($leechers == 0)
  $ratio = 0;
else
$ratio = round($seeders / $leechers * 100);
$peers = number_format($seeders + $leechers);
$seeders = number_format($seeders);
$leechers = number_format($leechers);

$dt = gmtime() - 180;
$dt = sqlesc(get_date_time($dt));
$res = mysql_query("SELECT id, username, class FROM users WHERE last_access &gt;= $dt ORDER BY username") or print(mysql_error());

while ($arr = mysql_fetch_assoc($res))
{
  $donator = $arr["donated"] &gt; 0;
  if ($donator)
    $activeusers .= "&lt;nobr&gt;";
  if ($CURUSER)
    $activeusers .= "&lt;a href=userdetails.php?id=" . $arr["id"] . " title=" . get_user_class_name($arr["class"]) . "&gt;&lt;b&gt;" . get_user_class_color($arr["class"], $arr["username"]) . "&lt;/b&gt;&lt;/a&gt;&amp;nbsp;";
  else
    $activeusers .= "&lt;b&gt;" . get_user_class_color($arr["class"], $arr["username"]) . "&lt;/b&gt;";
  if ($donator)
    $activeusers .= "&lt;img src=\"{$pic_base_url}star.gif\" alt='Donated $$arr[donated]'&gt;&lt;/nobr&gt;";
}
if (!$activeusers)
  $activeusers = "There have been no active users in the last 15 minutes :'(";

stdhead();

print("&lt;table width=737 class=main border=0 cellspacing=0 cellpadding=0&gt;&lt;tr&gt;&lt;td class=embedded&gt;");

if ($CURUSER) {

if ($CURUSER['donor'] == "yes")
    $medaldon = "&lt;img src=\"pic/star.gif\" alt=\"Donor\" title=\"Donor\"&gt;";
if ($CURUSER['warned'] == "yes")
    $warn = "&lt;img src=\"pic/warned.gif\" alt=\"Warned\" title=\"User warned\"&gt;";

?&gt;
&lt;?

$datum = getdate();

$datum[hours] = sprintf("%02.0f", $datum[hours]);

$datum[minutes] = sprintf("%02.0f", $datum[minutes]);

$uped = mksize($CURUSER['uploaded']);

$downed = mksize($CURUSER['downloaded']);

if ($CURUSER["downloaded"] &gt; 0)

{

$ratio = $CURUSER['uploaded'] / $CURUSER['downloaded'];

$ratio = number_format($ratio, 3);

$color = get_ratio_color($ratio);

if ($color)

$ratio = "&lt;font color=$color&gt;$ratio&lt;/font&gt;";

}

else

if ($CURUSER["uploaded"] &gt; 0)

$ratio = "Inf.";

else

$ratio = "---";



if ($CURUSER['donor'] == "yes")

$medaldon = "&lt;img src=pic/star.gif alt=donor title=donor&gt;";



if ($CURUSER['warned'] == "yes")

$warn = "&lt;img src=pic/warned.gif alt=warned title=warned&gt;";




//// check active torrents ///////////////////////

$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='yes'") or print(mysql_error());

$row = mysql_fetch_row($res2);

$activeseed = $row[0];

$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='no'") or print(mysql_error());

$row = mysql_fetch_row($res2);

$activeleech = $row[0];

//// end

?&gt;
&lt;!-- //////// start the statusbar ///////////// --&gt;

&lt;p&gt;

&lt;table align="center" cellpadding="4" cellspacing="0" border="0" style="width:90%"&gt;
&lt;tr&gt;
&lt;td class="tablea"&gt;&lt;table align="center" style="width:879" cellspacing="0" cellpadding="0" border="0"&gt;
&lt;tr&gt;
&lt;td class="bottom" align="left"&gt;&lt;span style="text-decoration: none;" class="smallfont"&gt;&lt;b&gt;Greetings:&amp;nbsp; &lt;a href="userdetails.php?id=&lt;?=$CURUSER['id']?&gt;"&gt;&lt;?=get_user_class_color($CURUSER['class'], $CURUSER['username'])?&gt;&lt;/a&gt;&lt;/b&gt;&lt;?=$medaldon?&gt;&lt;?=$warn?&gt;&lt;? if ($CURUSER["class"] &gt; UC_MODERATOR) { ?&gt;&amp;nbsp;[&lt;a href="staffpanel.php"&gt;Staff Panel&lt;/a&gt;]&lt;? }?&gt;&amp;nbsp;[&lt;a href="friends.php"&gt;Friends&lt;/a&gt;]&amp;nbsp;[&lt;a href="my.php"&gt;Profile&lt;/a&gt;]&amp;nbsp;[&lt;a onClick="return confirm('Are you sure you want to logout?')" href="logout.php"&gt;Logout&lt;/a&gt;]&lt;br/&gt;

&lt;font color=1900D1&gt;Ratio:&lt;/font&gt; &lt;?=$ratio?&gt;&amp;nbsp;&amp;nbsp;&lt;font color=green&gt;Uploaded:&lt;/font&gt; &lt;font color=black&gt;&lt;?=$uped?&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color=darkred&gt;Downloaded:&lt;/font&gt; &lt;font color=black&gt;&lt;?=$downed?&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color=1900D1&gt;Active Torrents:&amp;nbsp;&lt;/font&gt;&lt;/span&gt; &lt;img alt="Torrents seeding" title="Torrents seeding" src="pic/arrowup.gif"&gt;&amp;nbsp;&lt;font color=black&gt;&lt;span class="smallfont"&gt;&lt;?=$activeseed?&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;img alt="Torrents leeching" title="Torrents leeching" src="pic/arrowdown.gif"&gt;&amp;nbsp;&lt;font color=black&gt;&lt;span class="smallfont"&gt;&lt;?=$activeleech?&gt;&lt;/span&gt;&lt;/font&gt;&lt;/td&gt;
&lt;?
loggedinorreturn();
$res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both')") or print(mysql_error());
$arr = mysql_fetch_row($res);
$messages = $arr[0];
$res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both') AND unread='yes'") or print(mysql_error());
$arr = mysql_fetch_row($res);
$unread = $arr[0];
$res = mysql_query("SELECT COUNT(*) FROM messages WHERE sender=" . $CURUSER["id"] . " AND location IN ('out', 'both')") or print(mysql_error());
$arr = mysql_fetch_row($res);
$outmessages = $arr[0];

if ($messages){
print("&lt;td class='bottom' align='right'&gt;");
print("&lt;span style=\"text-decoration: none;\"  class=smallfont&gt;&lt;a href=inbox.php&gt;&lt;a href=inbox.php&gt;&lt;img height=16px style=border:none alt=sentbox title=sentbox src=pic/pn_inboxnew.gif&gt;$inboxpic&lt;/a&gt; $messages ($unread New)&lt;/span&gt;");
if ($outmessages)
print("&lt;span style=\"text-decoration: none;\" class=smallfont&gt;&amp;nbsp;&amp;nbsp;&lt;a href=inbox.php?out=1&gt;&lt;img height=16px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif&gt;&lt;/a&gt; $outmessages&lt;/span&gt;");
else
print("&lt;span style=\"text-decoration: none;\" class=smallfont&gt;&amp;nbsp;&amp;nbsp;&lt;a href=inbox.php?out=1&gt;&lt;img height=16px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif&gt;&lt;/a&gt; 0&lt;/span&gt;");
}
else
{
print("&lt;td class='bottom' align='right'&gt;");
print("&lt;span style=\"text-decoration: none;\" class=smallfont&gt;&lt;a href=inbox.php&gt;&lt;img height=16px style=border:none alt=inbox title=inbox src=pic/pn_inbox.gif&gt;&lt;/a&gt; 0&lt;/span&gt;");
if ($outmessages)
print("&lt;span style=\"text-decoration: none;\" class=smallfont&gt;&amp;nbsp;&amp;nbsp;&lt;a href=inbox.php?out=1&gt;&lt;img height=16px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif&gt;&lt;/a&gt; $outmessages&lt;/span&gt;");
else
print("&lt;span style=\"text-decoration: none;\" class=smallfont&gt;&amp;nbsp;&amp;nbsp;&lt;a href=inbox.php?out=1&gt;&lt;img height=16px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif&gt;&lt;/a&gt; 0&lt;/span&gt;");
}
print("&amp;nbsp;&lt;a href=friends.php&gt;&lt;img style=border:none alt=Buddylist title=Buddylist src=pic/buddylist.gif&gt;&lt;/a&gt;");
print("&amp;nbsp;&lt;a href=getrss.php&gt;&lt;img style=border:none alt=RSS title=RSS src=pic/rss.gif&gt;&lt;/a&gt;");
print("&lt;/form&gt;");
?&gt;
&lt;/span&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;/table&gt;&lt;/table&gt;&lt;/table&gt;

&lt;br&gt;

&lt;? } else {?&gt;
&lt;? } ?&gt;

&lt;table width=889 border=1 cellspacing=0 cellpadding=0&gt;&lt;tr&gt;&lt;td align=center&gt;
&lt;table align=left width=46% cellspacing=0 cellpadding=5&gt;&lt;tr&gt;&lt;td style="border:none" align=left&gt;
&lt;table class=main border=1 cellspacing=0 cellpadding=5&gt;

&lt;? 
print("&lt;h2&gt;Recent news");

if (get_user_class() &gt;= UC_ADMINISTRATOR)
    print(" - &lt;font class=small&gt;&lt;a  class=altlink href=news.php&gt;&lt;b&gt;[News page]&lt;/b&gt;&lt;/a&gt;&lt;/font&gt;");
$res = mysql_query("SELECT * FROM news WHERE ADDDATE(added, INTERVAL 45 DAY) &gt; NOW() ORDER BY added DESC LIMIT 3") or sqlerr(__FILE__, __LINE__);

if (mysql_num_rows($res) &gt; 0)
{   print("&lt;table width=100% border=1 cellspacing=0 cellpadding=2&gt;&lt;tr&gt;\n");
    while($array = mysql_fetch_assoc($res))
    {
      print("&lt;div class=\"accordion\"&gt;&lt;h3&gt;" . gmdate("Y-m-d",strtotime($array['added'])) . "&lt;/h3&gt;" . "&lt;p&gt;" . format_comment($array['body']));
    if (get_user_class() &gt;= UC_ADMINISTRATOR)
    {
        print(" &lt;font size=\"-2\"&gt;&lt;a class=altlink href=news.php?action=edit&amp;newsid=" . $array['id'] . "&amp;returnto=" . urlencode($_SERVER['PHP_SELF']) . "&gt;&lt;img style='border: none' alt='Edit' title='Edit news' src='pic/pen.gif'/&gt;&lt;/a&gt;&lt;/font&gt;");
        print(" &lt;font size=\"-2\"&gt;&lt;a class=altlink href=news.php?action=delete&amp;newsid=" . $array['id'] . "&amp;returnto=" . urlencode($_SERVER['PHP_SELF']) . "&gt;&lt;img style='border: none' alt='Delete' title='Delete' src='pic/delete.gif'/&gt;&lt;/a&gt;&lt;/font&gt;");
    }
    print("&lt;/p&gt;");
  }
  print("&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;\n"); 
} 

?&gt;&lt;/table&gt;&lt;/table&gt;

&lt;table align=right width=40% cellspacing=0 cellpadding=0&gt;&lt;tr&gt;&lt;td align=right&gt;
&lt;div id=stats&gt;&lt;font class=small&gt;&lt;div style="text-align: justify;"&gt;&lt;table width=100% cellspacing=0 cellpadding=7&gt;&lt;tr&gt;&lt;td style="border:none" align=center&gt;
&lt;table class=main style="border:none" cellspacing=0 cellpadding=5&gt;
&lt;?if (isset($peers)) {?&gt;
&lt;?
$seeders = get_row_count("peers", "WHERE seeder='yes'");
$warned_users = number_format(get_row_count("users", "WHERE warned = 'yes'"));
$leechers = get_row_count("peers", "WHERE seeder='no'");
$unverified = number_format(get_row_count("users", "WHERE status='pending'"));
$uploaders = number_format(get_row_count("users", "WHERE class=".UC_UPLOADER));
$golds = number_format(get_row_count("users", "WHERE class=".UC_GOLD));
?&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;Registered Users&lt;/td&gt;&lt;td align=right&gt;&lt;?=$registered?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;Warned Users&lt;/td&gt;&lt;td align=right&gt;&lt;?=$warned_users?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;Unconfirmed users&lt;/td&gt;&lt;/td&gt;&lt;td align=right&gt;&lt;?=$unverified?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;&lt;font color=gold&gt;Gold&lt;/font&gt;&lt;/td&gt;&lt;td align=right&gt;&lt;?=$golds?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;Upploaders&lt;/td&gt;&lt;td align=right&gt;&lt;?=$uploaders?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;? } ?&gt;
&lt;/table&gt;&lt;/td&gt;
&lt;td width=\"52%\" align=center style="border:none"&gt;
&lt;table class=main border=10 cellspacing=0 cellpadding=5&gt;&lt;tr&gt;&lt;td class=rowhead&gt;Torrents&lt;/td&gt;&lt;td align=right&gt;&lt;?=$torrents?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;&lt;font color=green&gt;Seeders&lt;/font&gt;&lt;/td&gt;&lt;td align=right&gt;&lt;?=$seeders?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;&lt;font color=red&gt;Leechers&lt;/font&gt;&lt;/td&gt;&lt;td align=right&gt;&lt;?=$leechers?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;Total downloaded&lt;/td&gt;&lt;td align=right&gt;&lt;?=mksize($totaldownloaded)?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=rowhead&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Total uploaded&lt;/td&gt;&lt;td align=right&gt;&lt;?=mksize($totaluploaded)?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;form method='get' action=browse.php&gt;
&amp;nbsp;&amp;nbsp; &lt;input type='ext' name='search' size='51' onfocus="if(this.value=='Click here if you want to search...') this.value='';" onblur="if(this.value=='') this.value='Click here if you want to search...';" value="Click here if you want to search..." style="color:#888888; font-style: italic;"/&gt;
&lt;input type='submit' value='Search'/&gt;&lt;/form&gt;
&lt;/div&gt;&lt;br&gt;&lt;/table&gt;&lt;/table&gt;&lt;br&gt;

&lt;table width=889 border=1 cellspacing=0 cellpadding=10&gt;&lt;tr&gt;&lt;td align=Left&gt;
&lt;b&gt;Newest torrents&lt;/b&gt;&lt;br&gt;
&lt;p&gt;
&lt;?
$tag_list = mysql_query("SELECT categories.id, categories.name, categories.point_class, tags_settings.word_color AS color, tags_settings.word_size AS size FROM categories LEFT JOIN tags_settings ON categories.point_class = tags_settings.id ORDER BY id");

while($tags = mysql_fetch_assoc($tag_list))
{

    $tag .= "&lt;span onclick=\"getTagDetails('" .$tags["id"]. "', '" .$tags["name"]. "');\"
                style='cursor: pointer;" .($tags["color"] ? "color: " .$tags["color"]. ";" : "") . 
                ($tags["size"] ? "font-size: " .$tags["size"]. "0%;" : ""). "
                '&gt;
                " .$tags["name"]. "
            &lt;/span&gt;&amp;nbsp;|&amp;nbsp;";

}
?&gt;

&lt;script language="javascript" type="text/javascript" src="js/ajax.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;

    function getTagDetails(tId, tName)
    {

         var ajax = new tbdev_ajax();
        ajax.onShow ('');
         var varsString = "";
         ajax.requestFile = "getTagDetails.php";
         ajax.setVar("tagId", tId);
         ajax.setVar("tagName", tName);
         ajax.method = 'POST';
         ajax.element = 'tagDetails';
         ajax.sendAJAX(varsString);

    }

&lt;/script&gt;
&lt;div id="loading-layer"&gt;&lt;/div&gt;

&lt;?
$content .= "&lt;div id='tagDetails'&gt;Choose a category.&lt;/div&gt;&lt;hr size=\"1\" noshade color=\"#D4D4D4\"&gt;";
$content .= $tag;

if(get_user_class() &gt;= UC_ADMINISTRATOR)
    $content .= "&lt;hr size=\"1\" noshade color=\"#D4D4D4\"&gt;&lt;center&gt;&lt;a href='tags_admin.php'&gt;&lt;font size=1.5&gt;Adjust parameters&lt;/font&gt;&lt;/a&gt;&lt;/center&gt;"; 
    print ($content);
?&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;

&lt;?if ($online_on == "1") { ?&gt;
&lt;table width=889 border=1 cellspacing=0 cellpadding=10&gt;&lt;tr&gt;&lt;td align=Left&gt;
&lt;div class="news-head folded clickable"&gt;&lt;b&gt;Users online&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class="news-body"&gt;
&lt;font class=small&gt;
&lt;center&gt;&lt;font class=small&gt;Welcome to our newest member, &lt;b&gt;&lt;?=$latestuser?&gt;&lt;/b&gt;!&lt;/font&gt;&lt;br&gt;&lt;/center&gt;
&lt;?=$activeusers?&gt;&lt;/p&gt;
&lt;font class=small&gt;&lt;font color=#0F6CEE&gt;SysOP&lt;/font&gt; | &lt;font color=#009900&gt;Admin&lt;/font&gt; | &lt;font color=#cc0000&gt;Moderator&lt;/font&gt; | &lt;font color=gold&gt;Gold&lt;/font&gt; | &lt;font color=orange&gt;Uploaders&lt;/font&gt; | &lt;font color=#ff99ff&gt;VIP&lt;/font&gt; | Users&lt;/font&gt;&lt;/font&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;?}?&gt;

&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;table width=889 border=1 cellspacing=0 cellpadding=10&gt;&lt;tr&gt;&lt;td align=Left&gt;



&lt;?
echo "&lt;marquee onmouseover=this.stop() onmouseout=this.start() scrollAmount=1.8 direction=up width='100%' height='100'&gt;";
?&gt;


&lt;p&gt;&lt;font class=small&gt;None of the files shown here are actually hosted on this server. The links are provided solely by this site's users. These BitTorrent files are meant for the distribution of backup files. By downloading the BitTorrent file, you are claiming that you own the original file. The administrator of this site ( &lt;font color=#cc0000&gt;Yourname here&lt;/font&gt; ) holds NO RESPONSIBILITY if these files are misused in any way and cannot be held responsible for what its users post, or any other actions of its users. For controversial reasons, if you are affiliated with any government, ANTI-Piracy group or any other related group, or were formally a worker of one you CANNOT download any of these BitTorrent files. 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.&lt;/font&gt;&lt;/p&gt;


&lt;/marquee&gt;



&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;?php
// Variables for Start Time
$mtime = microtime(); // Get Current Time
$mtime = explode (" ", $mtime); // Split Seconds and Microseconds  
$mtime = $mtime[1] + $mtime[0];  // Create a single value for start time
$tstart = $mtime; // Start time

// Variables for Start Time
$mtime = microtime();
$mtime = explode (" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$tend = $mtime; // End time
$totaltime = ($tend - $tstart);
printf ("Executed in %f seconds!", $totaltime);
?&gt;
&lt;?
stdfoot();
{ ?&gt;
</code></pre>
