SHARE
TWEET

Untitled

a guest Sep 13th, 2017 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include_once('resources/init.php');
  3.  
  4. $posts = get_posts();
  5.  
  6. ?>
  7.  
  8.  
  9. <html>
  10. <head>
  11. <title>Helge Sverre's Blog!</title>
  12. <style type="text/css">
  13. #remove {
  14.     position:absolute;
  15.     top:50px;
  16.     left:70px;
  17.     display:none;
  18. }
  19.  
  20. A:link {text-decoration:none;color:black;}
  21. A:visited {text-decoration:none;color:black;}
  22. A:active {text-decoration:none;color:black;}
  23. A:hover {text-decoration:underline;color:gray;}
  24.  
  25. #content {
  26.     border:1px solid black;
  27.     position:absolute;
  28.     top:80px;
  29.     left:10px;
  30.     padding:10px;
  31.     width:578px;
  32.     height:500px;
  33.     margin:0px;
  34. }
  35.  
  36.  
  37. </style>
  38. </head>
  39. <body>
  40. <table border="0" cellspacing="0px" cellpadding="5px">
  41.     <tr>
  42.         <td><h1>Helge Sverre's Blog!</h1></td>
  43.         <td><a href="index.php">Index</a></td>
  44.         <td><a href="add_post.php">Add Post</a></td>
  45.         <td><a href="add_category.php">Add Category</a></td>
  46.         <td><a href="category_list.php">Category List</a></td>
  47.     </tr>
  48. </table>
  49.  
  50. <div id="content">
  51. <?php
  52.     foreach ($posts as $post) {
  53.         if (!category_exists("name", $post['name'])) {
  54.             $post['name'] = "Uncategorised";
  55.         }
  56.         ?>
  57.         <h2><a href="index.php?id=<?php echo $post['post_id']; echo mysql_error(); ?>"><?php echo $post['title']; echo mysql_error(); ?></a></h2>
  58.        
  59.         <?php
  60.     }
  61.  
  62. ?>
  63. </div>
  64.  
  65. </body>
  66. </html>
  67. <div id="remove">
RAW Paste Data
Top