Subversion Repositories ALCASAR

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
2775 rexy 1
<?php
2
/**
3
 * start page for webaccess
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PSI_Web
9
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
10
 * @copyright 2009 phpSysInfo
11
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
12
 * @version   SVN: $Id: class.WebpageXSLT.inc.php 569 2012-04-16 06:08:18Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * generate a static webpage with xslt trasformation of the xml
17
 *
18
 * @category  PHP
19
 * @package   PSI_Web
20
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
21
 * @copyright 2009 phpSysInfo
22
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
23
 * @version   Release: 3.0
24
 * @link      http://phpsysinfo.sourceforge.net
25
 */
26
class WebpageXSLT extends WebpageXML implements PSI_Interface_Output
27
{
28
    /**
29
     * call the parent constructor
30
     */
31
    public function __construct()
32
    {
33
        parent::__construct();
34
    }
35
 
36
    /**
37
     * generate the static page
38
     *
39
     * @return void
40
     */
41
    public function run()
42
    {
43
        CommonFunctions::checkForExtensions(array('xsl'));
44
        $xmlfile = $this->getXMLString();
45
        $xslfile = "phpsysinfo.xslt";
46
        $domxml = new DOMDocument();
47
        $domxml->loadXML($xmlfile);
48
        $domxsl = new DOMDocument();
49
        $domxsl->load($xslfile);
50
        $xsltproc = new XSLTProcessor;
51
        $xsltproc->importStyleSheet($domxsl);
52
        header("Cache-Control: no-cache, must-revalidate\n");
53
        echo $xsltproc->transformToXML($domxml);
54
    }
55
}