File: /home/httpd/html/baretube.com/admin/preview.php
<? include('db.php'); ?>
<span style='font-family: Arial, Helvetica, sans-serif;'><strong>Currently Viewing: <? echo strip_tags($_GET['filename']); ?></strong></span>
<? if ($_GET['filename']) { ?>
<? $arr = explode('.', $_GET['filename']); ?>
<? $arr = array_reverse($arr); ?>
<? if ($arr[0] == 'flv' || $arr[0] == 'mp4') { ?>
<? $defaultFile = $basehttp . "/content/" . $_GET['filename']; ?>
<script src="<? echo $basehttp; ?>/includes/player/flowplayer-3.2.11.min.js"></script>
<a id="thisPlayer" style='display: block; width:530px; height:400px;'></a>
<script type="text/javascript">
flowplayer("thisPlayer", {
src: "<? echo $basehttp; ?>/includes/player/flowplayer-3.2.16.swf",
wmode: "opaque"
}, {
key: "<? echo $flowplayerKey; ?>",
clip: {
url: '<? echo $defaultFile; ?>',
autoPlay: false,
autoBuffering: true,
provider: '<? echo $player_streamer; ?>'
},
plugins: {
lighttpd: {
url: "<? echo $basehttp; ?>/includes/player/flowplayer.pseudostreaming-byterange-3.2.11.swf"
},
<? if ($player_streamer == 'rtmp') { ?>
rtmp: {
url: "<? echo $basehttp; ?>/includes/player/flowplayer.rtmp-3.2.12.swf",
netConnectionUrl: <? echo $player_rtmp; ?>,
durationFunc: 'getStreamLength'
},
<? } ?>
}
}
);</script>
Please note: Video may not stream correctly due to missing metadata. This data will be injected during encoding process.
<? } else { ?>
<center>
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="480" height="360" codebase="http://www.microsoft.com/Windows/MediaPlayer/">
<param name="Filename" value="/content/<? echo $_GET['filename']; ?>">
<param name="AutoStart" value="true">
<param name="ShowControls" value="true">
<param name="BufferingTime" value="2">
<param name="ShowStatusBar" value="false">
<param name="AutoSize" value="true">
<param name="InvokeURLs" value="false">
<embed src="/content/<? echo $_GET[filename]; ?>" type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="0" showdisplay="0" showcontrols="1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" width="500" height="400"></embed>
</object>
</center>
<br /><center>Please note: This video has not had metadata injected, and therefor may not yet stream correctly. <a href='#' onClick="$.fn.colorbox.close();">Close</a>.</center>
<? } ?>
<? } else { ?>
An error has occured
<? } ?>
<? exit(); ?>