<?php
require_once('classes/body.class.php');
require_once('classes/db.class.php');
require_once('classes/system.class.php');
$title= new Body;
$title->SetTitle(homeurl.' - Основные настройки');
$title->GetHeader();

if ($b == false){
header('location:/');
die();
}
//echo'<div class="row"><div class="col-sm-6">';
echo'<div class="tile"><div class="t-header th-alt bg-teal"><div class="th-title"><i class="zmdi zmdi-widgets"></i><a href="/"style="text-decoration:none; color:white;"> Главная</a> :: <a href="/office"style="text-decoration:none; color:white;"> Кабинет</a> :: Основные настройки</div></div></div>';
echo'<div class="t-body"><div class="list-group lg-alt">';

echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?sneg"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['sneg']==1?'Выключить':'Включить').']</a> Снег на сайте</div></div></div>'; 

echo'<div class="tile"><div class="t-header th-alt bg-teal"><div class="th-title"><i class="zmdi zmdi-widgets"></i><a href="/"style="text-decoration:none; color:white;"> Главная</a> :: <a href="/office"style="text-decoration:none; color:white;"> Кабинет</a> :: Главная страница</div></div></div>';
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_news"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_news']==1?'Развернуть':'Свернуть').']</a> Вывод новостей</div></div></div>'; 
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_forum"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_forum']==1?'Развернуть':'Свернуть').']</a> Вывод тем форума</div></div></div>'; 
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_stat"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_stat']==1?'Развернуть':'Свернуть').']</a> Вывод статистики</div></div></div>'; 
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_lenta"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_lenta']==1?'Развернуть':'Свернуть').']</a> Вывод событий</div></div></div>'; 
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_down"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_down']==1?'Развернуть':'Свернуть').']</a> Вывод файлов</div></div></div>'; 
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_gazeta"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_gazet']==1?'Развернуть':'Свернуть').']</a> Вывод статей</div></div></div>'; 
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_codes"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_codes']==1?'Развернуть':'Свернуть').']</a> Вывод кодов</div></div></div>'; 
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_votes"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_otz']==1?'Развернуть':'Свернуть').']</a> Вывод отзывов</div></div></div>'; 
echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?view_shop"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['view_shop']==1?'Развернуть':'Свернуть').']</a> Вывод товаров</div></div></div>'; 










//echo '<div class="list-group-item media"><div class="media-body"><div class="list-group-item-heading"><a href="?panel"><i class="zmdi zmdi-format-list-bulleted zmdi-hc-fw"></i>  [' . ($b['panel']==1?'Выключить':'Включить').']</a> Верхнюю панель</div></div></div>'; 
         echo'</div></div>';
if (isset ($_GET['panel'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `panel`='" . ($b['panel'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['sneg'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `sneg`='" . ($b['sneg'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_news'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_news`='" . ($b['view_news'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_forum'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_forum`='" . ($b['view_forum'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_down'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_down`='" . ($b['view_down'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_codes'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_codes`='" . ($b['view_codes'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_votes'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_otz`='" . ($b['view_otz'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_stat'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_stat`='" . ($b['view_stat'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_lenta'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_lenta`='" . ($b['view_lenta'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_gazeta'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_gazet`='" . ($b['view_gazet'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
if (isset ($_GET['view_shop'])) { 
DB :: $dbs -> query ("UPDATE `blogger` SET `view_shop`='" . ($b['view_shop'] == 1 ? 0 : 1) . "' WHERE (`id`='" . $b['id'] . "')"); 
header ('location: ?'); 
}
$title->GetMenu();
$title->GetFooter();
?>
