typo
[phpmyadmin/madhuracj.git] / webapp.php
blobdb65ad87f35cd27f82eb40f18abb999ac8dbc9cc
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_once './libraries/common.inc.php';
17 /**
18 * ZIP file handler.
20 require_once './libraries/zip.lib.php';
22 // ini file
23 $parameters = array(
24 'id' => 'phpMyAdmin@' . $_SERVER['HTTP_HOST'],
25 'uri' => $_SESSION['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 $zip = new zipfile;
48 $zip->addFile($ini_file, 'webapp.ini');
49 $zip->addFile(file_get_contents($icon), 'phpMyAdmin.ico');
51 header('Content-Type: application/webapp');
52 header('Content-Disposition: attachment; filename="' . $name . '"');
53 echo $zip->file();