Commit 48bab092 authored by zYne's avatar zYne

--no commit message

--no commit message
parent caf9e32c
......@@ -8,9 +8,14 @@
$indexes = explode('.', $v['index']);
$level = count($indexes);
$e = explode(' - ', $v['name']);
$file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'docs' . DIRECTORY_SEPARATOR . $v['name'] . '.php';
print '<div class=level' . $level . '><font class=level' . $level . '>&nbsp;'. $v['index'] . '. <a href=documentation2.php?chapter='
. urlencode($v['name']) . ">" . end($e) ."</a></font></div>";
. urlencode($v['name']) . ">" . end($e) ."</a></font>";
if ( ! file_exists($file)) {
//print "<font color='red'>[code]</font>";
}
print "</div>";
}
} else {
......
......@@ -76,24 +76,28 @@ class DocTool
return $ret;
}
public function renderBlock($name) {
public function renderBlock($name)
{
if(file_exists("docs/$name.php")) {
if (file_exists("docs/$name.php")) {
$c = file_get_contents("docs/$name.php");
if(substr($c, 0, 5) == "<?php") {
if (substr($c, 0, 5) == "<?php") {
include("docs/$name.php");
} elseif (strpos($c, '<br \>') !== false) {
print $c;
} else {
print $this->wiki->transform($c) . "<br><br>";
}
}
if(file_exists("codes/$name.php")) {
if (file_exists("codes/$name.php")) {
$c = file_get_contents("codes/$name.php");
$c = trim($c);
$this->renderCode($c);
}
}
public function renderCode($code = null) {
public function renderCode($code = null)
{
if( ! empty($code)) {
$this->highlighter->loadString($code);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment