Advertisement
Guest User

pagina: home.php

a guest
Aug 6th, 2013
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. <?php
  2. if(!isset($_GET['action']) or @$_GET['action'] != "Show_All") {
  3.         $news = NEWS::GetLastestNews();
  4.         for($i = 0; $i < count($news); $i++) {
  5.             echo '<div class="title">'.$news[$i]['title'].'</div>';
  6.             echo '<p class="information">'.$news[$i]['information'].'</p>';
  7.         }
  8.         echo '<a style="float:right;text-decoration:none;font-size: 8px; margin-top: -10px;color: black;" href="?p=home&action=Show_All">Show everything</a>';
  9. } elseif($_GET['action'] == "Show_All") {
  10.         $news = NEWS::GetAllNews();
  11.         for($i = 0; $i < count($news); $i++) {
  12.             echo '<div class="title">'.$news[$i]['title'].'</div>';
  13.             echo '<p class="information">'.$news[$i]['information'].'</p>';
  14.         }
  15.         echo '<a style="float:right;text-decoration:none;font-size: 8px;margin-top: -10px;color: black;" href="?p=home">Show less</a>';
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement