Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Site {
- private $name = "Bobbah";
- private $domain = "bobbah.me";
- private $facebook_url = "https://www.facebook.com/BobbahFR/";
- function get_url($path = "")
- {
- $http_server = "http";
- if(isset($_SERVER['HTTPS']) AND $_SERVER['HTTPS'] == "on") {
- $http_server = "https";
- }
- return $http_server."://".$this->domain.(($path) ? "/".$path : "");
- }
- function get_domain()
- {
- return $this->domain;
- }
- function get_name()
- {
- return $this->name;
- }
- function get_facebook_url()
- {
- return $this->facebook_url;
- }
- function get_contact_email()
- {
- return "contact@bobbah.me";
- }
- function get_noreply_email()
- {
- return "noreply@bobbah.me";
- }
- function get_maintenance()
- {
- global $db;
- $maintenanceSql = $db->query("SELECT * FROM cms_maintenance WHERE id = '1'");
- return $maintenanceSql->fetch();
- }
- function under_maintenance()
- {
- $maintenance = $this->get_maintenance();
- return $maintenance['status'];
- }
- }
- $Site = new Site;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement