-if($return_url)\r
-{\r
- # Per Redirect auf Seite umleiten\r
-\r
- if(!preg_match('!://!',$return_url))\r
- {\r
- # URL vervollstaendigen\r
-\r
- $http_host = ($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];\r
- $protocol = '';\r
- $port = '';\r
-\r
- if($_SERVER['HTTPS'])\r
- {\r
- # SSL-verschluesseltes HTTP\r
-\r
- $protocol = 'https://';\r
- if($_SERVER['SERVER_PORT'] != 443) $port = ':'.$_SERVER['SERVER_PORT'];\r
- }\r
- else\r
- {\r
- # Normales HTTP\r
-\r
- $protocol = 'http://';\r
- if($_SERVER['SERVER_PORT'] != 80) $port = ':'.$_SERVER['SERVER_PORT'];\r
- }\r
-\r
- if(preg_match('!^/!',$return_url))\r
- {\r
- $return_url = $protocol.$http_host.$port.$return_url;\r
- }\r
- else\r
- {\r
- if(preg_match('!/$!',$_SERVER['SCRIPT_NAME'])) $path = substr($_SERVER['SCRIPT_NAME'],0,-1);\r
- $path = substr($path,0,strrpos($path,'/')+1);\r
- if(!preg_match('!^/!',$path)) $path = '/'.$path;\r
-\r
- $return_url = $protocol.$http_host.$port.$path.$return_url;\r
- }\r
- }\r
-\r
- header('Status: 303 See Other');\r
- header('Location: '.$return_url);\r
+if($return_url) {\r
+ # Per Redirect auf Seite umleiten\r
+\r
+ if(!preg_match('!://!',$return_url)) {\r
+ # URL vervollstaendigen\r
+\r
+ $http_host = ($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];\r
+ $protocol = '';\r
+ $port = '';\r
+\r
+ if($_SERVER['HTTPS']) {\r
+ # SSL-verschluesseltes HTTP\r
+\r
+ $protocol = 'https://';\r
+ if($_SERVER['SERVER_PORT'] != 443) $port = ':'.$_SERVER['SERVER_PORT'];\r
+ }\r
+ else {\r
+ # Normales HTTP\r
+\r
+ $protocol = 'http://';\r
+ if($_SERVER['SERVER_PORT'] != 80) $port = ':'.$_SERVER['SERVER_PORT'];\r
+ }\r
+\r
+ if(preg_match('!^/!',$return_url)) {\r
+ $return_url = $protocol.$http_host.$port.$return_url;\r
+ }\r
+ else {\r
+ if(preg_match('!/$!',$_SERVER['SCRIPT_NAME'])) $path = substr($_SERVER['SCRIPT_NAME'],0,-1);\r
+ $path = substr($path,0,strrpos($path,'/')+1);\r
+ if(!preg_match('!^/!',$path)) $path = '/'.$path;\r
+\r
+ $return_url = $protocol.$http_host.$port.$path.$return_url;\r
+ }\r
+ }\r
+\r
+ header('Status: 303 See Other');\r
+ header('Location: '.$return_url);\r