Advertisement
spacechase0

GDN Index

Mar 4th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. <?php
  2.  
  3. require_once( "core.php" );
  4.  
  5. $site->SetPageTitle( "Home" );
  6.  
  7. require_once( 'top.php' );
  8.  
  9. echo( $site->GetPageContent( 2 ) );
  10.  
  11. $news = $site->GetMostRecentNews( 5 );
  12.  
  13. ?>
  14.  
  15.             <h3>News</h3>
  16. <?php
  17.  
  18. if ( is_array( $news ) === false )
  19. {
  20.     echo $news;
  21. }
  22. else
  23. {
  24.     foreach( $news as $key => $article )
  25.     {
  26.         $date  = "Posted on ";
  27.         $date .= date( "l, F j", $article[ 'date' ] );
  28.         $date .= '<sup>' . date( "S", $article[ 'date' ] ) . '</sup> ';
  29.         $date .= date( "Y", $article[ 'date' ] );
  30.         $date .= " at ";
  31.         $date .= date( "g:i A (", $article[ 'date' ] );
  32.         $date .= "GMT";
  33.         $date .= date( " P)", $article[ 'date' ] );
  34.        
  35.         //var_dump( $date );
  36.         ?>
  37.         <p>
  38.             <strong> <?php echo( stripslashes( $article[ 'name' ] ) ); ?> </strong><br/>
  39.             <?php echo( stripslashes( $article[ 'content' ] ) ); ?> <br/>
  40.             <span class="post-date"> <?php echo( $date ); ?> </span>
  41.         </p> <?php
  42.     } ?>
  43.     <p><a href="#">Archive</a></p> <?php
  44. }
  45.  
  46. require_once( 'bottom.php' );
  47.  
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement