if (!isset($_SESSION['admin_user'])) { header('Location: index.php'); } spl_autoload_register(function ($class) { include '../classes/' . $class . '.class.php'; }); $html = new Html(); $html->styles = array('/admin/css/styles.css'); $db = new DB(DB::host, DB::username, DB::passwd, DB::db); $title = 'Article manager'; $description = 'Create, change, delete existing articles.'; $menuItems = array('add_article.php' => 'Add article'); ?> <!DOCTYPE html> <html> <head> <?php $html->doHTMLHead($title, $description); ?> </head> <body> <div id="wrapper"> <?php $html->doAdminPanelHeader('Articles manager'); $html->doAdminMenu($menuItems); $html->showArticlesInPanel($db->getArticlesList()); ?> </div> </body> </html>
</head> <body> <!-- Headline --> <div id="headline"> <div class="container"> <span class="logo"><a href="http://try2seo.com">try2seo.com</a></span> <span class="slogan">Поисковая оптимизация сайтов.</span> </div> </div> <!-- Table of contents --> <div class="container"> <div id="table-of-contents"> <h3>Оглавление</h3> <?php $html->showArticles($db->getArticlesList()); ?> </div> <!-- Article --> <div id="article"> <h1><?php echo $article_info[0]['title']; ?> </h1> <?php if (!isset($article_info[0]['summary'])) { ?> <!-- No Summary --> <?php