I have a php-include on two different pages that show an image of the current album playing.
It works wonderful in Firefox, but the image doesn't show in IE; not even a red x. It just doesn't even recognize it.
Does anybody have any ideas?
Here is the code...
<?php
// Sam3 - PHPNuke Content Block Now Playing
$radiostation = "http://www.deviantradio.com";
require("config.php");
$db->open("SELECT songlist.*, historylist.listeners as listeners, historylist.requestID as requestID, historylist.date_played as starttime FROM historylist,songlist WHERE (historylist.songID = songlist.ID) AND (songlist.songtype='S') ORDER BY historylist.date_played DESC",1);
$history = $db->rows();
reset($history);
list($key, $song) = each($history);
$listeners = $song["listeners"];
$starttime = strtotime($song["date_played"]);
$curtime = time()+3582; //adjust in miliseconds if offset from web host
$secsRemain = (round($song["duration"] / 1000)-($curtime-$starttime));
$pic_cnt = 0;
function PicName()
{
global $pic_cnt;
echo "Picture".$pic_cnt;
}
function NextPicName()
{
global $pic_cnt;
$pic_cnt += 1;
PicName();
}
function PutSongRow(&$song)
{
global $rc, $showpic, $darkrow, $lightrow;
PrepareSong($song);
}
//PutSongRow
$rc=0;
PutSongRow($song);
$mainsong = $song;
// Image and Link to Radio Station
?>
<div align="center"><a href="<? echo $song["buycd"]; ?>" target="_blank"><img id="<? NextPicName(); ?>" onError="PictureFail('<? PicName(); ?>')" src="<? echo $mainsong['picture']; ?>" border="0" width="<? echo $picwidth; ?>"><br>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"><small>
<? echo $mainsong['artist']; ?> </small></font>
</a><br>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#9fa7b2"><small>
<? echo $mainsong['album']; ?>
</small></font><br>
</div><div align="center"><font size="-3">
<div align="center"><font color="#9fa7b2">(Time left: <b id="countDownText"></b>)</b></font>
</div>
<p align="center"><font face="Geneva, Arial, Helvetica, sans-serif"color="#9fa7b2"><a href="http://beta.loudcity.com/station/309.aspx"target="_blank"><font size="2">Listen Now!</font></a></font></p>
<script language="JavaScript">
var countDownInterval = <? echo $secsRemain; ?>;
var countDownTime = countDownInterval + 1;
if (document.all||document.getElementById)
countDown();
else
window.onload = countDown;
function countDown() {
countDownTime--;
if (countDownTime == 0) {
countDownTime = countDownInterval;
window.location.reload();
return;
}
else if (countDownTime < 0)
countDownTime = 30;
if (document.all)
document.all.countDownText.innerText = secsToMins(countDownTime);
else if (document.getElementById)
document.getElementById("countDownText").innerHTML = secsToMins(countDownTime);
counter = setTimeout("countDown()", 1000);
}
function secsToMins(theValue) {
var theMin = Math.floor(theValue / 60);
var theSec = (theValue % 60);
if (theSec < 10)
theSec = "0" + theSec;
return(theMin + ":" + theSec);
}
</script>
My few remaining hairs thank you in advance of saving their life...