Location: PHPKode > projects > MyOWNSpace > MyOWNspace_v8.2/www/showmyownfriends.php
	<? 

$conf_file="myownfriends/friends.".$_GET['go'].".php";

if (file_exists($conf_file)) 
{
include $conf_file;
//echo $conf_file;
}
else  {
$fp=@fopen($conf_file, "w");
@chmod ($conf_file, 0777);
$random_friend=rand(1,count($myspace));
$default_friends='<? $myownfriend=array('.$random_friend.');?>';
fwrite($fp, $default_friends);
fclose ($fp);
include $conf_file;
}	
$col=1;
$row=1;
echo '<table align="center" border="0" cellpadding="5" cellspacing="0" width="435">
<tbody><tr>';
shuffle($myownfriend);
while (list($key,$val) = each($myownfriend)) {
$face="/images/unknown.gif";
if($myspace[$val]['image']=="") $pic=$face; else $pic=$myspace[$val]['image'];
echo '<td align="center" bgcolor="#ffffff" valign="top" width="1"><table align="center" border="0" cellspacing="0">
<tbody><tr>
<td style="" align="center" bgcolor="#ffffff" valign="top" width="107"><a href="/'.$val.'">
'.$myspace[$val]['artiste'].'</a>&nbsp;
</td></tr><tr>
<td align="center" bgcolor="#ffffff" valign="top" width="25%">
<a href="/'.$val.'"><img width="80" src="'.$pic.'"></a><br><div style="width: 80px; height: 20px;" id="UserDataNode1" class="DataPoint=OnlineNow;UserID=43390848;"></div></td>
</tr></tbody></table>';
if($col<4) {$col++;echo'</td>';} else {$col=1;$row++;echo'</td></tr><tr>';}
if(($row>2)&&($view_all!=1)) break;
}

/*	
	$n=count($myspace);

	for($i=1;$i<=$n;$i++)
	{	
	$r=rand($i,$n);
	if ($friends!="1")
	{
	if ($myspace[$r]['owner']==$owner) {
$face="/images/unknown.gif";
if($myspace[$r]['image']=="") $pic=$face; else $pic=$myspace[$r]['image'];
echo '<td align="center" bgcolor="#ffffff" valign="top" width="1">
<table align="center" border="0" cellspacing="0">
<tbody><tr>
<td style="" align="center" bgcolor="#ffffff" valign="top" width="107">
&nbsp;<a href="?go='.$r.'">'.$myspace[$r]['artiste'].'</a>&nbsp;
</td></tr><tr>
<td align="center" bgcolor="#ffffff" valign="top" width="25%"><a href="?go='.$r.'"><img width="80" src="'. $pic .'"></a><br><div style="width: 80px; height: 20px;" id="UserDataNode1" class="DataPoint=OnlineNow;UserID=43390848;"></div></td>
</tr></tbody></table></td>';
	}
	else echo '<td align="center" bgcolor="#ffffff" valign="top" width="1">
<table align="center" border="0" cellspacing="0">
<tbody><tr>
<td style="" align="center" bgcolor="#ffffff" valign="top" width="107">
&nbsp;<a href="?go='.$r.'">'.$myspace[$r]['artiste'].'</a>&nbsp;
</td></tr><tr>
<td align="center" bgcolor="#ffffff" valign="top" width="25%"><a href="?go='.$r.'"><img width="80" src="'. $pic .'"></a><br><div style="width: 80px; height: 20px;" id="UserDataNode1" class="DataPoint=OnlineNow;UserID=43390848;"></div></td>
</tr></tbody></table></td>';
}

if($i==4) echo'</tr><tr>';
if($i==8) break;
}*/
echo '</tr></tbody></table>';
?>										
								
Return current item: MyOWNSpace