Guest User

Untitled

a guest
Jul 12th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <?php
  2. date_default_timezone_set('Europe/Warsaw');
  3. error_reporting(E_ALL);
  4.  
  5. if (isset($_SERVER['SERVER_ADDR']))
  6. {
  7. if (!in_array($_SERVER['SERVER_ADDR'], ['127.0.0.1', '::1', 'localhost']))
  8. {
  9. die('Access deny');
  10. }
  11. }
  12.  
  13. define('BASEDIR', dirname(__FILE__) . '/');
  14. define('LIBDIR', BASEDIR . 'libraries/');
  15.  
  16. define('OUTPUT', BASEDIR . 'output/');
  17.  
  18. define('background', BASEDIR . 'main/image/background/')
  19. define('font', BASEDIR . 'main/fonts/');
  20.  
  21. set_include_path(get_include_path() . PATH_SEPARATOR . LIBDIR);
  22.  
  23. include_once 'scheme.php';
  24. include_once 'cache.php';
  25. include_once 'boostrap.php';
  26. include_once 'teamspeak3.php';
  27. include_once 'fate.php';
  28.  
  29. $reg = Registry::instance();
  30. $reg->config = new Table(include_once 'config.php');
  31. $reg->cache = new Cache(BASEDIR . 'main/cache/');
  32.  
  33.  
  34. if(!$reg->cache->get($reg->config['banner']['data']['name']) || filemtime($reg->cache->file($reg->config['banner']['data']['name'])) + $reg->config['banner']['data']['interval'] < time())
  35. {
Advertisement
Add Comment
Please, Sign In to add comment