TAS-ALFA/blogcenter/index.html

146 lines
4.8 KiB
HTML

<!DOCTYPE html>
<html lang="pl">
<head>
<title>Projekt blogowy</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="indexstyle.css">
<!-- bootstrap js -->
<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>
</head>
<body class="body">
<header>
<div class="navHeader">
<img src="img/artist-camera-dslr-22185.jpg" alt="Bloggero - najlepszy serwis blogowy!">
</div>
<div class="row elementsOnHeader">
<div class="col-md-2 login">
<a href="login.html" class="button" role="button">Zarządzaj blogiem</a>
</div>
<div class="col-md-4 register"r>
<h1>Centrum Blogów</h1>
<a href="login.html" class="button" role="button">Zacznij swą blogową przygodę</a>
</div>
<div class="col-md-3 search" style="align-item: right">
<input type="text" placeholder="Szukaj">
<input type="submit">
</div>
</div>
</header>
<div class="row mainrow">
<div class="col-md-12"><h2>Najnowsze wpisy:</h2></div>
<?php
include "../settings/db_connect.php";
if ($sql = $mysqli->prepare("SELECT * FROM user WHERE user_id = 2 "))
{
$sql->execute();
$sql->bind_result($user_id,$username,$email,$password,$avatar, $about_short, $about_me, $about_blog, $FB, $TW);
while ($sql->fetch())
{
echo "<div class=\"col-lg-8 name-desc\">
<h2>$about_short</h2>
<div class=\"col-md-11\">
<p>$about_me
</p>
<p>$about_blog</p>
</div>
</div>
<div class=\"col-lg-4 name foto cover foto1\">
<img src=\"$avatar\" class=\"align-text-bottom\">
<p>$username</p>
<a href=\"https://www.facebook.com/$FB\">
<div class=\"col-md-6\">
<div class=\"fa fa-facebook-official\" style=\"font-size:36px\">
<div class=\"ikona\"> <i><p1> $FB </p1></i> </div>
</div> </div> </a>
<a href=\"https://twitter.com/$TW\">
<div class=\"col-md-6\">
<div class=\"fa fa-twitter-square\" style=\"font-size:36px\"\">
<div class=\"ikona\"><i><p1> $TW </p1></i> </div>
</div> </a> </div>
</div>
</div>
<!-- /row -->
</div>
<!-- /container -->
<!-- /aboutwrap -->
<section id=\"post\" name=\"post\"></section>
<div id=\"postwrap\">
<div class=\"container\">
<div class=\"row\">
<h2>NAJNOWSZE WPISY</h2>";
}
$sql->close();
}
else die( "Błąd w zapytaniu SQL! Sprawdź kod SQL w PhpMyAdmin." );
$trash = '';
if ($sql = $mysqli->prepare("SELECT * FROM post ORDER BY data_dodania"))
{
$sql->execute();
$sql->bind_result($post_id,$trash,$title,$description,$main,$image,$date,$mod_date);
while ($sql->fetch())
{
echo " <div class=\"col-lg-4 col-md-6 col-sm-6 col-xs-12 desc\">
<div class=\"project\">
<div class=\"photo-wrapper\">
<div class=\"photo foto cover\">
<a href=\"post.php\"><img class=\"img-responsive\" src=\"$image\" alt=\"\">
<div class=\"text-block\">
<p1>$date</p1>
</div>
</div>
</div>
</div> <h1> $title</h1></a>
</div>";
}
$sql->close();
}
else die( "Błąd w zapytaniu SQL! Sprawdź kod SQL w PhpMyAdmin." );
$mysqli->close();
?>
</div>
<div class="row footer">
<div class="col-md-12">
<p>Grupa Alfa 2018</p>
</div>
</div>
</div>
</body>
</html>