Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. if (!isset($_GET['limit']))
  2.             $req = $bdd->query("SELECT * FROM `vie_etudiante` ORDER BY `ID` DESC LIMIT 0, 5 ");
  3.         else
  4.         {
  5.             $nb = intval($_GET['limit']);
  6.             $interval = $nb - 10;
  7.             $req = $bdd->query("SELECT * FROM `vie_etudiante` ORDER BY `ID` DESC LIMIT $interval, $nb");
  8.         }
  9.        
  10.         foreach ($req->fetchAll() as $row)
  11.         {
  12.             if ($row['display'] == '1')
  13.                 echo '<div class="news_box" id="'.$row['ID'].'" style="text-align:center; float:left; background:url(images/cellpic.png) repeat-x; width:980px; height:25px"> <h3 style="display:inline; color:white;"> '.$row['titre'].' </h3> </div>
  14.                 <iframe height="400" width="978" src="./etudiant/vie_etudiante/'.$row['nom'].'"></iframe><br/>
  15.                 <div class="separateur"> </div>';
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement