*/
class BlogListGenerator {
function listBlog($directory, $blogname, $blogmaintitle) {
$blog = file_get_contents($directory . $blogname);
$blog = $blog . "\n";
if (substr($blog, 0, 6) == "%TITLE") {
$blog = substr($blog, 8, strpos($blog, "\n") - 8);
if ($blog == "main") {
echo "$blogmaintitle";
} else {
$link = "./?blog=" . substr($blogname, 0, -3);
echo "$blog";
}
}
}
function getName($file){
$blog = file_get_contents($file);
$blog = $blog . "\n";
if(substr($blog, 0, 6) == "%TITLE"){
$blog = substr($blog, 8, strpos($blog, "\n") - 8);
return $blog;
}
}
}