<?PHP require "classPosts.php" ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Блог</title>
<meta name="author" content="Codrops" />
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/component.css" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script src="js/bootstrap.min.js"></script>
<script src="js/modernizr.custom.js"></script>
<script src="js/jquery-ui-1.10.4.custom.js"></script>
<script scr="js/jquery-2.1.0.min.js"></script>
</head>
<body>
<div id="menu-style" >
<nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
<h3>
<label for="login">Логин</label>
<input name="login" type="text" />
<label for="password">Пароль</label>
<input name="password" type="password" />
<form action="register.php">
<button type="submit" class="btn">Регистрация</button></form> <button class="btn">Войти</button>
</h3>
<a href="index.php">Главная страница</a>
<a href="#">Настройки</a>
</nav>
</div>
<div id="mainstyle">
<div id="header-style">
<input id="showLeft" type = "image" src = "img/menu.png" name = "open" value = "open" alt="Меню" />
<form action="new-topic.php">
<input id="b-newtopic" type = "image" src = "img/new-topic.png" alt="Новая статья" /></form>
</div> <!--header-style -->
<div id="content-block">
<?PHP if (isset($posts) && $posts->setPosts()) { $posts->add_query_Topic() ;
$post = $posts->getPosts() ;
}
?>
<?=$data['title']?>
<?=$data['topic']?>
<span class="tooltip" data-title="Добавить статью">123457</span>
<div id="lower-info"></div>
</div>
<script src="js/classie.js"></script>
<script>
var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
menuRight = document.getElementById( 'cbp-spmenu-s2' ),
menuTop = document.getElementById( 'cbp-spmenu-s3' ),
menuBottom = document.getElementById( 'cbp-spmenu-s4' ),
showLeft = document.getElementById( 'showLeft' ),
showRight = document.getElementById( 'showRight' ),
showTop = document.getElementById( 'showTop' ),
showBottom = document.getElementById( 'showBottom' ),
showLeftPush = document.getElementById( 'showLeftPush' ),
showRightPush = document.getElementById( 'showRightPush' ),
body = document.body;
showLeft.onclick = function() {
classie.toggle( this, 'active' );
classie.toggle( menuLeft, 'cbp-spmenu-open' );
disableOther( 'showLeft' );
};
showRight.onclick = function() {
classie.toggle( this, 'active' );
classie.toggle( menuRight, 'cbp-spmenu-open' );
disableOther( 'showRight' );
};
showTop.onclick = function() {
classie.toggle( this, 'active' );
classie.toggle( menuTop, 'cbp-spmenu-open' );
disableOther( 'showTop' );
};
showBottom.onclick = function() {
classie.toggle( this, 'active' );
classie.toggle( menuBottom, 'cbp-spmenu-open' );
disableOther( 'showBottom' );
};
showLeftPush.onclick = function() {
classie.toggle( this, 'active' );
classie.toggle( body, 'cbp-spmenu-push-toright' );
classie.toggle( menuLeft, 'cbp-spmenu-open' );
disableOther( 'showLeftPush' );
};
showRightPush.onclick = function() {
classie.toggle( this, 'active' );
classie.toggle( body, 'cbp-spmenu-push-toleft' );
classie.toggle( menuRight, 'cbp-spmenu-open' );
disableOther( 'showRightPush' );
};
function disableOther( button ) {
if( button !== 'showLeft' ) {
classie.toggle( showLeft, 'disabled' );
}
if( button !== 'showRight' ) {
classie.toggle( showRight, 'disabled' );
}
if( button !== 'showTop' ) {
classie.toggle( showTop, 'disabled' );
}
if( button !== 'showBottom' ) {
classie.toggle( showBottom, 'disabled' );
}
if( button !== 'showLeftPush' ) {
classie.toggle( showLeftPush, 'disabled' );
}
if( button !== 'showRightPush' ) {
classie.toggle( showRightPush, 'disabled' );
}
}
</script>
</body>
</html>