Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dev:grapher-php [2020/10/11 06:54] – bab | dev:grapher-php [2020/11/01 15:59] (current) – bab | ||
---|---|---|---|
Line 256: | Line 256: | ||
fwrite($fh, " | fwrite($fh, " | ||
+ | fwrite($fh, " | ||
fwrite($fh, " | fwrite($fh, " | ||
node [shape = \" | node [shape = \" | ||
Line 262: | Line 263: | ||
subgraph corporations { | subgraph corporations { | ||
- | \" | + | \" |
- | \" | + | \" |
- | \" | + | |
- | \" | + | |
- | \" | + | |
\" | \" | ||
\" | \" | ||
Line 273: | Line 271: | ||
subgraph leaks { | subgraph leaks { | ||
- | \" | ||
- | \" | ||
- | \" | ||
\" | \" | ||
\" | \" | ||
Line 285: | Line 280: | ||
\" | \" | ||
\" | \" | ||
- | \" | + | \" |
} | } | ||
Line 424: | Line 419: | ||
$pages =& $data[' | $pages =& $data[' | ||
$media =& $data[' | $media =& $data[' | ||
- | $root_name = $data[' | + | $root_name = array_values($pages)[0][" |
$output = '{ | $output = '{ | ||
" | " | ||
Line 438: | Line 434: | ||
$output .= '" | $output .= '" | ||
$output .= '" | $output .= '" | ||
- | $output .= '" | + | $output .= '" |
- | $output .= '" | + | |
+ | { | ||
+ | $path = explode (":", | ||
+ | $file = count($path ); | ||
+ | $folder=""; | ||
+ | for($n=0 ; $n < $file-1 ; $n++) | ||
+ | { | ||
+ | $folder = $folder . $path[$n] . "/"; | ||
+ | } | ||
+ | $output .= ',"img" : "'. DOKU_INC. " | ||
+ | } | ||
// $output .= '" | // $output .= '" | ||
// $output .= '" | // $output .= '" | ||
$output .= " | $output .= " | ||
- | if ($i < count($pages)) $output .= ','; | + | if ($i <= count($pages)-1) $output .= ','; |
| | ||
} | } | ||
Line 458: | Line 464: | ||
$output .= '{ | $output .= '{ | ||
- | "from": "' | + | "source": "' |
- | "to": "' | + | "target": "' |
- | " | + | " |
}'; | }'; | ||
$cnt++; | $cnt++; | ||
Line 466: | Line 472: | ||
} | } | ||
+ | |||
| | ||
$output .= " ] }"; | $output .= " ] }"; |