001.
<?php
002.
include
(
'../walldigital/include/ez_sql.php'
);
003.
?>
006.
<head>
007.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
008.
<title>Untitled Document</title>
009.
</head>
010.
<?php
011.
012.
$_GET
[
'pid'
] =1 ;
013.
if
(
$_GET
[
'pid'
] ){
014.
015.
$sql_select_playlista
=
"select * from playlist where p_playlist_name = '"
.
$_GET
['pid
']."'
order by p_Order ";
016.
$arr_select_playlista
=
$db
->get_results(
$sql_select_playlista
);
017.
if
(
$arr_select_playlista
){
018.
$ca
= 1 ;
019.
$work_date
= @
date
(
'Y/m/d'
);
020.
$work_time
= @
date
(
'H:i:s'
);
021.
foreach
(
$arr_select_playlista
as
$value_playlist
){
022.
023.
$sql_report
=
"insert into report ( r_name, r_date, r_time ) values ( '"
.trim(
$value_playlist
->m_name).
"' , '"
.
$work_date
.
"' , '"
.
$work_time
.
"' )"
;
024.
$db
->query(
$sql_report
);
025.
026.
027.
if
(
$ca
== 1){
$fisleplay
= trim(
$value_playlist
->m_name) ; }
028.
$arrplay
.= '
029.
soundd[
'.$ca.'
] =
"'.trim($value_playlist->m_name).'"
; ';
030.
$ca
++ ;
031.
032.
}
033.
}}
034.
?>
035.
036.
<?
037.
038.
?>
039.
<script type=
"text/javascript"
>
040.
var
req;
041.
042.
function
startCallback(){
043.
if
(req.readyState == 4){
044.
if
(req.status == 200){
045.
setTimeout(
"doStart()"
,1000);
046.
}
047.
}
048.
}
049.
050.
function
doStart(){
051.
req = Inint_AJAX();
052.
var
url =
"player.php"
;
053.
req.open(
"GET"
, url, true);
054.
req.onreadystartchange = startCallback;
055.
req.send(null);
056.
};
057.
</script>
058.
<script type=
"text/javascript"
src=
"../walldigital/mediaplayer/flowplayer-3.2.13.min.js"
></script>
059.
060.
<body onload=
"doStart();"
>
061.
062.
<div id=
"player"
style=
"width:800px; height:550px; position:absolute; top:0; left:0;"
></div>
063.
064.
</body>
065.
066.
<script type=
"text/javascript"
>
067.
068.
var
soundd = [];
069.
070.
<?
071.
echo
$arrplay
;
072.
?>
073.
074.
var
ordersound = 1 ;
075.
076.
flowplayer(
"player"
,
"../walldigital/mediaplayer/flowplayer.unlimited-3.2.18.swf"
, {
077.
078.
playlist: [
'./media/New Ads/'
+soundd[ordersound] ],
079.
autoPlay: true,
080.
autoBuffering: true,
081.
play:{
082.
opacity: 0.0,
083.
label: null,
084.
replayLabel: null
085.
},
086.
onBeforeFinish:
function
(playlist) {
087.
ordersound = (ordersound+1);
088.
if
(ordersound != <?
echo
$ca
; ?>){
089.
$f
(0).play(
'./media/New Ads/'
+soundd[ordersound]);
090.
}
else
{
091.
location.reload(true);
092.
}
093.
},
094.
loop: true,
095.
plugins: { controls: null }
096.
});
097.
098.
</script>
099.
100.
</html>