Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?php
  2. class Site {
  3. private $name = "Bobbah";
  4. private $domain = "bobbah.me";
  5. private $facebook_url = "https://www.facebook.com/BobbahFR/";
  6.  
  7. function get_url($path = "")
  8. {
  9. $http_server = "http";
  10. if(isset($_SERVER['HTTPS']) AND $_SERVER['HTTPS'] == "on") {
  11. $http_server = "https";
  12. }
  13. return $http_server."://".$this->domain.(($path) ? "/".$path : "");
  14. }
  15.  
  16. function get_domain()
  17. {
  18. return $this->domain;
  19. }
  20.  
  21. function get_name()
  22. {
  23. return $this->name;
  24. }
  25.  
  26. function get_facebook_url()
  27. {
  28. return $this->facebook_url;
  29. }
  30.  
  31. function get_contact_email()
  32. {
  33. return "contact@bobbah.me";
  34. }
  35.  
  36. function get_noreply_email()
  37. {
  38. return "noreply@bobbah.me";
  39. }
  40.  
  41. function get_maintenance()
  42. {
  43. global $db;
  44.  
  45. $maintenanceSql = $db->query("SELECT * FROM cms_maintenance WHERE id = '1'");
  46. return $maintenanceSql->fetch();
  47. }
  48.  
  49. function under_maintenance()
  50. {
  51. $maintenance = $this->get_maintenance();
  52. return $maintenance['status'];
  53. }
  54. }
  55. $Site = new Site;
  56. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement