$db = new PDO('mysql:host=localhost;dbname=stmpl', 'ununik', 'Unununium111'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } $title = null; function __autoload($name) { include "methods/{$name}.class.php"; } include_once "methods/functions.php"; $data = new Page(); if (isset($_GET['page']) && $_GET['page']) { $getPage = $_GET['page']; } else { $getPage = "home"; } $data->setNavigation(include_once "controllers/admin/navigation.php"); if ($getPage == "home") { $data->setHeader("<div id='header_home'><div><h1>Biatlon v srdci České Kanady</h1></div></div><div id='headerbox'>\n <h1>Klub biatlonu<br>Staré Město pod Landštejnem</h1>\n <h2>klub ze srdce České Kanady</h2>\n <div id='photoBoxAll'></div>\n </div>"); } else { $data->setHeader("<div id='header_all'>Staré Město pod Landštejnem</div>"); } if (!isset($_SESSION['StMpL']) || $_SESSION['StMpL'] !== md5('StMpL2015')) { $data->setContent(include_once "controllers/admin/login.php"); } else { if (!file_exists("controllers/admin/{$getPage}.php")) { $data->setContent(include_once "controllers/noPage.php"); } else { $data->setContent(include_once "controllers/admin/{$getPage}.php"); } } $data->setTitle($title);
<?php function __autoload($name) { include_once "modules/classes/{$name}.class.php"; } session_start(); $profil = new Profil(); $page = new Page(); if (!isset($_SESSION['kvh_login']) || $_SESSION['kvh_login'] == "" || $_SESSION['kvh_login'] == 0 || !$profil->checkIDLogin($_SESSION['kvh_login'])) { $page->setTitle("KVH Ústí nad Labem"); $page->addToDrobeckovaNavigace('<a href="index.php">kvhusti.cz</a>'); $page->setNavigation(include_once 'views/navigation.php'); $page->setContent(include_once "controllers/admin/badName.php"); $page->setAdminLog(include 'controllers/login/form.php'); print (include_once 'views/page.php'); return; } $page->addScript('<script src="js/ajax.js"></script>'); $page->addScript('<script src="js/admin.js"></script>'); $page->addScript('<script src="js/jquery-ui-1.8.18.custom.min.js"></script>'); if (isset($_GET['page'])) { $getPage = $_GET['page']; } else { $getPage = "home"; } $page->setTitle("KVH Ústí nad Labem"); $page->addToDrobeckovaNavigace('<a href="admin.php">kvhusti.cz</a>'); $page->setNavigation(include_once 'views/admin/navigation.php'); $page->setContent(include_once "controllers/admin/{$getPage}.php"); if ($page->getContent() == "") {