Benzer oyunlar ?
8
●705
- 24-09-2009, 15:53:08merhaba onarcade oyun sayfasında benzer oyunları nasıl listeleyebilirim ?
- 24-09-2009, 18:20:21Detay verirseniz yardım olur verilmezse kimsenin elinden birşey gelmez.
Eğer başka bir sitemde benzer oyunlar gibi birşey yapmak istiyorsanız;
Önce video adını mysql'dan arattırırsınız ve çıkan sonuçları ekrana bastırırsınız if ile kontrol edip sonuç yoksa aynı kategoride olan oyunları çekersiniz elseif yapıp yine sonuç yoksa rasgele oyunları koyarsınız. - 24-09-2009, 22:00:29onarcade inceleme fırsatım yok ama basit bi mantık ile,
$baslik='onarcade oyun sistemi başlık değişkeni';
$parcalar=explode(' ',$baslik);
$sql='SELECT baslik,id,falan,fisman FROM oyunlar WHERE baslik LIKE \'%'.$parcalar[0].'%\'';
for($i=1;$i<count($parcalar);$i++)
{
$sql.=' OR baslik LIKE \'%'.$parcalar[$i].'%\';
}
$sorgu=mysql_query($sql);
while($db=mysql_fetch_assoc($sql))
{
echo '<a.......:';
}
şeklinde olabilir - 24-09-2009, 23:24:35merhaba onarcade oyun sitem var adres OyunForumu.net Oyun, Kral oyun, Oyunlar1, Cocuk Oyunlar, Araba Oyunlar
file php sayfası aşağıdaki gibidir ben bu sayfada oynanan oyuna benzer 15 oyunu listelemek istiyorum site etiketlerinin altında.
file.php
<?php if (is_numeric($fileid)) { $sql = mysql_query("SELECT * FROM files WHERE fileid = '$fileid' LIMIT 1"); if (mysql_num_rows($sql) > 0) { $row = mysql_fetch_array($sql); $fileid = $row['fileid']; $filename = $row['file']; $icon = $row['icon']; $filelocation = $row['filelocation']; $iconlocation = $row['iconlocation']; $filetitle2 = $row['title']; $filetitle = $row['title']." oyunu, ".$row['title']." oyunları, ".$row['title']." oyna"; $sitename3 = $row['title'].", ".$row['title']." flash oyun, ".$row['title']." kral oyun, ".$row['title']." oyna,"; $filedescription = $row['description']; $filewidth = $row['width']; $fileheight = $row['height']; $filecategory = $row['category']; $timesplayed = $row['timesplayed']; $filestatus = $row['status']; $filetype = $row['filetype']; $filerating = $row['rating']; $totalvotes = $row['totalvotes']; $category_sql = mysql_query("SELECT name, permissions FROM categories WHERE catid = '$filecategory' LIMIT 1"); $category_row = mysql_fetch_array($category_sql); $categoryname = $category_row['name']; $categorypermissions = $category_row['permissions']; $categoryurl = categoryurl($filecategory,$categoryname); // Redirect to index page if game isn't working if ($filestatus == '0') { header("Location: ".$siteurl."/"); exit(); } // Update stats if ($categorypermissions == '2' && $userStatus == '1' || $categorypermissions == '1') { if ($maxguestplays <= $guestPlayed && $userStatus == '0') { } else { $timesplayed = $timesplayed + 1; $played_today = $played_today + 1; $update = mysql_query("UPDATE files SET timesplayed = '$timesplayed' WHERE fileid = '$fileid'"); $update2 = mysql_query("UPDATE statistics SET playedtoday = '$played_today' WHERE datetoday = '$datetoday'"); if ($userStatus == '1') { $userPlayed = $userPlayed + 1; $update = mysql_query("UPDATE users SET played = '$userPlayed' WHERE userid = '$userId'"); } elseif ($userStatus == '0') { if ($guestcredits == '1') { $guestPlayed = $guestPlayed + 1; $update = mysql_query("UPDATE online SET played = '$guestPlayed' WHERE ip = '$ipaddress' && status = '0'"); } } } } } else { header("Location: ".$siteurl."/"); exit(); } } else { header("Location: ".$siteurl."/"); exit(); } // Display file function displayfile($filename,$filewidth,$fileheight,$filetype,$filelocation) { global $siteurl, $filesdir; if ($filelocation == '1') { $fileurl = $siteurl."/files/".$filesdir."/".$filename; } else { $fileurl = $filename; } if ($filetype == '1') { ?> <!-- Reklam --> <script type="text/javascript"> // Reklam function gizle() { var x=document.getElementById('birinci').style; var y=document.getElementById('ikinci').style; if(x.display=='block') { x.display='none'; y.display='block'; } } setTimeout('gizle()',6000); </script> <div id="birinci" style="display:block" align="center"> <br><center><b>Oyun Yükleniyor Oyunun Yüklenmesi Oyun Boyutuna Göre 1 ile 5 Dakika Sürebilir...<br> <img src="/../images/yukle.gif" border="0" height="13" width="195"></center> </div> <!-- /Reklam --><div id="ikinci" style="display:none" align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="<?php echo $filewidth; ?>" height="<?php echo $fileheight; ?>"> <param name="movie" value="http://flash.oyunforumu.net/oyun/flashlar/<?php echo $filename; ?>"> <param name="quality" value="high"> <param name="menu" value="false"> <embed src="http://flash.oyunforumu.net/oyun/flashlar/<?php echo $filename; ?>" width="<?php echo $filewidth; ?>" height="<?php echo $fileheight; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed> </object></div> <?php } elseif ($filetype == '2') { ?> <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://active.macromedia.com/director/cabs/sw.cab" width="<?php echo $filewidth; ?>" height="<?php echo $fileheight; ?>" name="shocked" id="swmovie1"> <param name="src" value="http://flash.oyunforumu.net/oyun/flashlar/<?php echo $filename; ?>"> <embed src="http://flash.oyunforumu.net/oyun/flashlar/<?php echo $filename; ?>" width="<?php echo $filewidth; ?>" height="<?php echo $fileheight; ?>"> </object> <?php } elseif ($filetype == '3') { ?> <img src="<?php echo $fileurl; ?>" width="<?php echo $filewidth; ?>" height="<?php echo $fileheight; ?>" border="0"> <?php } elseif ($filetype == '4') { ?> <object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/ en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." TYPE="application/x-oleobject" <?php if ($filewidth == '0' || $fileheight == '0') { echo 'AutoSize="true"'; } else { echo 'width="'.$filewidth.'" height="'.$fileheight.'"'; } ?>> <param name="fileName" value="<?php echo $fileurl; ?>"> <param name="animationatStart" value="true"> <param name="transparentatStart" value="true"> <param name="autoStart" value="true"> <param name="showControls" value="true"> <param name="Volume" value="-20"> <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="<?php echo $fileurl; ?>" name="MediaPlayer1" autostart="1" showcontrols="1" volume="-20" <?php if ($filewidth == '0' || $fileheight == '0') { echo 'AutoSize="true"'; } else { echo 'width="'.$filewidth.'" height="'.$fileheight.'"'; } ?>> </object> <?php } } // Display comments function displaycomments($fileid) { global $maxcomments; $result = mysql_query("SELECT * FROM comments WHERE fileid = '$fileid' ORDER BY commentid DESC LIMIT $maxcomments"); if (mysql_num_rows($result)) { while($row = mysql_fetch_array($result)) { $cuserid = $row[userid]; $comment = nl2br(htmlentities($row[comment])); $comment = bbcode($comment); $cdate = $row[date]; if ($cuserid == '0') { $cusername = "Guest"; } else { $sql = mysql_query("SELECT username FROM users WHERE userid = '$cuserid' LIMIT 1"); $row2 = mysql_fetch_array($sql); $cusername = htmlentities($row2[username]); $cusername = "<a href=\"".profileurl($cuserid,$cusername)."\">".$cusername."</a>"; } ?> <table border="0" width="98%" class="boxestext"> <tr> <td width="50%" valign="top"> <b>İsim:</b> <?php echo $cusername; ?> </td> <td width="50%" valign="top"> <b>Tarih:</b> <?php echo $cdate; ?> </td> </tr> <tr> <td colspan="2" valign="top"> <?php echo $comment; ?> </td> </tr> </table> <?php } } } ?> - 24-09-2009, 23:55:04bende calışmıyor bu eklenti ayrıca ben benzer oyunları listelemek istiyorum.annudora adlı üyeden alıntı: mesajı görüntüle