evet bastı ama bir sorun var. sürekli döndürülen ilk değişkeni atıyor $dosya değişkenine. Rawkon'un dediği gibi sanırım birden fazla bağlantıda id'lerin benzersiz olması lazım.
kodlarımın tamamı şöyle:
<html>
<head>
<script src="
ajax.googleapis.com"></script>
<script src="jquery.colorbox.js"></script>
<link rel="stylesheet" href="colorbox.css" />
<script>
$(document).ready(function(){
//Examples of how to assign the ColorBox event to elements
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true});
$(".ajax").colorbox();
$(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
$(".callbacks").colorbox({
onOpen:function(){ alert('onOpen: colorbox is about to open'); },
onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
return false;
});
});
</script>
<style type="text/css" media="screen">
* { margin: 0; padding: 0; }
body {
background: #282828;
font: 62.5%/1.2 Arial, Verdana, Sans-Serif;
padding: 0 20px;
}
h1 { font-family: Georgia; font-style: italic; margin-bottom: 10px; }
h2 {
font-family: Georgia;
font-style: italic;
margin: 25px 0 5px 0;
}
p { font-size: 1.2em; }
ul li { display: inline; }
.wide {
border-bottom: 1px #000 solid;
width: 4000px;
}
.fleft { float: left; margin: 0 20px 0 0; }
.cboth { clear: both; }
#main {
background: #fff;
margin: 0 auto;
padding: 30px;
width: 1000px;
}
</style>
</head>
<body>
<div id="main">
<?php
/**
* @author Murat
* @copyright 2011
*/
$path = 'deneme/';
$dir = $path;
if (is_dir($dir))
{
$dh = opendir($dir);
while ($file = readdir($dh))
{
if(substr($file , strlen($file) - 4 ,4) == ".flv")
{
$dosya = "deneme/" . "$file";
$son = $dosya;
print "<h2>" . $file . "</h2>
<h2><p><a class='inline' href='#inline_content'>Colorbox ile Ac</a></p><br /></h2>
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>";
print
'<center><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="545" height="400" id="player1" name="player1">
<param name="movie" value="player.swf">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="flashvars" value="file=' . $dosya .'&">
<embed id="player1" name="player1" src="player.swf" width="545" height="400" allowscriptaccess="always" allowfullscreen="true" flashvars="file=' . $son .'&">
</object></center>
</div></div>';
echo "$dosya" . "<br />" . "\n";
}
}
closedir($dh);
}
?>
</body>
</html>