3 * generate an WebApp file for Prism / WebRunner
5 * @see http://wiki.mozilla.org/Prism
12 define('PMA_MINIMUM_COMMON', true);
14 * Gets core libraries and defines some variables
16 require './libraries/common.inc.php';
20 require './libraries/zip.lib.php';
24 'id' => 'phpMyAdmin@' . $_SERVER['HTTP_HOST'],
25 'uri' => $GLOBALS['PMA_Config']->get('PmaAbsoluteUri'),
30 'icon' => 'phpMyAdmin',
37 $icon = 'favicon.ico';
40 $name = 'phpMyAdmin.webapp';
42 $ini_file = "[Parameters]\n";
43 foreach ($parameters as $key => $value) {
44 $ini_file .= $key . '=' . $value . "\n";
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 . '"');