Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Blog</title>
- <link rel="stylesheet" type="text/css" href="css/reset.css">
- <link rel="stylesheet" type="text/css" href="css/index.css">
- <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Arvo' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
- <script>
- $(document).ready(function(){
- $("#flip").click(function(){
- $("#panel").slideToggle("slow");
- });
- });
- </script>
- </head>
- <body>
- <div class="headblock">
- <div class="littlehead">Blog</br>________</div>
- <ul class="menu-list" ><div id="flip"> <img src="list.png" style="width:48px;height:48px">
- <div id="panel"><li><span class="login"><a href="includes/logout.php" class="login-link">Log out</a></li></span></div>
- </ul></div>
- <div id="container">
- <div class="topbar">
- <span class="menu menu-active" onclick="location.href='home.php'">Home</span>
- <?php
- include "mysql.php";
- $query = $mysqli->query("SELECT * FROM category");
- while($getdata = $query->fetch_assoc()) {
- echo " | ";
- echo '<span class="menu" onclick="' . "location.href='category.php?id=" . $getdata["id"] . "'" . '">' . $getdata["name"] . '</span>';
- }
- ?>
- </div>
- <div class="content">
- <?php
- $tags = $_GET["tags"];
- if($tags == NULL) {
- echo "<script>location.href='add.php';</script>";
- }
- $query = $mysqli->query("SELECT * FROM post WHERE tags LIKE '%$tags,%' ORDER by id DESC");
- while($getdata = $query->fetch_assoc()) {
- $newtags = "";
- $tags = split(",", $getdata["tags"]);
- foreach ($tags as $value) {
- $newtags .= '<a href="tags.php?tags=' . $value . '">' . $value . '</a> ';
- }
- ?>
- <div class="post">
- <p>
- <div><h5><font size="5" ><a href="post.php?id=<?php echo $getdata["id"]; ?>"><?php echo $getdata["title"]; ?></a></h5></font></div>
- <div><small>tags: <i><?php echo $newtags; ?></i></small></div>
- </p>
- <p style="margin-top: 20px;">
- <?php echo $getdata["detail"]; ?>
- </p>
- <p style="margin-top: 20px;"><font size="3" color="red">
- <small><i>Posted by <?php echo $getdata["username"]; ?></i></small>
- <div style="margin-top: 5px;"><small><i><?php echo $data["time"]; ?></i></small></div>
- </p></font>
- </div>
- <?php
- }
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement