View file forum/profile.php

File size: 1.88Kb
<?  
require("functionChat.ssp");

function GetProfItem($Item)
{
global $profile; 
  $start = strpos(" $profile","<$Item>");
  if ($start > 0)
  {
    $itemlen = strpos(" $profile","</$Item>") - $start - strlen("<$Item>");
    $s = substr(" $profile",$start+ strlen("<$Item>"),$itemlen);
  }
  else
  {
    $s="";
  }
  return $s;    
}

openDB();
$r = GetRandom();
$sqlSel="select * from users where nick='$to'"; 
$result=mysql_query($sqlSel) or die(mysql_error()); 
$Count=mysql_num_rows($result);
if ($Count == 0) LogResult(utf(4),utf(5),"index.php?p=$r");
$nick = mysql_result($result,0, "nick"); 
$sent = mysql_result($result,0, "sent"); 
$regtime = mysql_result($result,0, "regtime"); 
$profile = mysql_result($result,0, "profile");
$room = mysql_result($result,0, "room");  
$lastrefr = mysql_result($result,0, "lastrefr");  

mysql_close();

require("headerwml.ssp");


echo "<card id=\"$MagForum\" title=\"".utf(17)."\">";  
echo "<p>";            
echo "<b>".utf(0).": </b>".NoClones($nick)."<br/>\n";

// Проверял почту ?????????

echo "<b>".utf(19).": </b>".date("d/m/y ",$regtime)."<br/>\n";

echo "<b>".utf(20).": </b>$sent<br/>\n";

for ($i=0; $i<count($ProfData); $i++) 
{  
  list($label,$mess,$datalen)=explode("|",$ProfData[$i]);
  $ItemVal = GetProfItem($label);
  $ItemText = $mess;
  if ($label=="sex")
  { 
    $ItemText = $win[21];
    if ($ItemVal == 1)
    {
      $ItemVal = utf(22);
    }
    else
    {
      if ($ItemVal == 2) 
      {
        $ItemVal = utf(23);
      }
      else 
      {
        $ItemVal = "";
      }
    }    
  }  
  If ($ItemVal != "") {echo "<b>".win2utf($ItemText).": </b>$ItemVal<br/>\n";}
} 

echo "<anchor>- ".utf(9);
echo "<prev/>";
echo "</anchor>\n";  

echo "<do type=\"prev\" label=\"".utf(9)."\">\n";
echo "<prev/>\n";
echo "</do>\n";
echo "</p>";
include ("bottom.inc");
?>