Rev Author Line No. Line
250 kaklik 1 <?php
2 /* $Id: application_octetstream__download.inc.php,v 2.0 2003/12/29 17:48:40 rabus Exp $ */
3 // vim: expandtab sw=4 ts=4 sts=4:
4  
5 function PMA_transformation_application_octetstream__download(&$buffer, $options = array(), $meta = '') {
6 global $row;
7  
8 if (isset($options[0]) && !empty($options[0])) {
9 $cn = $options[0]; // filename
10 } else {
11 if (isset($options[1]) && !empty($options[1]) && isset($row[$options[1]])) {
12 $cn = $row[$options[1]];
13 } else {
14 $cn = 'binary_file.dat';
15 }
16 }
17  
18 return
19 sprintf(
20 '<a href="transformation_wrapper.php%s&amp;ct=application/octet-stream&amp;cn=%s" title="%s">%s</a>',
21  
22 $options['wrapper_link'],
23 urlencode($cn),
24 htmlspecialchars($cn),
25 htmlspecialchars($cn)
26 );
27 }
28  
29 ?>