Beispiel #1
0
 public function hook($params = array())
 {
     $CI =& get_instance();
     $output = $CI->output->get_output();
     if (!isset($params['header']) || $params['header'] === true) {
         if (isset($params['theme'])) {
             luminous::set('theme', $params['theme']);
         }
         if (!function_exists('base_url')) {
             $CI->load->helper('url');
         }
         luminous::set('relative-root', base_url() . 'application/hooks/ci-syntax-highlight/luminous/');
         $head = luminous::head_html();
         // insert the stylesheets
         $output = preg_replace('%</head%i', "{$head}\n" . '$0', $output, 1);
     }
     $exps = array("/\n        \\[(code)(.*?)\\][ \t]*(?:[\r\n]|\r\n)?\n        (.*?)\n        \\s*\n        \\[\\/code\\]\n      /xs", "/\n        <(pre|code)(.*?)>[ \t]*(?:[\r\n]|\r\n)?\n        (.*?)\n        \\s*\n        <\\/\\1>\n      /xs");
     foreach ($exps as $e) {
         $output = preg_replace_callback($e, array($this, 'hook_cb'), $output);
     }
     echo $output;
 }
    /**
     *
     */
    public static function printHtmlHeader()
    {
        \luminous::set(array('relative_root' => '../vendor/luminous/luminous'));
        echo '<html>
				<head>
					<link href="../vendor/twbs/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
					<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
					<script src="../vendor/twbs/bootstrap/dist/js/bootstrap.min.js"></script>';
        echo \luminous::head_html();
        // outputs CSS includes to highlight xml, intended to go in <head>
        echo '	</head>
				<body role="document">
				 <div class="container theme-showcase" role="main">
					<div class="jumbotron">
						<h1>Demo Tessera Sanitaria.</h1>
						<p>Questo &egrave; un semplice demo che mostra l\'utilizzo del Package Padosoft TesseraSanitaria.<br />
							Il package permette la creazione di file XML delle prestazioni mediche per il servizio nazionale sanit&agrave;
							secondo il formato XML della tessera sanitaria definito nel DM 31/07/2015.<br />
							Per maggiori info si veda il <a href="http://sistemats1.sanita.finanze.it/wps/portal/" target="_blank">Portale della Tessera Sanitaria</a>
						</p>
					 </div>
				';
    }
Beispiel #3
0
function net2ftp_module_printCss()
{
    // --------------
    // This function prints CSS code and includes
    // --------------
    global $net2ftp_settings, $net2ftp_globals;
    // Include
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . $net2ftp_globals["application_rootdir_url"] . "/skins/" . $net2ftp_globals["skin"] . "/css/main.css.php?ltr=" . __("ltr") . "&amp;image_url=" . urlEncode2($net2ftp_globals["image_url"]) . "\" />\n";
    // CSS for Luminous syntax highlighter
    $filename_extension = get_filename_extension($net2ftp_globals["entry"]);
    if (getFileType($net2ftp_globals["entry"]) == "IMAGE") {
        $filetype = "image";
    } elseif ($filename_extension == "swf") {
        $filetype = "flash";
    } else {
        $filetype = "text";
    }
    if ($filetype == "text") {
        luminous::set("cache", FALSE);
        luminous::set("format", "html");
        luminous::set("line-numbers", TRUE);
        luminous::set("relative-root", $net2ftp_globals["application_rootdir_url"] . "/plugins/luminous/");
        //		luminous::set("theme", "luminous_dark");
        echo luminous::head_html();
    }
}