From 129934f892850a90f98f8f5a0e7746cfe57bb958 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 28 May 2012 15:31:57 +0000 Subject: added new EasyGiant library --- h-source/Library/HeaderObj.php | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 h-source/Library/HeaderObj.php (limited to 'h-source/Library/HeaderObj.php') diff --git a/h-source/Library/HeaderObj.php b/h-source/Library/HeaderObj.php new file mode 100644 index 0000000..994eb16 --- /dev/null +++ b/h-source/Library/HeaderObj.php @@ -0,0 +1,45 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +//manage the header +class HeaderObj { + + private $domainName; //the base path of the website (domainname) + + public function __construct($domainName) + { + $this->domainName = $domainName; + } + + //redirect to $path after the time $time + //string that appears until the page is redirected + public function redirect($path,$time = 0,$string = null) + { + $completePath = Url::getRoot().$path; + header('Refresh: '.$time.';url='.$completePath); + if (isset($string)) echo $string; + exit; + } + +} -- cgit v1.2.3