Translated using Weblate (Norwegian Bokmål)
[phpmyadmin.git] / webapp.php
blob4aa8005309d1fe4ceab35054fd97192642cca480
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * generate an WebApp file for Prism / WebRunner
6 * @package PhpMyAdmin
7 * @see http://wiki.mozilla.org/Prism
8 */
10 /**
11 * @ignore
13 define('PMA_MINIMUM_COMMON', true);
14 /**
15 * Gets core libraries and defines some variables
17 require './libraries/common.inc.php';
18 /**
19 * ZIP file handler.
21 require './libraries/zip.lib.php';
23 // ini file
24 $parameters = array(
25 'id' => 'phpMyAdmin@' . $_SERVER['HTTP_HOST'],
26 'uri' => $GLOBALS['PMA_Config']->get('PmaAbsoluteUri'),
27 'status' => 'yes',
28 'location' => 'no',
29 'sidebar' => 'no',
30 'navigation' => 'no',
31 'icon' => 'phpMyAdmin',
34 // dom script file
35 // none need yet
37 // icon
38 $icon = 'favicon.ico';
40 // name
41 $name = 'phpMyAdmin.webapp';
43 $ini_file = "[Parameters]\n";
44 foreach ($parameters as $key => $value) {
45 $ini_file .= $key . '=' . $value . "\n";
48 PMA_downloadHeader($name, 'application/webapp', 0, false);
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();