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