Den overfører ikke informationer til anden side!! HJÆLP
Hej eksperter,Jeg har disse to side:
swf-liste.php
<?php
$files = array();
$handle = opendir('swf/');
while (false !== ($file = readdir($handle))) {
if (eregi(".swf$",$file)){
$files[] = "<a href=http://www.funsense.dk/swf.php?swf=swf/$file><img src='swf-lille.gif' alt='http://www.funsense.dk/swf/$file' border='0'><b> <b>' $file '</b></a>";
}
}
$break = 1; // Antal billeder billeder på hver "linje"
$limit = 20; // Antal resultater pr. side
$pages_each_way = 7; // Sider der peger hver vej
$string_output = ''; // Sætter $string_output
/* Calculation */
$total = count($files);
$offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
$start_point = ($offset-($pages_each_way*$limit) < 0) ? 0 : $offset-($pages_each_way*$limit);
$end_point = ($offset+($pages_each_way*$limit) > $total) ? $total : $offset+($pages_each_way*$limit);
$page_number = ($start_point/$limit)+1;
$break_control = 1;
for($i=$offset;$i<$offset+$limit;$i++) {
$string_output .= $files[$i].' ';
if ($break_control == $break) {
$string_output .= '<br>';
$break_control = 0;
}
$break_control++;
}
$string_output .= '<hr>';
$string_output .= ($offset >= $limit) ? '<a href="?offset='.($offset-$limit).'"><<</a> ' : '<< ';
for ($start=$start_point;$start<$end_point;$start=$start+$limit) {
$string_output .= ($offset == $start) ? '<b>'.$page_number++.'</b> ' : '<a href="?offset='.$start.'">'.$page_number++.'</a> ';
}
$string_output .= ($total > $offset+$limit) ? '<a href="?offset='.($offset+$limit).'">>></a>' : '>>';
/* Printing */
echo $string_output;
?>
og
swf.php
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="448" height="299">
<param name=movie value="<?php print $swf; ?>">
<param name=quality value=High>
<param name="_cx" value="7646">
<param name="_cy" value="3572">
<param name="FlashVars" value="-1">
<param name="Src" value="<?php print $swf; ?>">
<param name="WMode" value="Window">
<param name="Play" value="-1">
<param name="Loop" value="-1">
<param name="SAlign" value>
<param name="Menu" value="0">
<param name="Base" value>
<param name="AllowScriptAccess" value="always">
<param name="Scale" value="ShowAll">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="BGColor" value="FFFFFF">
<param name="SWRemote" value>
<embed src="<?php print $swf; ?>" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="576" height="378">
</embed></object>
Det der sker, er at swf-liste.php finder .swf filer i en mappe, og lister dem op. Det link der kommer frem har jeg sat til at være swf.php?swf=swf/$file, og dette skulle gerne blive vist i swf.php.
Men det virker sq ikke.
Hvad gør jeg galt?
Mvh
Jakob Bjerre
www.funsense.dk
