예제 #1
0
/**
 * Utility function to reload the current page
 */
function reload(){
	$movetext = '302 Moved Temporarily';

	header('X-Content-Encoded-By: Core Plus ' . (DEVELOPMENT_MODE ? \Core::GetComponent()->getVersion() : ''));
	if(\ConfigHandler::Get('/core/security/x-frame-options')){
		header('X-Frame-Options: ' . \ConfigHandler::Get('/core/security/x-frame-options'));
	}
	if(\ConfigHandler::Get('/core/security/csp-frame-ancestors')){
		header('Content-Security-Policy: frame-ancestors \'self\' ' . \ConfigHandler::Get('/core/security/content-security-policy'));
	}
	header('HTTP/1.1 302 Moved Temporarily');
	header('Location:' . CUR_CALL);

	// Just before the page stops execution...
	\HookHandler::DispatchHook('/core/page/postrender');

	die('If your browser does not refresh, please <a href="' . CUR_CALL . '">Click Here</a>');
}