WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Site Unavailable Message
  • Print
Pages: [1]   Go Down

Author Topic: Site Unavailable Message  (Read 7139 times)

Offline marathoner

  • Posts: 495
Site Unavailable Message
« on: July 07, 2008, 01:28:56 AM »
I've had an 'issue' with one of my clients not paying for services on a timely basis. I decided to implement a little code in the template to make it look like the site is unavailable if the bill is not paid by a certain date. There are probably many ways to make the site look unavailable but I wanted to automate the process so that I didn't have to remember to manually change something. One advantage to this is that nothing on the site is actually disabled and is easily put back on-line by changing the $expiry date.

Here is the code that I inserted at the top of my template index.php file if anyone else wants to use it:
Code: [Select]
// This is the "enforce payment of hosting fees" code
$today = strtotime(date("Y-m-d"));
$expiry = strtotime(date("2008-08-01"));
if ($today >= $expiry) {
$msg = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$msg.='<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
$msg.='<head><title>Mohican 100</title></head><body>';
$msg.='<p>This site is temporary unavailable due to unpaid hosting fees</p></body></html>';
echo $msg;
exit;
}

Of course, I'll need to remember to change the date if they really do pay by the due date!
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Site Unavailable Message
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2