PHP interesse |
|
Ik heb de volgende code:
<?php
require "config.php";
?>
<script>
var slideShowSpeed = 5000
var crossFadeDuration = 5
var Pic = new Array()
<?php
if ($_GET['aid'] != "") {
$aantal = 0;
$query = mysql_query("SELECT Image FROM Fotos WHERE Albumid='".$_GET['aid']."'");
while ($sql = mysql_fetch_array($query))
{
?>
Pic[<? $i; ?>] = 'Gfx/Fotos/<? $sql['Image']; ?>.jpg'
<?php
$aantal++;
}
}
?>
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++)
{
preLoad[i] = new Image()
preLoad[i].src = Pic[i]
}
function runSlideShow()
{
if (document.all)
{
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.SlideShow.filters.blendTrans.Apply()
}
document.images.SlideShow.src = preLoad[j].src
if (document.all)
{
document.images.SlideShow.filters.blendTrans.Play()
}
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
</script>
<html>
<head>
<title>Slideshow</title>
</head>
<body onload="runSlideShow()">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="VU">
<?php
if ($_GET['aid'] != "") {
$query = mysql_query("SELECT Image FROM Fotos WHERE Albumid='".$_GET['aid']."' ORDER BY Id ASC LIMIT 0,1");
while ($sql = mysql_fetch_array($query))
{
echo "<img src='Gfx/Fotos/".$sql['Image'].".jpg' name='SlideShow'>";
}
}
else
{
echo "<center>Geen album</center>";
}
?>
</td>
</tr>
</table>
</body>
</html>
<?php require "config.php"; ?> <script> var slideShowSpeed = 5000 var crossFadeDuration = 5 var Pic = new Array() <?php if ($_GET['aid'] != "") { $aantal = 0; $query = mysql_query("SELECT Image FROM Fotos WHERE Albumid='".$_GET['aid']."'"); { ?> Pic[<? $i; ?>] = 'Gfx/Fotos/<? $sql['Image']; ?>.jpg' <?php $aantal++; } } ?> var t var j = 0 var p = Pic.length var preLoad = new Array() for (i = 0; i < p; i++) { preLoad[i] = new Image() preLoad[i].src = Pic[i] } function runSlideShow() { if (document.all) { document.images.SlideShow.style.filter="blendTrans(duration=2)" document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)" document.images.SlideShow.filters.blendTrans.Apply() } document.images.SlideShow.src = preLoad[j].src if (document.all) { document.images.SlideShow.filters.blendTrans.Play() } j = j + 1 if (j > (p-1)) j=0 t = setTimeout('runSlideShow()', slideShowSpeed) } </script> <html> <head> <title>Slideshow</title> </head> <body onload="runSlideShow()"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td id="VU"> <?php if ($_GET['aid'] != "") { $query = mysql_query("SELECT Image FROM Fotos WHERE Albumid='".$_GET['aid']."' ORDER BY Id ASC LIMIT 0,1"); { echo "<img src='Gfx/Fotos/".$sql['Image'].".jpg' name='SlideShow'>"; } } else { echo "<center>Geen album</center>"; } ?> </td> </tr> </table> </body> </html>
Hij geeft de volgende error:
Fout: Object wordt verwacht
ik kan er niet uitkomen ?!? iemand ?!?
http://g0dlike.filiaal1220.nl/test.php?aid=17
|