Cita:
Iniciado por webosiris la variable name, de donde la sacás (BD o cookie)? probá a declararla como global...
global $name, $prefix,$db...
Pues creo que es una cookie ya que $username tampoco está en el global, te dejo la funcion completa:
Código PHP:
function themeheader() {
global $prefix, $db, $user, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $banners, $sitename, $anonymous, $user;
echo "<body bgcolor=\"$bgcolor1\">";
ads(0);
if (is_user($user)) {
cookiedecode($user);
$username = $cookie[1];
$bienvenida = "Estas conectado, socio nº $username! [ <a href=\"modules.php?name=Your_Account&op=logout\"><b>Desconectar</b></a> ]";
} else {
$bienvenida = "<a href=\"modules.php?name=Your_Account&op=new_user\"></a>";
}
$topics_list = "<select name=\"topic\" onChange='submit()'>\n";
$topics_list .= "<option value=\"\">All Topics</option>\n";
$toplist = $db->sql_query("select topicid, topictext from $prefix"._topics." order by topictext");
while(list($topicid, $topics) = $db->sql_fetchrow($toplist)) {
$topicid = intval($topicid);
if ($topicid==$topic) { $sel = "selected "; }
$topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
$sel = "";
}
echo "<center><a href=\"index.php\"><img src=\"themes/Sand_Journey/images/LogoLeft.gif\" alt=\"Welcome to $sitename\" title=\"Welcome to $sitename\" border=\"0\"></a><br><br></center>"
."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\" bgcolor=\"$bgcolor1\"><tr><td align=\"center\">"
."</td></tr></table>"
."<br>"
."<table border=\"0 cellpadding=\"4\" cellspacing=\"0\" width=\"100%\" align=\"center\">\n"
."<tr><td bgcolor=\"$bgcolor2\" align=\"left\" width=\"20%\"> $bienvenida</td>"
."<td bgcolor=\"$bgcolor2\" align=\"right\" width=\"20%\">"
."<b><script type=\"text/javascript\">\n\n"
."<!-- // Array ofmonth Names\n"
."var monthNames = new Array( \""._JANUARY."\",\""._FEBRUARY."\",\""._MARCH."\",\""._APRIL."\",\""._MAY."\",\""._JUNE."\",\""._JULY."\",\""._AUGUST."\",\""._SEPTEMBER."\",\""._OCTOBER."\",\""._NOVEMBER."\",\""._DECEMBER."\");\n"
."var now = new Date();\n"
."thisYear = now.getYear();\n"
."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
."document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n"
."// -->\n\n"
."</script></b> \n"
."</td></tr>\n"
."<tr><td valign=\"top\" width=\"100%\" colspan=3>\n"
;
$public_msg = public_message();
echo "$public_msg<br>";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\"><tr><td valign=\"top\" width=\"150\" bgcolor=$bgcolor1>";
blocks("left");
echo "<img src=\"images/pix.gif\" border=\"0\" width=\"150\" height=\"1\"></td><td> </td><td width=\"100%\" valign=\"top\">";
}