Maintenance Mode is disabled on this site"; } return $desc; } public function getName() { return "MaintenanceMode"; } public function getUUID() { return "6dmaa392-7b14-44fb-aa33-51cba620d92e"; } public function getPluginVersion() { return "1.0"; } public function getStart() { global $global, $config; $forbidden = array( $global['systemRootPath'] . 'view' . DIRECTORY_SEPARATOR . 'index.php', $global['systemRootPath'] . 'view' . DIRECTORY_SEPARATOR . 'channels.php', $global['systemRootPath'] . 'view' . DIRECTORY_SEPARATOR . 'channel.php' ); $SCRIPT_FILENAME = str_replace('/', DIRECTORY_SEPARATOR, $_SERVER["SCRIPT_FILENAME"]); //var_dump($SCRIPT_FILENAME, $forbidden);exit; if (empty($global['disableAdvancedConfigurations']) && !User::isAdmin() && in_array($SCRIPT_FILENAME, $forbidden)) { $obj = $this->getDataObject(); include $global['systemRootPath'] . 'plugin/MaintenanceMode/index.php'; exit; } } public function getEmptyDataObject() { global $global; $obj = new stdClass(); $obj->text = 'Sorry for the inconvenience but we’re performing some maintenance at the moment. If you need to you can always contact us, otherwise we’ll be back online shortly!'; $obj->facebookLink = ''; $obj->twitterLink = ''; $obj->googleLink = ''; $obj->discordLink = ''; $obj->endIn = date("Y-m-d H:i:s", strtotime("+1 week")); $obj->hideClock = false; $obj->backgroundImageURL = $global['webSiteRootURL'] . "plugin/MaintenanceMode/images/bg01.jpg"; return $obj; } public function getFooterCode() { global $global, $config; $obj = $this->getDataObject(); include $global['systemRootPath'] . 'plugin/MaintenanceMode/footer.php'; } }