Translated using Weblate (Slovak)
[phpmyadmin.git] / webapp.php
blob1c1246e7eca9d4dea9d91684bfaff6019093d2a6
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 */
9 use PMA\libraries\ZipFile;
11 /**
12 * @ignore
14 define('PMA_MINIMUM_COMMON', true);
15 /**
16 * Gets core libraries and defines some variables
18 require './libraries/common.inc.php';
20 // ini file
21 $parameters = array(
22 'id' => 'phpMyAdmin@' . $_SERVER['HTTP_HOST'],
23 'uri' => $GLOBALS['PMA_Config']->get('PmaAbsoluteUri'),
24 'status' => 'yes',
25 'location' => 'no',
26 'sidebar' => 'no',
27 'navigation' => 'no',
28 'icon' => 'phpMyAdmin',
31 // dom script file
32 // none need yet
34 // icon
35 $icon = 'favicon.ico';
37 // name
38 $name = 'phpMyAdmin.webapp';
40 $ini_file = "[Parameters]\n";
41 foreach ($parameters as $key => $value) {
42 $ini_file .= $key . '=' . $value . "\n";
45 PMA_downloadHeader($name, 'application/webapp', 0, false);
47 $zip = new ZipFile;
48 $zip->setDoWrite();
49 $zip->addFile($ini_file, 'webapp.ini');
50 $zip->addFile(file_get_contents($icon), 'phpMyAdmin.ico');
51 $zip->file();