mysql_login();
$_POST['dir'] = str_replace('/' , '' , $_POST['dir']);
echo '
';
echo gibKinder($_POST['dir'], $table_prefix);
echo '
';
function gibKinder($vater = 0, $table_prefix) {
global $sql;
$query = 'SELECT * FROM '.$table_prefix.'posts WHERE post_type = "page" AND post_parent = "'.(int)$vater.'" AND post_status NOT LIKE "auto-draft" ORDER BY ID DESC';
echo "";
$res = $sql->query($query);
while ($my = mysql_fetch_assoc($res)) {
$b = $sql->query_first('SELECT COUNT(ID) as B FROM '.$table_prefix.'posts WHERE post_parent = "'.$my['ID'].'" AND post_status NOT LIKE "auto-draft" AND post_type = "page"');
if ($b['B'] > 0) {
echo "- " . $my['post_title'] ." edit
";
} else {
echo "- " . $my['post_title'] . "
";
}
}
echo "
";
return $out;
}
?>