Guest User

Untitled

a guest
May 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <?php
  2. /** TP6 - Applications web
  3. * XSL, SQL et PHP
  4. *
  5. * @author Andrew Koster
  6. * @copyright 2008
  7. */
  8.  
  9. class Criteres {
  10.  
  11. private $_id;
  12. private $_resultatstps_id;
  13.  
  14. public function __construct($resultatstps_id)
  15. {
  16. $this->_resultatstps_id = $resultatstps_id;
  17. }
  18.  
  19. function show()
  20. {
  21. $result = mysql_query(
  22. "SELECT * FROM tbl6resultatstps_criteres "
  23. ."WHERE resultatstps_id = $this->_resultatstps_id"
  24. );
  25.  
  26. $out = "";
  27.  
  28. while($row = mysql_fetch_array($result)) {
  29. $note = $row['noteCritere'];
  30. $nom = utf8_encode($row['critere_nom']);
  31. $out = $out."<dt>$note</dt><dd>$nom</dd>";
  32. }
  33. return $out;
  34. }
  35.  
  36. function id()
  37. {
  38. return $this->_id;
  39. }
  40.  
  41. function note()
  42. {
  43. return $this->_note;
  44. }
  45.  
  46. function commentaire()
  47. {
  48. return $this->_commentaire;
  49. }
  50. }
  51. ?>
Add Comment
Please, Sign In to add comment