public function test($event, &$target, &$eventData) { log('Triggering listener of "' . $event . '" Event in listener ' . __METHOD__); log('<pre>' . 'Eventdata: ' . lnbr() . print_r($eventData, true) . lnbr() . __CLASS__ . ':' . lnbr() . $this->refelection . lnbr() . '</pre>' . lnbr() . highlight_num(__FILE__) . lnbr()); }
<? include_once("builder.cfg"); function highlight_num($file) { highlight_file($file); //overflow: auto; } ?> <div id="code" style="min-width:440px; width: 440px; height: 250px; overflow: scroll; background: white; padding: 2px;"> <? highlight_num('printCodeGuest.php'); ?> </div> <script> var testo=document.getElementById('code').innerHTML; document.getElementById('code').innerHTML=""; <?php echo "var app='<?php'; "; echo "app+=' include (\"" . $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . "/builder.cfg\");'; "; echo "app+=' include (\"\$absPath/HandleDB.php\");'; "; echo "app+=' include (\"\$absPath/conf.php\");'; "; echo "app=app + ' ?>'; "; ?>
body {margin: 0px; margin-left: 5px;} td {vertical-align: top;} code {white-space: nowrap;} </style> </head> <body> <? $ar = array('config.php', 'index.php', 'functions.php'); //array with files to denie $file = $_SERVER['CONTEXT_DOCUMENT_ROOT'] . $_GET['file']; // iniziate the variable if (file_Exists($file)) { if (!in_array($file, $ar)) { // check if it is prohibited highlight_num($file); //highlight file } else { // prohibited file echo "You do not have permision to see the " . $file . " file."; } } else { // file doesnt exist echo "That file does not exist."; } function highlight_num($file) { $lines = implode(range(1, count(file($file))), '<br />'); $content = highlight_file($file, true); echo "<table><tr><td class=\"num\">\n$lines\n</td><td>\n$content\n</td></tr></table>"; } ?>