Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * Generate phpinfo() style PEAR information,
4
 * embedded into user-defined html template
5
 *
6
 * PHP versions 4 and 5
7
 *
8
 * @category PEAR
9
 * @package  PEAR_Info
10
 * @author   Laurent Laville <pear@laurent-laville.org>
11
 * @license  http://www.php.net/license/3_01.txt  PHP License 3.01
12
 * @version  CVS: $Id: pear_info3.php,v 1.2 2007/12/15 16:27:23 farell Exp $
13
 * @link     http://pear.php.net/package/PEAR_Info
14
 * @ignore
15
 */
16
 
17
require_once 'PEAR/Info.php';
18
 
19
/**
20
 * @ignore
21
 */
22
class PEAR_Info3 extends PEAR_Info
23
{
24
    function PEAR_Info3($pear_dir = '', $user_file = '', $system_file = '')
25
    {
26
        $this->__construct($pear_dir, $user_file, $system_file);
27
    }
28
 
29
    function toHtml()
30
    {
31
        $styles = basename($this->getStyleSheet(false));
32
 
33
        $body = $this->info;
34
 
35
        $html = <<<HTML
36
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
37
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
38
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
39
<head>
40
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
41
<meta name="author" content="Laurent Laville" />
42
<title>My PEAR_Info()</title>
43
<link rel="stylesheet" type="text/css" href="$styles" />
44
</head>
45
<body>
46
 
47
<div id="header">
48
<h1>Laurent-Laville.org</h1>
49
</div>
50
 
51
<div id="footer">
52
</div>
53
 
54
<div id="contents">
55
$body
56
</div>
57
 
58
</body>
59
</html>
60
HTML;
61
        return $html;
62
    }
63
}
64
 
65
// Create PEAR_Info object
66
$info = new PEAR_Info3();
67
 
68
// set your own styles, rather than use the default stylesheet
69
$info->setStyleSheet(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pearinfo3.css');
70
 
71
// Display PEAR_Info output
72
$info->display();
73
?>