- function post_redirect_get($last, $next) { //TODO prepracovat, tohle je uplna picovina...
- //header('Location: '.$_SERVER['REQUEST_URI']); //TODO redirect (need templating system or ob_start() first!!!)
- echo 'Hotovo. Poslední vložený záznam naleznete '.$this->html->link('zde', $last).'.<br />'.
- 'Další záznam přidáte '.$this->html->link('zde', $next).'.';
- die();
+ function post_redirect_get($location, $message='') {
+ $location = $this->html->internal_url($location).'?message='.urlencode($message);
+ header('Location: '.$location);
+ die("Location: $location");