Footer_Page.php 904 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. require_once($path["model"] . "Lang.php");
  3. require_once($path["model"] . "Social.php");
  4. class Footer_Page{
  5. public $social = [];
  6. public $lang = [];
  7. public function __construct($db, $lang){
  8. $s_social =
  9. "SELECT id " .
  10. "FROM social " .
  11. "WHERE visible = 1; ";
  12. $q_social = mysqli_query($db, $s_social);
  13. while($r_social = mysqli_fetch_array($q_social)){
  14. array_push($this->social, new Social($db, $lang, $r_social["id"]));
  15. }
  16. $s_lang =
  17. "SELECT code AS id " .
  18. "FROM lang " .
  19. "WHERE active = 1; ";
  20. $q_lang = mysqli_query($db, $s_lang);
  21. while($r_lang = mysqli_fetch_array($q_lang)){
  22. array_push($this->lang, new Lang($db, $r_lang["id"]));
  23. }
  24. }
  25. }
  26. ?>