bludit/bl-kernel/helpers/redirect.class.php

25 lines
418 B
PHP
Raw Normal View History

2015-03-27 01:00:01 +00:00
<?php defined('BLUDIT') or die('Bludit CMS.');
2015-03-08 14:02:59 -03:00
class Redirect {
2015-03-27 01:00:01 +00:00
public static function url($url)
2015-03-08 14:02:59 -03:00
{
2017-05-16 00:46:20 +02:00
if(!headers_sent()) {
2015-03-27 01:00:01 +00:00
header("Location:".$url, TRUE, 302);
2015-03-08 14:02:59 -03:00
exit;
}
2015-03-27 01:00:01 +00:00
exit('<meta http-equiv="refresh" content="0; url='.$url.'"/>');
2015-03-08 14:02:59 -03:00
}
2017-05-16 00:46:20 +02:00
public static function page($page)
2015-03-08 14:02:59 -03:00
{
self::url(HTML_PATH_ROOT.ADMIN_URI_FILTER.'/'.$page);
2015-03-08 14:02:59 -03:00
}
2015-05-14 22:07:45 +00:00
public static function home()
{
self::url(HTML_PATH_ROOT);
}
2017-05-16 00:46:20 +02:00
}