som changes in responsive - admin zone, new massage layout - account settings

This commit is contained in:
Szymon 2018-12-17 01:02:03 +01:00
parent 31155fb925
commit 4f6ead08b2
13 changed files with 595 additions and 461 deletions

View File

@ -25,27 +25,27 @@ if(isset($_POST['password_change'])){
$_SESSION['user']=$user;
$_SESSION['password']=$newpassword;
$_SESSION['loggedIn']=1;
$_SESSION['message'] = "Hasło zostało zmienione!<br>";
$_SESSION['message'] = "Hasło: Hasło zostało zmienione!";
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "Hasło: Coś poszło nie tak, spróbuj ponownie później.";
}
mysqli_close($mysqli);
}
else {
$_SESSION['message'] = "Błędne hasło!<br>";
$_SESSION['message'] = "Hasło: Błędne hasło!";
}
}
else{
$_SESSION['message'] = "Potwierdź hasło ponownie<br>";
$_SESSION['message'] = "Hasło: Potwierdź hasło ponownie";
}
}
else{
$_SESSION['message'] = "Nowe hasło nie może być takie samo jak obecne<br>";
$_SESSION['message'] = "Hasło: Nowe hasło nie może być takie samo jak obecne";
}
}
else{
$_SESSION['message'] = "Należy wypełnić wszystkie wmagane pola<br>";
$_SESSION['message'] = "Hasło: Należy wypełnić wszystkie wmagane pola";
}
}
@ -58,27 +58,27 @@ if(isset($_POST['email_change'])){
$newemail=$_POST['newemail'];
$sql = "UPDATE user SET email='$newemail' WHERE password='$password' AND username='$user'";
if($mysqli->query($sql) === true){
$_SESSION['message'] = "email został zmieniony!";
$_SESSION['message'] = "E-mail: email został zmieniony!";
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "E-mail: Coś poszło nie tak, spróbuj ponownie później.";
}
mysqli_close($mysqli);
}
else {
$_SESSION['message'] = "Błędne hasło!<br>";
$_SESSION['message'] = "E-mail: Błędne hasło!";
}
}
else{
$_SESSION['message'] = "Potwierdź email ponownie<br>";
$_SESSION['message'] = "E-mail: Potwierdź email ponownie";
}
}
else{
$_SESSION['message'] = "Nowy email nie może być taki sam jak obecny<br>";
$_SESSION['message'] = "E-mail: Nowy email nie może być taki sam jak obecny";
}
}
else{
$_SESSION['message'] = "Należy wypełnić wszystkie wmagane pola<br>";
$_SESSION['message'] = "E-mail: Należy wypełnić wszystkie wmagane pola";
}
}
@ -92,19 +92,19 @@ if(isset($_POST['avatar_change'])){
if($currentavatar != $avatar_path){
unlink($currentavatar);
}
$_SESSION['message'] = "avatar został zmieniony!<br>";
$_SESSION['message'] = "Avatar: avatar został zmieniony!";
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "Avatar: Coś poszło nie tak, spróbuj ponownie później.";
}
mysqli_close($mysqli);
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "Avatar: Coś poszło nie tak, spróbuj ponownie później.";
}
}
else{
$_SESSION['message'] = "Plik musi byc graficzny<br>";
$_SESSION['message'] = "Avatar: Plik musi byc graficzny";
}
}
@ -113,16 +113,16 @@ if(isset($_POST['aboutshort_change'])){
if($about_short != $newabout_short){
$sql = "UPDATE user SET about_short='$newabout_short' WHERE password='$password' AND username='$user'";
if($mysqli->query($sql) === true){
$_SESSION['message'] = "Zmiany zostały zatwierdzone!";
$_SESSION['message'] = "Krótko o mnie: Zmiany zostały zatwierdzone!";
$about_short = $row['about_short'];
header('Location: account_settings.php');
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "Krótko o mnie: Coś poszło nie tak, spróbuj ponownie później.";
}
}
else{
$_SESSION['message'] = "Brak zmian<br>";
$_SESSION['message'] = "Krótko o mnie: Brak zmian";
}
}
@ -131,16 +131,16 @@ if(isset($_POST['aboutme_change'])){
if($about_me != $newabout_me){
$sql = "UPDATE user SET about_me='$newabout_me' WHERE password='$password' AND username='$user'";
if($mysqli->query($sql) === true){
$_SESSION['message'] = "Zmiany zostały zatwierdzone!";
$_SESSION['message'] = "O mnie: Zmiany zostały zatwierdzone!";
$about_me = $row['about_me'];
header('Location: account_settings.php');
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "O mnie: Coś poszło nie tak, spróbuj ponownie później.";
}
}
else{
$_SESSION['message'] = "Brak zmian<br>";
$_SESSION['message'] = "O mnie: Brak zmian";
}
}
@ -149,16 +149,16 @@ if(isset($_POST['aboutblog_change'])){
if($about_blog != $newabout_blog){
$sql = "UPDATE user SET about_blog='$newabout_blog' WHERE password='$password' AND username='$user'";
if($mysqli->query($sql) === true){
$_SESSION['message'] = "Zmiany zostały zatwierdzone!";
$_SESSION['message'] = "Opis bloga: Zmiany zostały zatwierdzone!";
$about_blog = $row['about_blog'];
header('Location: account_settings.php');
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "Opis bloga: Coś poszło nie tak, spróbuj ponownie później.";
}
}
else{
$_SESSION['message'] = "Brak zmian<br>";
$_SESSION['message'] = "Opis bloga: Brak zmian";
}
}
@ -169,14 +169,14 @@ if(isset($_POST['face_change'])){
if($face != $newface) {
$sql = "UPDATE user SET FB='$newface' WHERE password='$password' AND username='$user'";
if($mysqli->query($sql) === true){
$_SESSION['message'] = "Zmiany zostały zatwierdzone!";
$_SESSION['message'] = "Social media: Zmiany zostały zatwierdzone!";
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "Social media: Coś poszło nie tak, spróbuj ponownie później.";
}
}
else{
$_SESSION['message'] = "Brak zmian<br>";
$_SESSION['message'] = "Social media: Brak zmian";
}
}
}
@ -187,14 +187,14 @@ if(isset($_POST['twit_change'])){
if($twit != $newtwit) {
$sql = "UPDATE user SET TW='$newtwit' WHERE password='$password' AND username='$user'";
if($mysqli->query($sql) === true){
$_SESSION['message'] = "Zmiany zostały zatwierdzone!<br>";
$_SESSION['message'] = "Social media: Zmiany zostały zatwierdzone!";
}
else{
$_SESSION['message'] = "Coś poszło nie tak, spróbuj ponownie później.<br>";
$_SESSION['message'] = "Social media: Coś poszło nie tak, spróbuj ponownie później.";
}
}
else{
$_SESSION['message'] = "Brak zmian<br>";
$_SESSION['message'] = "Social media: Brak zmian";
}
}
}

View File

@ -8,39 +8,51 @@ include "acc_settings.php";
<html>
<head>
<meta charset="utf-8">
<link rel="Shortcut icon" href="../blog-post/img/name-label.png"/>
<!-- SEO FRIENDLY ZONE -->
<title>Ustawienia Konta CMS - Bloggero</title>
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- END OF SEO FRIENDLY ZONE -->
<!-- JS STYLE AND BS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.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="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css">
<link rel="Shortcut icon" href="../blog-post/img/name-label.png"/>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/style2.css">
<!-- BOOTSTRAP SCRIPT LOADER -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<!-- END OF BOOTSTRAP SCRIPT LOADER -->
</head>
<body>
<div class="wrapper">
<?php include "sidebar.php"; ?>
<div id="content">
<div id="content" class="container-fluid">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<div class="flex-row">
<div class="navbar-header flex-column">
<button type="button" id="sidebarCollapse" class="btn btn-info navbar-btn">
<i class="glyphicon glyphicon-align-left"></i>
<span>Toggle Sidebar</span>
</button>
<?php include "menu.php" ?>
<div id="aboutdown"></div>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="flex-row">
<div class="info">
<span><?php echo $_SESSION['message']; ?></span>
</div>
<div class="flex-column">
<div class="tabs">
<button class="tabbutton" onclick="openTab(event, 'passwordrow')">Hasło</button>
<button id="open" class="tabbutton" onclick="openTab(event, 'passwordrow')">Hasło</button>
<button class="tabbutton" onclick="openTab(event, 'mailrow')">E-mail</button>
<button class="tabbutton" onclick="openTab(event, 'avatarrow')">Avatar</button>
<button class="tabbutton" onclick="openTab(event, 'aboutshortrow')">Krótko o mnie</button>
@ -48,6 +60,8 @@ include "acc_settings.php";
<button class="tabbutton" onclick="openTab(event, 'aboutblogrow')">Opis bloga</button>
<button class="tabbutton" onclick="openTab(event, 'socialrow')">Social media</button>
</div>
</div>
</div>
<div id="passwordrow" class="flex-row tabcontent">
<div class="flex-column">
<form class="form" action="" method="POST">
@ -64,7 +78,6 @@ include "acc_settings.php";
<input type="password" class="form-control" id="confirmpassword" name="confirmpassword" required />
<label>Potwierdź Nowe Hasło</label>
</div>
<span><?php echo $_SESSION['message']; ?></span>
<input type="submit" class="button" value="Zmień Hasło" name="password_change" />
</form>
</div>
@ -85,7 +98,6 @@ include "acc_settings.php";
<input type="email" class="form-control" id="confirmemail" name="confirmemail" required />
<label>Potwierdź e-mail</label>
</div>
<span><?php echo $_SESSION['message']; ?></span>
<input type="submit" class="button" value="Zmień email" name="email_change" />
</form>
</div>
@ -96,7 +108,6 @@ include "acc_settings.php";
<p>Zmiana avatara</p>
<label>Wybierz nowy avatar: </label>
<input class="avatarchange" type="file" name="avatar" accept="image/*" required />
<span><?php echo $_SESSION['message']; ?></span>
<input type="submit" class="button" value="Zmień avatar" name="avatar_change"/>
</form>
</div>
@ -106,7 +117,7 @@ include "acc_settings.php";
<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>
<input type="submit" class="button" value="Zatwierdź" name="aboutshort_change" />
</form>
</div>
@ -116,8 +127,7 @@ include "acc_settings.php";
<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>
<input type="submit" class="button" value="Zatwierdź" name="aboutme_change" />
<input type="submit" class="button" value="Zatwierdź" name="aboutme_change" onClick="info()" />
</form>
</div>
</div>
@ -126,7 +136,6 @@ include "acc_settings.php";
<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="button" value="Zatwierdź" name="aboutblog_change" />
</form>
</div>
@ -139,7 +148,6 @@ include "acc_settings.php";
<input type="text" class="form-control" id="FB" name="FB" required />
<label>Facebook</label>
</div>
<span><?php echo $_SESSION['message']; ?></span>
<input type="submit" class="button" value="Zatwierdź" name="face_change" />
</form>
<form class="form" action="" method="POST">
@ -147,14 +155,12 @@ include "acc_settings.php";
<input type="text" class="form-control" id="TW" name="TW" required />
<label>Twitter</label>
</div>
<span><?php echo $_SESSION['message']; ?></span>
<input type="submit" class="button" value="Zatwierdź" name="twit_change" />
</form>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<!-- Bootstrap Js CDN -->
@ -195,6 +201,7 @@ include "acc_settings.php";
document.getElementById(contentID).style.display = "block";
event.currentTarget.className += " active";
}
document.getElementById("open").click();
</script>
</body>
</html>

View File

@ -10,6 +10,7 @@ else{
<html>
<head>
<meta charset="utf-8">
<link rel="Shortcut icon" href="../blog-post/img/name-label.png"/>
<!-- SEO FRIENDLY ZONE -->
<title>Panel CMS</title>
@ -26,33 +27,44 @@ else{
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<!-- END OF CSS LOADER -->
<!-- BOOTSTRAP SCRIPT LOADER -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<!-- END OF BOOTSTRAP SCRIPT LOADER -->
</head>
<body>
<div class="wrapper">
<?php include "sidebar.php"; ?>
<div id="content">
<div id="content" class="container-fluid">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<div class="flex-row">
<div class="navbar-header flex-column">
<button type="button" id="sidebarCollapse" class="btn btn-info navbar-btn">
<i class="glyphicon glyphicon-align-left"></i>
<span>Toggle Sidebar</span>
</button>
<?php include "menu.php" ?>
<div id="aboutdown"></div>
</div>
</div>
</nav>
<form method="post" action="insert.php">
<div class="flex-row">
<div class="flex-column">
<form class="form" method="post" action="insert.php">
<div class="addPostForm">
<input type="text" name="title" size="120">
<p>Tytuł</p>
<input type="text" class="form-control" name="title" size="120">
<p>Meta opis</p>
<input name="meta_desc" size="120">
<input type="text" class="form-control" name="meta_desc" size="120">
<p>Treść posta</p>
<textarea name="post_text" id="editor1" rows="10" cols="80"></textarea>
<input type="submit" class="btn btn-success" value="Dodaj post">
</div>
</form>
</div>
</div>
</div>
</div>

View File

@ -1,4 +1,10 @@
.indexnavbar {
margin-bottom: 0;
border-radius: 0;
}
.navbar {
margin-left: 20px;
margin-bottom: 0;
border-radius: 0;
}
@ -132,4 +138,8 @@ a[aria-expanded="true"]::before {
}
.addPostForm{
margin-left: 20px;
margin-top: 20px;
}
.addPostForm input {
margin-bottom: 20px;
}

View File

@ -25,6 +25,7 @@ a, a:hover, a:focus {
.navbar {
padding: 15px 10px;
margin-left: 10px;
background: #fff;
border: none;
border-radius: 0;
@ -155,6 +156,23 @@ a.article, a.article:hover {
width: 100%;
}
/* ---------------------------------------------------
ALTERNATIVE MENU STYLE
----------------------------------------------------- */
#menuwrap {
position: relative;
left: 0;
top: 0;
}
#aboutdown{
position: relative;
top: 30px;
}
.dropdown {
display: none;
}
/* ---------------------------------------------------
MEDIAQUERIES
@ -172,11 +190,16 @@ a.article, a.article:hover {
#content.active {
width: calc(100% - 250px);
}
#sidebarCollapse {
display: none;
}
#sidebarCollapse span {
display: none;
}
.dropdown {
display: block;
}
}
/* ---------------------------------------------------
ACCOUNT SETTINGS
@ -186,6 +209,13 @@ a.article, a.article:hover {
background-color: #e8ebef;
}
.info {
text-align: center;
margin: 20px 20px;
font-size: 110%;
color: orangered;
}
.tabs button {
background-color: inherit;
float: left;
@ -255,7 +285,7 @@ a.article, a.article:hover {
transition: .5s;
}
.inputbox .form-control, .form-control:focus{
.inputbox .form-control,.inputbox .form-control:focus{
-webkit-box-shadow: none;
box-shadow: none;
border-bottom: solid lightblue;

View File

@ -10,6 +10,7 @@ else{
<html>
<head>
<meta charset="utf-8">
<link rel="Shortcut icon" href="../blog-post/img/name-label.png"/>
<!-- SEO FRIENDLY ZONE -->
<title>Panel CMS</title>
@ -26,22 +27,32 @@ else{
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<!-- END OF CSS LOADER -->
<!-- BOOTSTRAP SCRIPT LOADER -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<!-- END OF BOOTSTRAP SCRIPT LOADER -->
</head>
<body>
<div class="wrapper">
<?php include "sidebar.php"; ?>
<div id="content">
<div id="content" class="container-fluid">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<div class="flex-row">
<div class="navbar-header flex-column">
<button type="button" id="sidebarCollapse" class="btn btn-info navbar-btn">
<i class="glyphicon glyphicon-align-left"></i>
<span>Toggle Sidebar</span>
</button>
<?php include "menu.php" ?>
<div id="aboutdown"></div>
</div>
</div>
</nav>
<form method="post" action="update_post.php">
<div class="flex-row">
<div class="flex-column">
<form class="form" method="post" action="update_post.php">
<div class="addPostForm">
<?php
include "../settings/db_connect.php";
@ -55,9 +66,9 @@ else{
if (!$sql->fetch()) die("Blad!!! Brak rekordu do edycji w bazie!!! Liczba rekodow:".$sql->num_rows);
?>
<p>Tytuł posta:</p>
<input type="text" name="title" size="120" value='<?php echo $title;?>'>
<input type="text" class="form-control" name="title" size="120" value='<?php echo $title;?>'>
<p>Meta opis</p>
<input name="meta_desc" size="120" value='<?php echo $meta_desc; ?>'>
<input type="text" class="form-control" name="meta_desc" size="120" value='<?php echo $meta_desc; ?>'>
<p>Treść posta</p>
<textarea name="post_text" id="editor1" rows="10" cols="80"><?php echo $text; ?></textarea>
<input type="submit" class="btn btn-success" value="Edytuj Post">
@ -68,7 +79,8 @@ else{
?>
</div>
</form>
</div>
</div>
</div>
</div>

View File

@ -8,11 +8,13 @@ if(empty($_SESSION['user'])){
<html>
<head>
<meta charset="utf-8">
<title>Panel CMS</title>
<!-- SEO FRIENDLY ZONE -->
<title>Panel CMS - Bloggero</title>
<meta charset="utf-8">
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- END OF SEO FRIENDLY ZONE -->
<!-- JS STYLE AND BS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
@ -20,7 +22,16 @@ if(empty($_SESSION['user'])){
<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="Shortcut icon" href="../blog-post/img/name-label.png"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css">
<!-- END OF JS STYLE AND BS -->
<!-- BOOTSTRAP SCRIPT LOADER -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<!-- END OF BOOTSTRAP SCRIPT LOADER -->
</head>
<body>
<?php
@ -35,19 +46,23 @@ $_SESSION['user_blog_id']=$user_blog_id;
?>
<div class="wrapper">
<?php include "sidebar.php"; ?>
<div id="content">
<div id="content" class="container-fluid">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<div class="flex-row">
<div class="navbar-header flex-column">
<button type="button" id="sidebarCollapse" class="btn btn-info navbar-btn">
<i class="glyphicon glyphicon-align-left"></i>
<span>Toggle Sidebar</span>
</button>
<?php //include "menu.php" ?>
<!-- <div id="aboutdown"></div> -->
</div>
</div>
</nav>
<div class="flex-row">
<div class="flex-column">
<table class="table table-striped" style="margin-left:10px;">
<thead>
<tr>
<th>ID Postu</th>
<th>Tytuł</th>
@ -55,6 +70,7 @@ $_SESSION['user_blog_id']=$user_blog_id;
<th>Data dodania</th>
<th>Data modyfikacji</th>
</tr>
</thead>
<?php
$trash = '';
@ -82,6 +98,8 @@ else die( "Błąd w zapytaniu SQL! Sprawdź kod SQL w PhpMyAdmin. $user $passwor
$mysqli->close();
?>
</table>
</div>
</div>
<a href="add_post.php" style="margin-left:10px;" class="btn btn-success">Dodawanie nowego</a>
</div>
</div>

15
admin-zone/menu.php Normal file
View File

@ -0,0 +1,15 @@
<div class="dropdown">
<div id="menuwrap">
<button class="btn btn-info navbar-btn dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Menu
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenu2">
<li><a href="index.php">Posty</a></li>
<li><a href="account_settings.php">Ustawienia Konta</a></li>
<li class="divider"></li>
<li><a href="../index.html">Strona główna</a></li>
<li><a href="../blog-post/blog.php?user_id=<?php echo $_SESSION['user_blog_id']; ?>">Przejdź do Bloga</a></li>
<li><a href="logout.php">Wyloguj</a> </li>
</div>
</div>
</div>

View File

@ -6,14 +6,14 @@
</div>
<ul class="list-unstyled components">
<li><a href="index.php">Strona główna</a></li>
<li class="active"><a target="zawartosc" name="dodajemy" href="index.php">Posty</a></li>
<li><a href="../index.php">Strona główna</a></li>
<li class="active"><a name="dodajemy" href="index.php">Posty</a></li>
<li><a href="account_settings.php">Ustawienia Konta</a></li>
</ul>
<div>
<ul class="list-unstyled components">
<li><a href="../blog-post/blog.php?user_id=<?php echo $_SESSION['user_blog_id']; ?>" style="color:red;">Przejdź do Bloga</a></li>
<li><a href="../blog-post/blog.php?user_id=<?php echo $_SESSION['user_blog_id']; ?>">Przejdź do Bloga</a></li>
<li><a href="logout.php">Wyloguj</a> </li>
</ul>
</nav>

View File

@ -15,7 +15,7 @@ $mod_date=date("Y-m-d H:i:s");
$sql = $mysqli->prepare("UPDATE post SET tytul=?,opis=?,tekst=?,data_modyfikacji=? WHERE post_id=?;");
if ($sql)
{
$sql->bind_param("isssi",$title,$meta_desc,$text,$mod_date,$post_id);
$sql->bind_param("ssssi",$title,$meta_desc,$text,$mod_date,$post_id);
$sql->execute();
$sql->close();
}

View File

@ -94,6 +94,22 @@
font-size: 12px;
}
.elementsOnLoginMain .toregister {
text-align: right;
}
.elementsOnLoginMain .toregister a:link {
color: black;
background-color: transparent;
text-decoration: none;
}
.elementsOnLoginMain .toregister a:visited {
color: black;
background-color: transparent;
text-decoration: none;
}
.loginFooter {
width: 100%;
}

View File

@ -95,6 +95,22 @@
font-size: 12px;
}
.elementsOnRegisterMain .tologin {
text-align: right;
}
.elementsOnRegisterMain .tologin a:link {
color: black;
background-color: transparent;
text-decoration: none;
}
.elementsOnRegisterMain .tologin a:visited {
color: black;
background-color: transparent;
text-decoration: none;
}
.registerFooter {
width: 100%;
}

View File

@ -16,12 +16,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<style type="text/css">
* {margin: 0; padding: 0;}
.wrapper {width: 100%; height: 700px; background: red;}
/* ---- reset ---- */ body{ margin:0; font:normal 75% Arial, Helvetica, sans-serif; } canvas{ display: block; vertical-align: bottom; } /* ---- particles.js container ---- */ #particles-js{ position:absolute; width: 100%; height: 100%; background-color: #b61924; background-image: url(""); background-repeat: no-repeat; background-size: cover; background-position: 50% 50%; } /* ---- stats.js ---- */ .count-particles{ background: #000022; position: absolute; top: 48px; left: 0; width: 80px; color: #13E8E9; font-size: .8em; text-align: left; text-indent: 4px; line-height: 14px; padding-bottom: 2px; font-family: Helvetica, Arial, sans-serif; font-weight: bold; } .js-count-particles{ font-size: 1.1em; } #stats, .count-particles{ -webkit-user-select: none; margin-top: 5px; margin-left: 5px; } #stats{ border-radius: 3px 3px 0 0; overflow: hidden; } .count-particles{ border-radius: 0 0 3px 3px; }
</style>
</head>
<body>
<div id="particles-js"></div>
@ -57,6 +51,9 @@
<label>Wybierz swój avatar: </label>
<input type="file" name="avatar" accept="image/*" required />
</div>
<div class="form-group tologin">
<a href="../admin-zone/login.php">Mam już konto</a>
</div>
</div>
</div>
<div class="row registerFooter">
@ -74,7 +71,8 @@
<script>
particlesJS.load('particles-js', '../js/particles.json', function() {
console.log('callback - particles.js config loaded'); });
console.log('callback - particles.js config loaded');
});
</script>
</body>