C:\xampp\htdocs\kptv2\phpMy8181Admin\webapp.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
 * generate an WebApp file for Prism / WebRunner
 *
 * @see http://wiki.mozilla.org/Prism
 * @package phpMyAdmin
 */

/**
 * @ignore
 */
define('PMA_MINIMUM_COMMON'true);
/**
 * Gets core libraries and defines some variables
 */
require './libraries/common.inc.php';
/**
 * ZIP file handler.
 */
require './libraries/zip.lib.php';

// ini file
$parameters = array(
    
'id'        => 'phpMyAdmin@' $_SERVER['HTTP_HOST'],
    
'uri'       => $GLOBALS['PMA_Config']->get('PmaAbsoluteUri'),
    
'status'    => 'yes',
    
'location'  => 'no',
    
'sidebar'   => 'no',
    
'navigation' => 'no',
    
'icon'      => 'phpMyAdmin',
);

// dom sript file
// none need yet

// icon
$icon 'favicon.ico';

// name
$name 'phpMyAdmin.webapp';

$ini_file "[Parameters]\n";
foreach (
$parameters as $key => $value) {
    
$ini_file .= $key '=' $value "\n";
}

$zip = new zipfile;
$zip->addFile($ini_file'webapp.ini');
$zip->addFile(file_get_contents($icon), 'phpMyAdmin.ico');

header('Content-Type: application/webapp');
header('Content-Disposition: attachment; filename="' $name '"');
echo 
$zip->file();
?>
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586