<script type="text/javascript" src="/js/bootstrap-datepicker.js"></script>
<input id="date" type="text" name="dat1" class="date" maxlength=50 size=25% />
<script>
$(function () {
$('#date').datepicker({
language: "ru",
selectWeek: true,
format: "dd.mm.yyyy",
autoclose: true,
todayHighlight: true});
var queryDate = "<?php echo "$mn" ?>";
$('#date').datepicker('setDate', queryDate);
$('#date').datepicker()
.on('changeDate', function (ev) {
document.getElementById('newFormAdv').submit();
});
});
</script>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>JWPlayer test</title>
<script src="player/jwplayer.js"></script>
</head>
<body>
<?php
$dir = 'video';
$files = scandir($dir,1);
echo '<pre>';var_dump($files);
for($i=0, $cnt = count($files);$i<$cnt;$i++)
{
if (substr($files[$i], -3) == 'flv' )
{
$id = $files[$i];
echo "
<div id='$id'></div>
<script type='text/javascript'>
jwplayer('$id').setup({
file: 'video/$id',
title: 'Razer',
width: '100%',
aspectratio: '16:9',
fallback: 'false'
});
</script>
";
}
}
?>
</body>
</html>