|
|
Doctrine - PHP Data Persistence and ORM Tool
|
$titles) {
print $i.". ".$title." \n";
$i2 = 1;
foreach($titles as $k => $t) {
$e = "$i.".$i2."";
if(is_array($t)) {
print "".$e." ".$k." \n";
$i3 = 1;
foreach($t as $k2 => $v2) {
$str = "";
if( ! file_exists("docs/$title - $k - $v2.php")) {
$missing[0]++;
$str .= " [ doc ] ";
touch("docs/$title - $k - $v2.php");
}
if( ! file_exists("codes/$title - $k - $v2.php")) {
$missing[1]++;
$str .= " [ code ] ";
touch("codes/$title - $k - $v2.php");
}
$e = implode(".",array($i,$i2,$i3));
print "".$e." ".$v2."$str \n";
$i3++;
}
} else {
$str = "";
if( ! file_exists("docs/$title - $t.php")) {
$missing[0]++;
$str .= " [ doc ] ";
touch("docs/$title - $t.php");
}
if( ! file_exists("codes/$title - $t.php")) {
$missing[1]++;
$str .= " [ code ] ";
touch("codes/$title - $t.php");
}
print "".$e." ".$t."$str \n";
}
$i2++;
}
$i++;
}
} else {
$i = 1;
$ex = explode(".",$_REQUEST["index"]);
$paths = array2path($menu);
if( ! isset($paths[$ex[0]]))
exit;
$break = false;
$tmp = $paths;
foreach($tmp as $path => $title) {
$e = explode(".", $path);
if(count($e) > 2) {
unset($tmp[$path]);
}
}
$prev = 1;
foreach($tmp as $path => $title) {
if($break)
break;
if($path == $_REQUEST["index"]) {
$break = true;
} else {
$prev = $path;
}
}
$index = $_REQUEST['index'];
print "";
print " | ";
print "".$paths[$ex[0]]." | ";
print "Prev | ";
print "Next | ";
print " | ";
print " ";
$tmp = $ex;
if(count($tmp) > 2) {
//array_pop($tmp);
}
foreach($tmp as $k => $v) {
$numbers[] = $v;
$curr = implode(".",$numbers);
$stack[] = $paths[$curr];
}
if(isset($ex[1])) {
$name = implode(" - ", $stack);
print "".$paths[$curr]." ";
$n = $numbers;
$o = $paths[$n[0]];
$numpath = implode(".", array($n[0], $n[1]));
$o2 = $paths[$numpath];
$value = $menu[$o];
if( ! is_array($value))
exit;
if(in_array($o2, $value)) {
render_block($name);
} else {
$value = $menu[$o][$o2];
if(is_array($value)) {
foreach($value as $k => $title) {
$numpath2 = $numpath . '.' . ($k + 1);
print " ".$title." ";
$s = $name." - ".$title;
render_block($s);
}
}
}
} else {
//if( ! isset($menu[$ex[0]]))
// exit;
$tmp = $paths[$ex[0]];
$i = 1;
foreach($menu[$tmp] as $title => $value) {
$n = $ex[0].".".$i;
if(is_scalar($value)) {
print "".$n.". ".$value." \n";
} else {
print "".$n.". ".$title." \n";
}
$i++;
}
}
}
?>
-- index \n";
foreach($menu as $title => $titles) {
print "".$i.". ".$title." \n";
$i++;
}
?>
|
|
$titles) {
if($i == $ex[0]) {
print $i.". ".$title."
\n";
$i2 = 1;
foreach($titles as $k => $t) {
$e = "$i.".$i2;
if(is_array($t)) {
$tmp = "$title - $k";
if( ! isset($ex[1]) || $i2 != $ex[1]) {
$i2++;
continue;
}
print $e." ".$k."
\n";
foreach($t as $k2 => $t2) {
if( ! isset($ex[1]) || $i2 != $ex[1])
break;
$e = "$i.".$i2.".".($k2+1);
render($tmp,$t2,$e);
}
} else {
if( ! isset($ex[1])) {
render($title,$t,$e);
}
}
$i2++;
}
}
$i++;
}
*/
?>
|
|
|
|