Even dit topic uit de stofnesten gehaald.
Bin weer drok bezig um 't e.a. nog beter te krieg'n moar d'r is wat, luk woar Ik nog nich helemoal aan oet kom.
Met andere woorden...ik kom er nog niet niet helemaal aan uit.
Als er geen hoesje aanwezig bij het nummer wat komt dan laat hij een rood kruisje zien.
Ik wil niet bij de rest het na.gif laten zien maar hij moet dus net als bij de rest niks laten zien.

Voor het gemak hier ook nog mijn playing.php
Code: Selecteer alles
<?
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",6);
$history = $db->rows();
reset($history);
$db->open("SELECT songlist.*, queuelist.requestID as requestID FROM queuelist, songlist WHERE (queuelist.songID = songlist.ID) AND (songlist.songtype='S') AND (songlist.artist <> '') ORDER BY queuelist.sortID ASC",1);
$queue = $db->rows();
reset($queue);
//### Calculate the bezt time to refresh the webpage in order to show new updated song information
//==================================================================================================
list($key, $song) = each($history);
$listeners = $song["listeners"];
$starttime = strtotime($song["date_played"]);
$curtime = time();
$timeleft = $starttime+round($song["duration"]/1000)-$curtime;
//Set refesh interval
if($timeleft>0) # 30 second minimum wait
{ $timeout = $timeleft;} # if timeleft is valid, refresh on timeleft (should be end of song)
else
{ $timeout = 90; } # otherwise, fall back on 90 second refresh
if(($timeout>180) or ($timeout==0)) $timeout = 180;
if($timeout<30) $timeout = 30;
$refreshURL = "playing.php?buster=".date('dhis').rand(1,1000);
//==================================================================================================
$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;
if(empty($song["picture"])) $song["picture"] = "na.gif";
PrepareSong($song);
$rc++;
$bgcolor = $darkrow;
if(($rc % 2)==0) $bgcolor = $lightrow;
?>
<tr bgcolor="<? echo $bgcolor; ?>">
<?if($showpic){?>
<td valign="middle" width="1%">
<? if($song["haspicture"]) {?>
<img id="<? NextPicName(); ?>" onError="PictureFail('<? PicName(); ?>')" width="70" height="70" src="<? echo $song["picture"]; ?>" alt="" border=0></a>
<?};?>
</td>
<?}?>
<td <?if(!$showpic) echo "colspan=2"?>><b><font face="arial" size="3" color="#000000"><small> <?
echo $song["artist"];
?></small></font></b><br>
<b><font face="arial" size="3" color="#FF000E"><small> <?
echo $song["title"];?></small></font></b>
<br>
<b><font face="arial" size="3" color="blue"><small> <?
echo $song["genre"];?></small></font></b>
<br>
<b><font face="arial" size="3" color="#0404B3"><small><?
echo $song["count_played"];?><font face="arial" size="3" color="#0404B3"><small> keer gedraaid</small></font></b>
<font face="arial" size="3" color="#0404B3">: </font>
<b><font face="arial" size="3" color="#0404B3"><small><?
echo $song["count_requested"];?><font face="arial" size="3" color="#0404B3"><small> keer aangevraagd</small></font></b>
<br>
<b><font face="arial" size="3" color="#ff00ef"><small><?
if($song["requestid"]!=0) { echo " Dit nummer is aangevraagd "; }
?></small></font></b>
</td>
<td nowrap>
<p align="right"><font color="#003366" size="3"><small><strong><? echo $song["mmss"]; ?> </strong></small></font>
</td>
</tr>
<?
}//PutSongRow
/* ## ===================================================================== ## */
?>
<? require("header.php"); ?>
<SCRIPT LANGUAGE="JavaScript">
<!---
var refreshID = "";
refreshID = setTimeout("DoRefresh()", <? echo ($timeout*1000); ?>);
function DoRefresh()
{
document.location.href = '<? echo $refreshURL; ?>';
}
//--->
</SCRIPT>
<table border="0" width="99%" cellspacing="0" cellpadding="1">
<tr bgcolor="#002E5B">
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b><div align="center">Nu te horen</b></font>
</td>
</tr>
<?
$rc=0;
PutSongRow($song);
$mainsong = $song;
?>
<tr bgcolor="#002E5B">
<td colspan="3" nowrap>
<p align="center"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#ffffff">Zodadelijk</font></a>
</td>
</tr>
<font size="2">
<?
if(count($queue)>0){?>
<tr bgcolor="<? echo $lightrow; ?>">
<?
$i=0;
while(list($key, $song) = each($queue))
{
?>
<td valign="middle" width="12%">
<img src=" <? echo $picture_dir.$song["picture"]; ?>"
width="70"
height="70"
title ="<? echo $song["artist"]; ?> - <? echo $song["title"]; ?>!"
alt="<? echo $song["album"]; ?>!"
border=0
>
</td>
<td><b><font face="arial" size="3" color="#000000"><small> <?
echo $song["artist"];
?></small></font></b><br>
<b><font face="arial" size="3" color="#FF000E"><small> <?
echo $song["title"];?></small></font></b><br>
<b><font face="arial" size="3" color="blue"><small> <?
echo $song["genre"];?></small></font></b>
<br>
<b><font face="arial" size="3" color="#0404B3"><small><?
echo $song["count_played"];?><font face="arial" size="3" color="#0404B3"><small> keer gedraaid</small></font></b>
<font face="arial" size="3" color="#0404B3">: </font>
<b><font face="arial" size="3" color="#0404B3"><small><?
echo $song["count_requested"];?><font face="arial" size="3" color="#0404B3"><small> keer aangevraagd</small></font></b>
<br>
<b><font face="arial" size="3" color="#ff00ef"><small><?
if($song["requestid"]!=0) { echo " Dit nummer is aangevraagd "; }
?></small></font></b>
<td align="Right">
</td>
<?
$i++;
}
?>
<?}?>
<tr bgcolor="#002E5B">
<td colspan="7" nowrap>
<p align="center"><b> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF">Recentelijk gedraaid</font></b>
</td>
</tr>
<font size="2">
<?
$rc=0;
while(list($key, $song) = each($history))
PutSongRow($song);
?>
</table>
<table width="90%" align="center">
<form name="count">
<input type="text" size="90%" name="count2">
</form>
<script>
var before="2010"
var current="Gelukkig Nieuwjaar!"
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countdown(yr,m,d){
theyear=yr;themonth=m;theday=d
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[m-1]+" "+d+", "+yr
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
if(dday==0&&dhour==0&&dmin==0&&dsec==1){
document.forms.count.count2.value=current
return
}
else
document.forms.count.count2.value=" Nog "+dday+ " dagen, "+dhour+" uren, "+dmin+" minuten, en "+dsec+" seconden tot "+before
setTimeout("countdown(theyear,themonth,theday)",1000)
}
//enter the count down date using the format year/month/day
countdown(2010,1,1)
</script>
</table>
</td><td valign='top' align='center'>
<?
####################
# Request Dedication
require("dedication.php");
#===================
?>
<?
####################
# BuyCD image
if($mainsong["haspicture"])
require("buycd.php");
#===================
?>
<?
##################
# Top 10 requests
if($showtoprequests)
require("top10requests.php");
#===================
?>
</td>