TAS-ALFA/admin-zone/account_settings.php

148 lines
7.5 KiB
PHP

<?php
if( !isset( $_SESSION ) ) session_start();
if(empty($_SESSION['user'])){
header('Location: login.php');
}
include "acc_settings.php";
?>
<html>
<head>
<meta charset="utf-8">
<title>Ustawienia Konta CMS - Bloggero</title>
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- JS STYLE AND BS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="../css/style2.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css">
</head>
<body>
<div class="wrapper">
<?php include "sidebar.php"; ?>
<div id="content">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" id="sidebarCollapse" class="btn btn-info navbar-btn">
<i class="glyphicon glyphicon-align-left"></i>
<span>Toggle Sidebar</span>
</button>
</div>
</div>
</nav>
</div>
<div class="container-fluid">
<div clas="flex-row">
<div class="flex-column">
<form class="form" action="" method="POST">
<p>Zmiana hasła</p>
<input type="password" class="form-control" placeholder="Hasło" id="password" name="password" required />
<input type="password" class="form-control" placeholder="Nowe hasło" id="newpassword" name="newpassword" required />
<input type="password" class="form-control" placeholder="Potwierdź nowe hasło" id="confirmpassword" name="confirmpassword" required />
<span><?php echo $_SESSION['message']; ?></span><br>
<input type="submit" class="btn" value="Zmień Hasło" name="password_change" />
</form>
</div>
</div>
<div clas="flex-row">
<div class="flex-column">
<form class="form" action="" method="POST">
<p>Zmiana adresu e-mail</p>
<input type="password" class="form-control" placeholder="Hasło" id="password" name="password" required />
<input type="email" class="form-control" placeholder="email" id="newemail" name="newemail" required />
<input type="email" class="form-control" placeholder="Potwierdź email" id="confirmemail" name="confirmemail" required />
<span><?php echo $_SESSION['message']; ?></span><br>
<input type="submit" class="btn" value="Zmień email" name="email_change" />
</form>
</div>
</div>
<div clas="flex-row">
<div class="flex-column">
<form class="form" action="" method="POST" enctype="multipart/form-data">
<p>Zmiana avatara</p>
<label>Wybierz nowy avatar: </label>
<input type="file" name="avatar" accept="image/*" required />
<span><?php echo $_SESSION['message']; ?></span><br>
<input type="submit" class="btn" value="Zmień avatar" name="avatar_change" />
</form>
</div>
</div>
<div clas="flex-row">
<div class="flex-column">
<form class="form" action="" method="POST">
<p>Krótko o mnie</p>
<textarea name="aboutshort" rows="10" cols="80"><?php echo $about_short; ?></textarea><br>
<span><?php echo $_SESSION['message']; ?></span><br>
<input type="submit" class="btn" value="Zatwierdź" name="aboutshort_change" />
</form>
</div>
</div>
<div clas="flex-row">
<div class="flex-column">
<form class="form" action="" method="POST">
<p>O mnie</p>
<textarea name="aboutme" rows="10" cols="80"><?php echo $about_me; ?></textarea><br>
<span><?php echo $_SESSION['message']; ?></span><br>
<input type="submit" class="btn" value="Zatwierdź" name="aboutme_change" />
</form>
</div>
</div>
<div clas="flex-row">
<div class="flex-column">
<form class="form" action="" method="POST">
<p>Opis Bloga</p>
<textarea name="aboutblog" maxlength="50" rows="10" cols="80"><?php echo $about_blog; ?></textarea><br>
<span><?php echo $_SESSION['message']; ?></span><br>
<input type="submit" class="btn" value="Zatwierdź" name="aboutblog_change" />
</form>
</div>
</div>
<div clas="flex-row">
<div class="flex-column">
<form class="form" action="" method="POST">
<p>Social Media</p>
<input type="text" class="form-control" placeholder="facebook" id="FB" name="FB" required />
<span><?php echo $_SESSION['message']; ?></span><br>
<input type="submit" class="btn" value="Zatwierdź" name="face_change" />
</form>
<form class="form" action="" method="POST">
<input type="text" class="form-control" placeholder="twitter" id="TW" name="TW" required />
<span><?php echo $_SESSION['message']; ?></span><br>
<input type="submit" class="btn" value="Zatwierdź" name="twit_change" />
</form>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<!-- Bootstrap Js CDN -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- jQuery Custom Scroller CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.concat.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#sidebar").mCustomScrollbar({
theme: "minimal"
});
$('#sidebarCollapse').on('click', function () {
$('#sidebar, #content').toggleClass('active');
$('.collapse.in').toggleClass('in');
$('a[aria-expanded=true]').attr('aria-expanded', 'false');
});
$('#dodajemy').click(function(){
$("#zawartosc").load('index.php');
});
});
</script>
<a href="logout.php">Logout</a>
</body>
</html>