BLOB translations.
[phpmyadmin/crack.git] / bs_play_media.php
blobcf80832edc3fd40eb39ff35c90f332cacf7e5ac4
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * @author Raj Kissu Rajandran
5 * @version 1.0
6 * @package BLOBStreaming
7 */
8 require_once './libraries/common.inc.php';
11 * @var string contains media type of BLOB reference
13 $mediaType = isset($_REQUEST['media_type']) ? $_REQUEST['media_type'] : NULL;
16 * @var string contains BLOB reference
18 $bsReference = isset($_REQUEST['bs_reference']) ? $_REQUEST['bs_reference'] : NULL;
20 // if media type and BS reference are specified
21 if (isset($mediaType) && isset($bsReference))
23 // load PMA configuration
24 $PMA_Config = $_SESSION['PMA_Config'];
26 // if PMA configuration exists
27 if (!empty($PMA_Config))
29 // retrieve BS server variables from PMA configuration
30 $bs_server = $PMA_Config->get('BLOBSTREAMING_SERVER');
31 $bs_file_path = "http://" . $bs_server . '/' . $bsReference;
33 <html>
34 <head>
35 </head>
36 <body>
37 <?php
39 // supported media types
40 switch ($mediaType)
42 // audio content
43 case 'audio/mpeg':
44 ?><embed width=620 height=100 src="<?php echo $bs_file_path; ?>" autostart=true></embed><?php
45 break;
46 // video content
47 case 'application/x-flash-video':
48 case 'video/mpeg':
49 ?><embed width=620 height=460 src="<?php echo $bs_file_path; ?>" autostart=true></embed><?php
50 break;
51 default:
52 // do nothing
55 </body>
56 </html>
57 <?php
58 } // end if (!empty($PMA_Config))
59 } // end if (isset($mediaType) && isset($bsReference))