Grazie mille per la risposta var!
Io ho già una funzione userinfo
codice:
function userinfo($ffusername, $bypass=0) {
global $viewed,$currentlang,$user, $module_name,$userinfo,$bgcolor3,$cookie, $thisyear,$sitename, $prefix, $user_prefix, $dbi, $admin;
require("modules/$module_name/data/data-$currentlang.php");
cookiedecode($user);
getusrinfo($user);
dove $ffusername è il nome dell'utente!
Io vorrei scrivere in questa tabella: Visita la pagina personale di NOMEUTENTE
codice:
OpenTable();
echo "<font class=\"content\"><table align=\"center\" width=\"100%\" border=\"0\">"
."<tr><td>";
if((((($ffusername == $cookie[1]) AND ($userinfo[user_password] == $cookie[2]))||(is_admin($admin)))&&($row[photopath]))||($rowphoto[approved]&&(isFFMember($userinfo[username])))){
echo "<center><a href=\"modules/$module_name/images/members/$row[photopath]\"><image src=\"modules/$module_name/images/members/$row[photopath]\" width=\"300\" alt=\"La mia Foto\" border=\"0\"></a></center>
\n";
echo "<center>"._THISIS.""
.$ffusername.""._SPHOTO."
";
if($rowphoto[approved])echo ""._PHOTOAPPROVED."
";
else echo ""._PHOTOUNAPPROVED."
";
if($rowphoto[denied])echo ""._PHOTODENIED."
";
}
else{
echo "<img src=\"modules/$module_name/images/default.jpg\">
";
echo ""._NOPHOTO."
";
}
$result1=sql_query("select user_id from ".$user_prefix."_users where username='$ffusername'",$dbi);
list($user_id)=sql_fetch_row($result1, $dbi);
echo "[ <a href=\"modules.php?name=Private_Messages&file=reply&send=1&uname=$ffusername\">"._USENDPRIVATEMSG." $ffusername</a> ]
\n";
echo "
[ <a href=\"modules.php?name=$module_name&op=addfriends&friend=$ffusername\">"._ADDFRIEND." </a> ]
\n";
echo "</center>";
echo "</td><td>"
."<table>"
."<tr><td align=\"right\">"._NAME."</td><td>$ffusername</td></tr>";
if($row["birth"]!=0)
{
echo "<tr width=40%><td align=\"right\">"._AGE."</td><td>".get_age($row[birth]).""._YRSOLD."</td></tr>";
}
if($row[sex]) {
echo "<tr><td align=\"right\">"._SEX."</td><td>"
.${$currentlang."_sex"}[$row[sex]]
."</td></tr>";}
echo "<tr><td align=\"right\">"._COUNTRY."</td><td>";
for($i=1;$i<count(${$currentlang."_countryorarea"});$i++){
if($english_countryorarea[$i]==$row[country]){echo ${$currentlang."_countryorarea"}[$i]."</td></tr>\n";}
}
if($row[stapro]){
echo "<tr><td align=\"right\">"._STAPRO."</td>";
if(count(${$currentlang."_".$row[country]."_sp"})>=1){
echo "<td>{${$currentlang."_".$row[country]."_sp"}[$row[stapro]]}";
}
else echo "<td>".htmlspecialchars(stripslashes($row["stapro"]));
echo "</td></tr>";}
if($row[city]){
echo "<tr><td align=\"right\">"._CITY."</td>";
if(count(${$currentlang."_".$row[country]."_sp_cc"})>=1){
echo "<td>{${$currentlang."_".$row[country]."_sp_cc"}[$row[city]]}";
}
else echo "<td>".htmlspecialchars(stripslashes($row["city"]))."";
echo "</td></tr>";
}
echo "<tr><td align=\"right\">";
$result = sql_query("select uname from ".$prefix."_session where uname='$ffusername'", $dbi);
list($uname) = sql_fetch_row($result, $dbi);
if ($uname == "") {
$online = _OFFLINE;
} else {
$online = _ONLINE;
}
echo ""._USERSTATUS.":</td><td> $online</td></tr>";
echo "<tr><td>"._VIEWS.":</td><td>$row[click]</td></tr>";
echo "</table>";
echo "<table align=left>";
list($user_lastvisit)=$db->sql_fetchrow($db->sql_query("select user_lastvisit from ".$user_prefix."_users where username='$cookie[1]'"));
//echo "Ultima Volta Online: ".$user_lastvisit;
echo "</td></tr></table></font>";
CloseTable();
Teoricamente $username è già richiamata e quindi dovrei scrivere:
E' corretto?
Grazie per l'aiuto