Juan, Sorry about that. Here is a version of the side bar without the welcome message stuff that is causing your problem. It should work and give you everything else from that part of the script.
side.php
--------
<?php
error_reporting(0);
require("GVCP_Config.php");
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable toconnect to database");
mysql_select_db("$DBName") or die("Unable to access the News");
$sqlquery = "SELECT username FROM user ORDER by posts desc LIMIT 0,1";
$latest = mysql_query($sqlquery);
$daname = mysql_result($latest,"username");
$sqlquery2 = "SELECT userid FROM user ORDER by posts desc LIMIT 0,1";
$latest2 = mysql_query($sqlquery2);
$id = mysql_result($latest2,"userid");
print "<font color=$sidetextcolor> Most active user:</font> <a href=$path/member.php?action=getinfo&userid=$id><b> $daname </b></a>";
print "<hr noshade size=1 color=$hrcolor>";
$sqlquery = "SELECT username FROM user ORDER by joindate desc LIMIT 0,1";
$latest = mysql_query($sqlquery);
$daname = mysql_result($latest,"username");
$sqlquery2 = "SELECT userid FROM user ORDER by joindate desc LIMIT 0,1";
$latest2 = mysql_query($sqlquery2);
$id = mysql_result($latest2,"userid");
print "<font color=$sidetextcolor> Newest Member:</font> <a href=$path/member.php?action=getinfo&userid=$id><b> $daname</b></a>";
print "<hr noshade size=1 color=$hrcolor>";
$sqlquery = "SELECT * FROM user";
$result = mysql_query($sqlquery);
$number = mysql_numrows($result);
print "<font color=$sidetextcolor> Number of users:</font> <a href=$path/memberlist.php><b> $number </b></a>";
print "<hr noshade size=1 color=$hrcolor><font color=$sidetextcolor><b>Last 10 active topics:</b></font><br>";
$sqlquery = "SELECT * FROM thread WHERE visible !=0 ORDER by lastpost DESC LIMIT 0,$active";
$result = mysql_query($sqlquery);
$number = mysql_numrows($result);
$i = 0;
if ($number < 1) {
print "<font color=$sidetextcolor><CENTER><P>There are no active topics...</CENTER></font>";
}
else {
while ($number > $i) {
$title = mysql_result($result,$i,"title");
$theid = mysql_result($result,$i,"threadid");
$numcheck = mysql_result($result,$i,"replycount");
$numie = ($numcheck+1);
$lastposter = mysql_result($result,$i,"lastposter");
print " <a href=$path/showthread.php?threadid=$theid>$title </a><br><font size=-2 color=$sidetextcolor> Posts: <b> $numie </b> Last post by:<b> $lastposter</b></font><br>";
$i++;
}
}
print"<hr noshade size=1 color=$hrcolor>";
$sqlquery = "SELECT threadid FROM thread WHERE forumid !=36 AND visible !=0 ORDER by replycount desc LIMIT 0,1";
$result = mysql_query($sqlquery);
$threadid = mysql_result($result,"threadid");
$titquery = "SELECT title FROM thread WHERE threadid = $threadid";
$titresult = mysql_query($titquery);
$title = mysql_result($titresult,"threadid");
$postquery = "SELECT replycount FROM thread WHERE threadid = $threadid";
$postresult = mysql_query($postquery);
$posts = mysql_result($postresult,"replycount");
$viewquery = "SELECT views FROM thread WHERE threadid = $threadid";
$viewresult = mysql_query($viewquery);
$views = mysql_result($viewresult,"views");
$posterquery = "SELECT postusername FROM thread WHERE threadid = $threadid";
$posterresult = mysql_query($posterquery);
$poster = mysql_result($posterresult,"postusername");
print "<font color=$sidetextcolor><b>Most active topic ever:</b></font><br>
<a href=$path/showthread.php?threadid=$threadid>$title</a><br>
<font size=-2 color=$sidetextcolor>By: <b>$poster</b> Replies: <b>$posts</b> Views: <b>$views</b></font>";
?>
|