bug #2780722 [import] Incorrect maximum file size
[phpmyadmin/crack.git] / bs_play_media.php
blob6421f76d8465f50d754086dcb821e4bec4e1139e
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 indicates whether media type is of custom type
18 $customType = isset($_REQUEST['custom_type']) ? $_REQUEST['custom_type'] : false;
21 * @var string contains BLOB reference
23 $bsReference = isset($_REQUEST['bs_reference']) ? $_REQUEST['bs_reference'] : NULL;
25 // if media type and BS reference are specified
26 if (isset($mediaType) && isset($bsReference))
28 // load PMA configuration
29 $PMA_Config = $_SESSION['PMA_Config'];
31 // if PMA configuration exists
32 if (!empty($PMA_Config))
34 // retrieve BS server variables from PMA configuration
35 $bs_server = $PMA_Config->get('BLOBSTREAMING_SERVER');
36 if (empty($bs_server)) die('No blob streaming server configured!');
38 $bs_file_path = "http://" . $bs_server . '/' . $bsReference;
40 if (isset($customType) && $customType)
42 $bs_file_path = 'bs_disp_as_mime_type.php' . PMA_generate_common_url(array('reference' => $bsReference, 'c_type' => $mediaType));
45 <html>
46 <head>
47 </head>
48 <body>
49 <?php
51 // supported media types
52 switch ($mediaType)
54 // audio content
55 case 'audio/mpeg':
56 ?><embed width=620 height=100 src="<?php echo htmlspecialchars($bs_file_path); ?>" autostart=true></embed><?php
57 break;
58 // video content
59 case 'application/x-flash-video':
60 case 'video/mpeg':
61 ?><embed width=620 height=460 src="<?php echo htmlspecialchars($bs_file_path); ?>" autostart=true></embed><?php
62 break;
63 default:
64 // do nothing
67 </body>
68 </html>
69 <?php
70 } // end if (!empty($PMA_Config))
71 } // end if (isset($mediaType) && isset($bsReference))