Made suggested change to tbl_select.php and tbl_zoom_select.php
[phpmyadmin/ammaryasirr.git] / webapp.php
blobcdc0a87b2bc1c6c889cbb029ca52e78ea8db825d
1 <?php
2 /**
3 * generate an WebApp file for Prism / WebRunner
5 * @see http://wiki.mozilla.org/Prism
6 * @package phpMyAdmin
7 */
9 /**
10 * @ignore
12 define('PMA_MINIMUM_COMMON', true);
13 /**
14 * Gets core libraries and defines some variables
16 require './libraries/common.inc.php';
17 /**
18 * ZIP file handler.
20 require './libraries/zip.lib.php';
22 // ini file
23 $parameters = array(
24 'id' => 'phpMyAdmin@' . $_SERVER['HTTP_HOST'],
25 'uri' => $GLOBALS['PMA_Config']->get('PmaAbsoluteUri'),
26 'status' => 'yes',
27 'location' => 'no',
28 'sidebar' => 'no',
29 'navigation' => 'no',
30 'icon' => 'phpMyAdmin',
33 // dom sript file
34 // none need yet
36 // icon
37 $icon = 'favicon.ico';
39 // name
40 $name = 'phpMyAdmin.webapp';
42 $ini_file = "[Parameters]\n";
43 foreach ($parameters as $key => $value) {
44 $ini_file .= $key . '=' . $value . "\n";
47 header('Content-Type: application/webapp');
48 header('Content-Disposition: attachment; filename="' . $name . '"');
50 $zip = new zipfile;
51 $zip->setDoWrite();
52 $zip->addFile($ini_file, 'webapp.ini');
53 $zip->addFile(file_get_contents($icon), 'phpMyAdmin.ico');
54 $zip->file();