Advertisement
Z645

Home.php

Apr 19th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.85 KB | None | 0 0
  1. <?php
  2.  
  3. include('core/init.inc.php');
  4.  
  5. if (isset($_POST['user'], $_POST['body'])){
  6.     add_post($_POST['user'], $_POST['body']);
  7.     header('Location: http://vibeate.webege.com/home.php');
  8.     die();
  9. }
  10.  
  11. ?>
  12. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  13. <html>
  14.     <head>
  15.         <title>Welcome to ViBeate</title>
  16.         <meta name="description" content="Welcome to ViBeate. ViBeate allows you to connect with friends, family, and co-workers." />
  17.         <meta name="keywords" content="social, networking, games, chat, hangout, friends" />
  18.         <meta name="robots" content="index, follow" />
  19.  
  20.         <link rel="stylesheet" href="styles/style.css" type="text/css">
  21.         <script type="text/javascript">
  22.           WebFontConfig = {
  23.             google: { families: [ 'Chewy::latin' ] }
  24.           };
  25.           (function() {
  26.             var wf = document.createElement('script');
  27.             wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
  28.               '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
  29.             wf.type = 'text/javascript';
  30.             wf.async = 'true';
  31.             var s = document.getElementsByTagName('script')[0];
  32.             s.parentNode.insertBefore(wf, s);
  33.           })(); </script>
  34.     </head>
  35.    
  36.     <body>
  37.         <div id="wrapper">
  38.             <?php include('extras/menu.php'); ?>
  39.             <br />
  40.             <br />
  41.             <div id="main">
  42.                 <div id="left_side">
  43.                     <form action="" method="post">
  44.                         <p>
  45.                             <input type="text" value="<?php echo $_SESSION['username']; ?>" name="user" id="user" hidden>
  46.                         </p>
  47.                         <p>
  48.                             <textarea name="body" rows="5" cols="60" placeholder="Post a status here..."></textarea>
  49.                         </p>
  50.                         <p>
  51.                             <input type="submit" value="Post" />
  52.                         </p>
  53.                     </form>
  54.                     <?php
  55.                         $posts = get_posts();
  56.                        
  57.                         foreach ($posts as $post){
  58.                             ?>
  59.                             <h3><a href="http://vibeate.webege.com/users/portfolio.php?uid=<?php echo $user_info['id']; ?>"><?php echo $post['user']; ?></a></h3> Posted on <?php echo $post['date']; ?>
  60.                             <hr />
  61.                             <p><?php echo $post['preview']; ?></p>
  62.                             <i><a href="read_post.php?pid=<?php echo $post['id']; ?>">(<?php echo $post['total_comments']; ?> comments) <?php echo $post['last_comment']; ?></a></i>
  63.                             <?php
  64.                         }
  65.                        
  66.                     ?>
  67.                 </div>
  68.                
  69.                 <div id="right_side">
  70.                     <div class="ads">
  71.                         /*Advertisments go here*/
  72.                         Advertisment
  73.                     </div>
  74.                     <br />
  75.                     <div class="footer">
  76.                         <center><?php include('extras/footer.php'); ?></center>
  77.                     </div>
  78.                 </div>
  79.             </div>
  80.         </div>
  81.     </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement