Polish update
[phpmyadmin/crack.git] / webapp.php
blob681e2a82e777b374b2ef67a61c3d1fb5911f1e41
1 <?php
2 /**
3 * generate an WebApp file for Prism / WebRunner
5 * @see http://wiki.mozilla.org/Prism
6 */
8 /**
11 define('PMA_MINIMUM_COMMON', true);
12 require_once './libraries/common.inc.php';
13 require_once './libraries/zip.lib.php';
15 // ini file
16 $parameters = array(
17 'id' => 'phpMyAdmin@' . $_SERVER['HTTP_HOST'],
18 'uri' => $_SESSION['PMA_Config']->get('PmaAbsoluteUri'),
19 'status' => 'yes',
20 'location' => 'no',
21 'sidebar' => 'no',
22 'navigation' => 'no',
23 'icon' => 'phpMyAdmin',
26 // dom sript file
27 // none need yet
29 // icon
30 $icon = 'favicon.ico';
32 // name
33 $name = 'phpMyAdmin.webapp';
35 $ini_file = "[Parameters]\n";
36 foreach ($parameters as $key => $value) {
37 $ini_file .= $key . '=' . $value . "\n";
40 $zip = new zipfile;
41 $zip->addFile($ini_file, 'webapp.ini');
42 $zip->addFile(file_get_contents($icon), 'phpMyAdmin.ico');
44 header('Content-Type: application/webapp');
45 header('Content-Disposition: attachment; filename="' . $name . '"');
46 echo $zip->file();