From 07f5140771388c9e0c8a99b0dd2e5d950bdb173b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 14 Oct 2021 15:16:42 +1100 Subject: moving h-source subdir out. --- Library/HeaderObj.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Library/HeaderObj.php (limited to 'Library/HeaderObj.php') diff --git a/Library/HeaderObj.php b/Library/HeaderObj.php new file mode 100644 index 0000000..994eb16 --- /dev/null +++ b/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