Location: PHPKode > projects > Lithron > lithron-1.0.2/render.php
<?php header("Content-Type: text/html; charset=utf-8"); ?> 
        <link rel="stylesheet" type="text/css" href="style.css" media="all" />
        <h1><a href="index.php">lithron test box</a></h1>


        // check file
        $file = realpath($_REQUEST['file']);
        if (!is_file($file) || !strstr($file, dirname(__FILE__)."/examples")){
            exit("Requested $file is not in example directory!");

        // using php as a template engine ;) Greetings to Jens
        $xml = ob_get_clean();

        // invoke lithron rendering process
        $L = new Lithron();

        #$L->setDefaultEncoding("iso8859-1"); // if you're using PDFlib Lite, you need to set this to something different than "unicode"


        foreach ($L->Files as $file)
            // download links
            echo '<h2>Download</h2>';
            echo '<div id="DownloadPanel">';
            echo '<a target="_blank" href="'.$file->FilePath.'">'.$file->propName().'</a>';

            // preview
            echo "<h2>Preview</h2>";
            echo '<div id="PreviewPanel"><iframe src="'.$file->FilePath.'" width="100%" height="600"></iframe></div>';

        // log output
        echo "<h2>Log</h2>";
        echo "<div id='LogPanel'>".Lithron::dumpLog()."</div>";

        // source output
        echo "<h2>Source</h2>";
        echo "<div id='SourcePanel'><pre>";
        $trans = array("<" => "&lt;", ">" => "&gt;");
        echo wordwrap(strtr($L->CleanedXML, $trans),120);
        echo "</pre></div>";

        // credits
        echo "<br/><br/><small>Powered by <a href='http://lithron.de'>lithron</a> from <a href='http://diemeisterei.de'>diemeisterei, Stuttgart</a></small>";

Return current item: Lithron