Update view.php to make possible send HTTP headers

Added function addheader($header) to add HTTP header, when template render via functions rendertemplate() or render() then check headers_sent() and send headers or not. Sorry for bad English.