Файл: vk/admin.php
Строк: 154
<?php
session_start();
$adm_login = "admin";
$adm_pass = "grababumzazad";
header("Content-type:text/html;charset=utf-8;");
include 'inc/db.class.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>Панель управления</title>
<link rel='stylesheet' href='/admin.css'>
<script src='js/jq.js'></script>
<link rel='stylesheet' href='/bootstrap/css/bootstrap.min.css'>
<link href="/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<script src='/bootstrap/js/bootstrap.min.js'></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="/fancybox/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.js?v=2.1.3"></script>
<link rel="stylesheet" type="text/css" href="/fancybox/source/jquery.fancybox.css?v=2.1.2" media="screen" />
<link rel="stylesheet" href="/global.css">
<script src="/slides.min.jquery.js"></script>
<script>
$(document).ready(function(){
$('.editt').tooltip({title:"Редактировать"});
$('.deletet').tooltip({title:"Удалить"});
});
</script>
</head>
<body style='background:#F2F2F2;'>
<center>
<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
if(isset($_SESSION['admin'])){
echo "
<div style='width:100%;background:#F2F2F2;border-bottom:1px solid #E3E3E3;'>
<div style='margin:0 auto;width:1100px;margin:20px;'>
<input type='button' class='btn' value='Управление Группами' OnClick='window.location.href="?page=groups";'>
<input type='button' class='btn' value='Управление Добавить в Друзья' OnClick='window.location.href="?page=frend";'>
<input type='button' class='btn' value='Управление Записями' OnClick='window.location.href="?page=notes";'>
<input type='button' class='btn' value='Управление Лайками' OnClick='window.location.href="?page=likes";'>
<input type='button' class='btn' value='Управление Пользователями' OnClick='window.location.href="?page=users";'>
<input type='button' class='btn' value='Управление Магазином' OnClick='window.location.href="?page=shop";'>
<input type='button' class='btn' value='Управление Ценами' OnClick='window.location.href="?page=prices";'>
<input type='button' class='btn' value='Управление Подарками' OnClick='window.location.href="?page=gifts";'>
<input type='button' class='btn' value='Добавление Баллов' OnClick='window.location.href="?page=addall";'>
<input type='button' class='btn btn-info' value='Выйти' OnClick='window.location.href="?page=exit";'>
</div>
</div>
<div style='width:100%;'>
<div style='width:1000px;margin:0 auto;padding:20px;margin:20px;background:#F7F7F7;border:1px solid #E3E3E3;'>
";
if(isset($_GET['page'])){
switch($_GET['page']){
case "groups":
include 'admin/group.php';
break;
case "frend":
include 'admin/frend.php';
break;
case "notes":
include 'admin/note.php';
break;
case "likes":
include 'admin/likes.php';
break;
case "users":
include 'admin/users.php';
break;
case "shop":
include 'admin/shop.php';
break;
case "prices":
include 'admin/prices.php';
break;
case "gifts":
include 'admin/gifts.php';
break;
case "addall":
include 'admin/addmoney.php';
break;
case "exit":
unset($_SESSION['admin']);
echo "<script>window.location.href='/admin.php';</script>";
break;
}
}else{
echo "<h3><center>Выберите пункт меню</center></h3>";
}
echo "
</div>
</div>
";
}else{
if(isset($_POST['login'])){
if($_POST['login'] == $adm_login && $_POST['pass'] == $adm_pass){
$_SESSION['admin'] = 1;
echo "
<div class='alert alert-success'>
<b>Вы успешно авторизировались! Подождите, идет переадресация!</b>
<script>setTimeout('window.location.href = window.location.href;',3000);</script>
</div>
";
}else{
echo "
<div class='alert alert-error'>
<b>Невверный логин или пароль!</b>
</div>
";
}
}
?>
<h2>Вход</h2>
<form method='post'>
<input name='login' type='text' style='width:250px;text-align:center;' placeholder='Логин'><br>
<input name='pass' type='password' style='width:250px;text-align:center;' placeholder='Пароль'><br>
<input type='submit' value='Войти' class='btn'><br>
</form>
</center>
<?php
}
?>
</body>
</html>