<?php
include "../../../../include/cctvai.conn.php";
global $db;
$query = $db->query('select * from '.tname('dj')." where CD_Deleted=0 and CD_Passed=0 and CD_IsBest=5 order by rand() desc LIMIT 0,60");
while ($row = $db->fetch_array($query)) {
$server=$db->getrow("select * from ".tname('server')." where CD_ID=".$row['CD_Server']."");
$row['CD_Name']=str_replace('&nbsp;',' ',$row['CD_Name']);
$row['CD_Name']=str_replace('&#160;',' ',$row['CD_Name']);
$row['CD_Name']=str_replace('&#32;',' ',$row['CD_Name']);
$row['CD_Name']=str_replace('&#39;',' ',$row['CD_Name']);
$CD_Url=$row['CD_Url'];
$playurl=''.$server['CD_Url'].''.$CD_Url.'';
$downurl=DownLinkUrl(cd_webmlplay,$row['CD_ID']);
echo 'DATA("'.$row['CD_Name'].'","'.$playurl.'","'.$downurl.'");
';
}
?>