2 /* vim: set expandtab sw=4 ts=4 sts=4: */
5 * @package BLOBStreaming
11 require_once './libraries/common.inc.php';
14 * @var string contains media type of BLOB reference
16 $mediaType = isset($_REQUEST['media_type']) ?
$_REQUEST['media_type'] : NULL;
19 * @var string indicates whether media type is of custom type
21 $customType = isset($_REQUEST['custom_type']) ?
$_REQUEST['custom_type'] : false;
24 * @var string contains BLOB reference
26 $bsReference = isset($_REQUEST['bs_reference']) ?
$_REQUEST['bs_reference'] : NULL;
28 // if media type and BS reference are specified
29 if (isset($mediaType) && isset($bsReference))
31 // load PMA configuration
32 $PMA_Config = $GLOBALS['PMA_Config'];
34 // if PMA configuration exists
35 if (!empty($PMA_Config))
37 // retrieve BS server variables from PMA configuration
38 $bs_server = $PMA_Config->get('BLOBSTREAMING_SERVER');
39 if (empty($bs_server)) die('No blob streaming server configured!');
41 $bs_file_path = "http://" . $bs_server . '/' . $bsReference;
43 if (isset($customType) && $customType)
45 $bs_file_path = 'bs_disp_as_mime_type.php' . PMA_generate_common_url(array('reference' => $bsReference, 'c_type' => $mediaType));
54 // supported media types
59 ?
><embed width
=620 height
=100 src
="<?php echo htmlspecialchars($bs_file_path); ?>" autostart
=true></embed
><?php
62 case 'application/x-flash-video':
64 ?
><embed width
=620 height
=460 src
="<?php echo htmlspecialchars($bs_file_path); ?>" autostart
=true></embed
><?php
73 } // end if (!empty($PMA_Config))
74 } // end if (isset($mediaType) && isset($bsReference))