Пример #1
0
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->  
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->  
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->  
<head>
    <?php 
echo head_contents();
?>
    <title><?php 
echo $title;
?>
</title>
    <meta name="description" content="<?php 
echo $description;
?>
"/>
    <link rel="canonical" href="<?php 
echo $canonical;
?>
" />
    <?php 
if (publisher()) {
    ?>
    <link href="<?php 
    echo publisher();
    ?>
" rel="publisher" /><?php 
}
?>
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,400,300italic,400italic" rel="stylesheet" type="text/css">
Пример #2
0
            $message['error'] .= '<li>CSRF Token not correct.</li>';
        }
        config('views.root', 'system/admin/views');
        render('add-page', array('head_contents' => head_contents('Add page - ' . blog_title(), blog_description(), site_url()), 'error' => '<ul>' . $message['error'] . '</ul>', 'postTitle' => $title, 'postUrl' => $url, 'postContent' => $content, 'bodyclass' => 'addpage', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; <a href="' . $post->url . '">' . $post->title . '</a> Add page'));
    }
});
get('/:static/:sub', function ($static, $sub) {
    $father_post = get_static_post($static);
    if (!$father_post) {
        not_found();
    }
    $post = get_static_sub_post($static, $sub);
    if (!$post) {
        not_found();
    }
    $post = $post[0];
    if (config("views.counter") == "true") {
        add_view($post->file);
    }
    if (!login()) {
        file_cache($_SERVER['REQUEST_URI']);
    }
    render('static', array('head_contents' => head_contents($post->title . ' - ' . blog_title(), $post->description, $post->url), 'bodyclass' => 'inpage', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; <a href="' . $father_post[0]->url . '">' . $father_post[0]->title . '</a> &#187; ' . $post->title, 'p' => $post, 'type' => 'staticpage'));
});
// If we get here, it means that
// nothing has been matched above
get('.*', function () {
    not_found();
});
// Serve the blog
dispatch();