<html>

<head>

<link rel="stylesheet" HREF="style.css" type="text/css">

</head>

<script>
if(top.location == location)top.location='http://www.dounie.dk/avis'
</script>

<body oncontextmenu="return false"ondragstart="return false"onselectstart="return false">
<? 
include("config.php"); 
$query = mysql_query("SELECT * FROM community_avis WHERE brugernavn = '$_GET[brugernavn]'") or die(mysql_error()); 
$vis = mysql_fetch_array($query); 
?> 
<?
include("config.php"); 
$query = mysql_query("SELECT * FROM artikler_avis WHERE forfatter = '$_GET[brugernavn]'") or die(mysql_error());
$number = mysql_num_rows($query);
?>

<?
include("config.php"); 
$query = mysql_query("SELECT * FROM tagwall_avis WHERE navn = '$_GET[brugernavn]'") or die(mysql_error());
$tags = mysql_num_rows($query);
?>

<?
include("config.php"); 
mysql_query("UPDATE community_avis SET hits = hits + 1 WHERE brugernavn = '$brugernavn'");
?>

<?
$timer2 = $vis[onlinetid]/3600;
$timer = floor($timer2);
$min = floor(($timer2-$timer)*60);
if($min < 10)$min = "0".$min;
$mønter2 = $vis[mønter]/60;
$mønter = floor($mønter2);
$min1 = floor(($mønter2-$mønter)*60);
if($min1 < 10)$min1 = "0".$min1;
?>

<script>
if(top.location == location)top.location='http://www.specks.dk/avis'
</script>
<body>

<hr style="BORDER-RIGHT: #F6C73C 3px dotted; BORDER-TOP: #F6C73C 3px dotted; BORDER-LEFT: #F6C73C 3px dotted; BORDER-BOTTOM: #F6C73C 3px dotted" color="#F6C73C">
Hej, og velkommen til <b><? echo $vis[brugernavn]; ?></b>'s profil. <? echo $vis[brugernavn]; ?>'s status er lige nu sat til <? 
if($vis[status2] == "Online") 
{ 
echo("<font color=green>Online</font>"); 
} 
if($vis[status2] == "Offline") 
{ 
echo("<font color=red>Offline.</font>"); 
}
if($vis[status2] == "Optaget") 
{ 
echo("<font color=blue>Optaget.</font>"); 
}
if($vis[status2] == "Ikke til stede") 
{ 
echo("<font color=yellow>Ikke til stede.</font>"); 
} 
if($vis[status2] == "Er straks tilbage") 
{ 
echo("<font color=grey>Er straks tilbage.</font>"); 
}
if($vis[status2] == "Taler i telefon") 
{ 
echo("<font color=orange>Taler i telefon.</font>"); 
}    
?></td>
<hr style="BORDER-RIGHT: #F6C73C 3px dotted; BORDER-TOP: #F6C73C 3px dotted; BORDER-LEFT: #F6C73C 3px dotted; BORDER-BOTTOM: #F6C73C 3px dotted" color="#F6C73C">
<table style="BORDER-COLLAPSE: collapse" borderColor="#111111" cellSpacing="0" cellPadding="0" width="370" border="0">
  <tr>
    <td vAlign="top" width="100" rowSpan="13">
    <div align="center">
      <img src="<? echo $vis[toj]; ?>"><br>
      <?
$status = $vis['status'];
$status = htmlentities($status);
echo "$status";
?></div>
    </td>
    <td width="85" height="11"><b>Brugerinfo:</b></td>
    <td width="219" height="11">
	<p align="center"></td>
  </tr>
  <tr>
    <td width="85" height="15">Brugernavn:</td>
    <td width="219" height="15"><?
$brugernavn = $vis['brugernavn'];
$brugernavn = htmlentities($brugernavn);
echo "$brugernavn";
?></td>
  </tr>
  <tr>
    <td width="85" height="15">Navn:</td>
    <td width="219" height="15"><?
$navn = $vis['navn'];
$navn = htmlentities($navn);
echo "$navn";
?></td>
  </tr>
  <tr>
    <td width="85" height="15">Alder:</td>
    <td width="219" height="15"><?
$alder = $vis['alder'];
$alder = htmlentities($alder);
echo "$alder";
?></td>
  </tr>
  <tr>
    <td width="85" height="15">Hjemmeside:</td>
    <td width="219" height="15">
	<a target=_blank href="http://<? print $vis[hp]; ?>"><?
$hp = $vis['hp'];
$hp = htmlentities($hp);
echo "$hp";
?></a></td>
  </tr>
  <tr>
    <td width="85" height="15">Online tid:</td>
    <td width="219" height="15"><? echo $timer; ?> Timer, og <? echo $min; ?> Minutter</td>
  </tr>
    <tr>
    <td width="85" height="15">Artikler:</td>
    <td width="219" height="15">
<? echo "$number"; ?>    </td>
  </tr>
  <tr>
    <td width="85" height="15">Tags:</td>
    <td width="219" height="15">
    <? echo "$tags"; ?></td>
  </tr>
  <tr>
    <td width="85">Mønter:</td>
    <td width="219"><? echo $mønter ?> Mønter.</td>
  </tr>
    <tr>
    <td width="85">Level:</td>
    <td width="219"><?
if ($vis['onlinetid'] > 2448000) {
echo "15";
} elseif ($vis['onlinetid'] > 2448000) {
echo "14";
} elseif ($vis['onlinetid'] > 360000) {
echo "13";
} elseif ($vis['onlinetid'] > 252000) {
echo "12";
} elseif ($vis['onlinetid'] > 198000) {
echo "11";
} elseif ($vis['onlinetid'] > 144000) {
echo "10";
} elseif ($vis['onlinetid'] > 108000) {
echo "9";
} elseif ($vis['onlinetid'] > 82800) {
echo "8";
} elseif ($vis['onlinetid'] > 64800) {
echo "7";
} elseif ($vis['onlinetid'] > 54000) {
echo "6";
} elseif ($vis['onlinetid'] > 36000) {
echo "5";
} elseif ($vis['onlinetid'] > 28800) {
echo "4";
} elseif ($vis['onlinetid'] > 18000) {
echo "3";
} elseif ($vis['onlinetid'] > 10800) {
echo "2";
} elseif ($vis['onlinetid'] > 3600) {
echo "1";
} elseif ($vis['onlinetid'] > 0) {
echo "0";
} 
?></td>
  </tr>
  <tr>
    <td width="85">Ynglingsrum:</td>
    <td width="219"><?
$yrum = $vis['yrum'];
$yrum = htmlentities($yrum);
echo "$yrum";
?></td>
  </tr>
  <tr>
    <td width="85">Ynglingsting:</td>
    <td width="219"><?
$yting = $vis['yting'];
$yting = htmlentities($yting);
echo "$yting";
?></td>
  </tr>
  </table>
<div align="left">
	<table border="0" width="100%">
		<tr>
			<td>Fritekst:</td>
		</tr>
		<tr>
			<td><?
$fritekst = $vis['fritekst'];
$fritekst = ereg_replace('<([bB][rR])>','#BR#_START',$fritekst);
$fritekst = htmlentities($fritekst);
$fritekst = ereg_replace('#BR#_START','<br>',$fritekst);
echo "$fritekst";
?></td>
		</tr>
	</table>
</div>
<hr style="BORDER-RIGHT: #F6C73C 3px dotted; BORDER-TOP: #F6C73C 3px dotted; BORDER-LEFT: #F6C73C 3px dotted; BORDER-BOTTOM: #F6C73C 3px dotted" color="#F6C73C">
<table cellSpacing="0" cellPadding="0" width="370" border="0">
  <tr>
    <td width="60" height="1"><b>Kontakt:</b></td>
    <td width="293" height="1"></td>
  </tr>
  <tr>
    <td width="78" height="15">Bruger ID:</td>
    <td width="293" height="15"><? echo $vis[id]; ?></td>
  </tr>
  <tr>
    <td width="60" height="15">ICQ:</td>
    <td width="293" height="15"><?php
$icq = $vis['icq'];
$icq = htmlentities($icq);
echo "$icq";
?></td>
  </tr>
  <tr>
    <td width="60" height="15">Msn:</td>
    <td width="293" height="15"><a href="mailto:<? print $vis[msn]; ?>"><?php
$msn = $vis['msn'];
$msn = htmlentities($msn);
echo "$msn";
?></a></td>
  </tr>
    <tr>
    <td width="60" height="15">Email:</td>
    <td width="293" height="15"><a href="mailto:<? print $vis[email]; ?>"><?php
$email = $vis['email'];
$email = htmlentities($email);
echo "$email";
?></a>
  </tr>
  </table>

</body>

</html>