Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- include("include/config.php");
- include("include/functions/import.php");
- STemplate::assign('home',"1");
- STemplate::display('header.tpl');
- STemplate::display('index.tpl');
- STemplate::display('footer.tpl');
- </head>
- <body>
- <?php
- $weekdays = array(
- 'Monday',
- 'Tuesday',
- 'Wednsday',
- 'Thursday',
- 'Friday'
- );
- $holiday = array(
- 'Saturday',
- 'Sunday'
- );
- date_default_timezone_set('Europe/Stockholm');
- $now = new Datetime("now");
- $begintime = new DateTime('09:00');
- $endtime = new DateTime('16:00');
- if($now >= $begintime && $now <= $endtime && in_array( date("l"), $weekdays ) ){
- // between times
- include("include/config.php");
- include("include/functions/import.php");
- STemplate::assign('home',"1");
- STemplate::display('header.tpl');
- STemplate::display('index.tpl');
- STemplate::display('footer.tpl');
- } else {
- // not between times
- // DÖLJ ALLT PÅ SITEN MEN VISA ÄVEN EN 404-SIDA
- echo '<div id="custom404"><h1>404-not found</h1></div>';
- die();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement