Translation update done using Pootle.
[phpmyadmin.git] / webapp.php
blob8affd5c76a28befa51a77d036e6442adacc31e43
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();