arkadaşlar olay benimaçımdN Tamamdır.. kodları paylaşıyorum
File.html için eklediğim kod
<?php if ($relatedfiles == '1') { ?>
<div class="filebox">
<div class="fileboxheader">İlgili Dosyalar : </div>
<div class="boxestext">
<table width="600" border="0"><tr><td>
<?php relatedfiles($filecategory, $fileId); ?></td></tr></table>
</div>
</div>
<?php } ?>
------------------------------------------------------------------
File.php için eklediğim kod:
function relatedfiles($filecategory,$fileId) {
global $siteurl, $maxrelatedfiles;
$result = mysql_query("SELECT fileid, title, description, icon, iconlocation, timesplayed FROM files WHERE category = '$filecategory' && status ='1' && fileid != '$fileId' ORDER BY RAND() LIMIT 30");
while($row = mysql_fetch_array($result)) {
$rfileId = $row['fileid'];
$rfileTitle = $row['title'];
$rfileDescription = $row['description'];
$rfileIcon = $row['icon'];
$riconLocation = $row['iconlocation'];
$rtimesPlayed = number_format($row['timesplayed']);
if ($riconLocation == '1') {
$rimageUrl = $siteurl."/files/image/".$rfileIcon;
} else {
$rimageUrl = $rfileIcon;
}
if (strlen($rfileDescription) > '80') {
$rfileDescription = substr("$rfileDescription",0,77)."...";
}
?>
<a href="<?php echo fileurl($rfileId,$rfileTitle); ?>" target="_self"><img src="<?php echo $rimageUrl; ?>" width="70" height="59" title="<?php echo $rfileTitle; ?>" alt="<?php echo $rfileTitle; ?>" border="0"></a>
<?php
}
}
Limit 30 istege göreazaltabiliyor resimlerde sayı olarak az çıkıyor..
teşekkürler NeLph sayende yapabildim
edit:
http://www.oyunu-oyna.info/game/2917...rkek-Oyun.html
yukarıda örnek sayfa var en altta ilgili dosyalar kısmından görülebilir..