Bug: Live query chart always zero
[phpmyadmin/tyronm.git] / webapp.php
blob63ca1bf173ae1682526495fb3ca6d82eb6db1733
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 PMA_download_header($name, 'application/webapp', 0, false);
49 $zip = new zipfile;
50 $zip->setDoWrite();
51 $zip->addFile($ini_file, 'webapp.ini');
52 $zip->addFile(file_get_contents($icon), 'phpMyAdmin.ico');
53 $zip->file();