Advertisement
Guest User

Xing's Blog - index.php

a guest
Dec 9th, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.24 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>Xing's Blog</title>
  5.         <link rel="icon" href="/favicon.ico" type="image/x-icon" />
  6.         <link rel="stylesheet" type="text/css" href="/Style.css" />
  7.         <link rel="stylesheet" type="text/css" href="/Blog/Style.css" />
  8.         <meta name="description" content="Xing's Useless Site" />
  9.         <meta name="author" content="Michael Xing" />
  10.         <meta charset="UTF-8" />
  11.         <script type="text/javascript" src="/Init.js"></script>
  12.     </head>
  13.  
  14.     <body onload="InitScript('NBlog', 'Blog');">
  15.         <a href="/"><img src="/Logo.png" alt="Xing's Site" /></a>
  16.         <div class="MainContainer">
  17.             <nav id="NavBar">
  18.                 <br /><hr />
  19.                 <h4>Navigation</h4>
  20.                 <hr />
  21.                 <noscript><img width="100px" height="100px" src="/Error.png" alt="ERROR"/><h1>Y U NO JAVA-<br />SCRIPT<br />?!?!?!</h1>You must have Javascript enabled to use this site. Sorry about that, but I'm too lazy to make all the pages PHP based.</noscript>
  22.             </nav>
  23.  
  24.             <div class="MainContent">
  25.                 <br /><hr />
  26.                 <h1>Xing's Blog</h1>
  27.                 <hr />
  28.                
  29.                 <!--Begin PHP Generated cr@p - sorry about the weird formatting-->
  30.                 <?php  
  31.                     require 'Includes.php';  
  32.                     $blogPosts = GetBlogPosts();
  33.  
  34.                     foreach ($blogPosts as $post){  
  35.                         $splitDate = explode("/", $post->datePosted);
  36.                         $realDate = $splitDate[2] . "-" . $splitDate[0] . "-" . $splitDate[1];
  37.                         $LP = strip_tags($post->post);
  38.                         $LP2 = explode(" ", $LP);
  39.                         unset($LP);
  40.                        
  41.                         echo"\n";
  42.                         echo "<h2><a class='BlogLink' href='/Blog/BlogPage.php?pid=" . $post->id . "'>";
  43.                         echo "<time datetime='" . $realDate . "'>" . $post->datePosted . "</time>" . " - " . $post->title;
  44.                         echo "</a></h2>";
  45.                        
  46.                         $i = 0;
  47.                         foreach($LP2 as $Word){
  48.                             echo $Word;
  49.                             unset($Word);
  50.                            
  51.                             if(++$i >= 50){
  52.                                 break;
  53.                             } else{
  54.                                 echo " ";
  55.                             }
  56.                         }
  57.                         echo "...";
  58.                        
  59.                         echo "<br /><br />";
  60.                        
  61.                         unset($splitDate);
  62.                         unset($realDate);
  63.                         unset($LP2);
  64.                         unset($post);
  65.                     }
  66.                 ?>
  67.                
  68.                
  69.                 <!--End PHP Generated cr@p - resume normal formatting-->
  70.                
  71.                
  72.                 <hr /><br />
  73.             </div>
  74.         </div>
  75.        
  76.         <br />
  77.         <footer class="PageFooter" id="PageFooter">
  78.            
  79.         </footer>
  80.        
  81.     </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement