<?php  header('Content-type: text/html; charset=utf-8'); ?>
<html>
<body>
<link rel="stylesheet" type="text/css" href="css/style.css" />

<div id="bglager" style="position:absolute; left:-3px; top:0px; width:200; height:600px; z-index:2"> 
<img src="images/left.gif"></img>
</div>
<?php	include("meny.htm"); ?>
<div id="Layer5" style="position:absolute; left:15px; top:220px; width:170; height:395px; z-index:3"> 
  <p> 
    <?php
	include("scripts/sqlinfo.inc");
	mysql_connect($host, $user, $pass);
	mysql_select_db("pyrot");
	$result=mysql_query("SELECT COUNT(*) from medlemmar where status != 'utbrand'");
	$r=mysql_fetch_array($result);
	$medlem=rand(1, $r[0]);
	$result=mysql_query("SELECT col_id, namn, photo FROM medlemmar where status != 'utbrand'");
	$count=1;
	$r=mysql_fetch_array($result);
	while($medlem>$count){
		$r=mysql_fetch_array($result);
		$count++;
	}
//	printf("Debug: %s, %d", $medlem, $r["col_id"]);
	printf("<center><table border=0 width=150>
		<tr><td><b>Slumpmedlem: <a href=\"left.php\"> [Hitta ny]</a></b></td></tr>
		<tr><td><a href=\"members.php?id=%s\" target=\"_main1\">%s</a></td></tr>
		", $r["col_id"], $r["namn"] );

	if($r["photo"]!=""){
		printf("<tr><td><br><img src=\"%s\" width=148></img></td></tr>",  $r["photo"]);
	}else{
		printf("<tr><td>Inget foto tillgängligt :(</td></tr>");
	}
	printf("</table></center>");

?>
  </div>
<div id="Layer6" style="position:absolute; left:20px; top:530px; width:170; height:395px; z-index:4"> 
    <b>Informationsmail</b><br>Vill du få information om när och var pyrot kommer skjuta? Gå då med i vår 
    <a href="join_maillista.php" target="_main1">maillista</a>
</div>
</body>
</html>
