Changeset 812 for trunk/Modules/Redirection/Redirection.php
- Timestamp:
- May 31, 2014, 9:35:15 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Redirection/Redirection.php
r807 r812 20 20 } 21 21 22 function Redirect($Location) 23 { 24 Header($_SERVER['SERVER_PROTOCOL'].' 301 Moved Permanently'); 25 Header('Location: '.$Location); 26 return('<h3 align="center">Požadovaná stránka byla přesunuta do nového umístění.</h3>'); 27 } 28 22 29 function ShowRedirect() 23 30 { 24 Header($_SERVER['SERVER_PROTOCOL'].' 301 Moved Permanently');31 $Output = ''; 25 32 if(count($this->System->PathItems) > 0) 26 33 { 27 if($this->System->PathItems[0] == 'team.php') Header('Location: '.$this->System->Link('/team/'));28 if($this->System->PathItems[0] == 'version.php') Header('Location: '.$this->System->Link('/client-version/'));29 if($this->System->PathItems[0] == 'phpBB3') Header('Location: '.$this->System->Link('/forum/'));30 if($this->System->PathItems[0] == 'phpbb3') Header('Location: '.$this->System->Link('/forum/'));31 if($this->System->PathItems[0] == 'statistic.php') Header('Location: '.$this->System->Link('/progress/'));32 if($this->System->PathItems[0] == 'register.php') Header('Location: '.$this->System->Link('/registrace.php'));33 if($this->System->PathItems[0] == 'dictionary.php') Header('Location: '.$this->System->Link('/dictionary/'));34 if($this->System->PathItems[0] == 'download-addon.php') Header('Location: '.$this->System->Link('/download/'));35 if($this->System->PathItems[0] == 'banners.php') Header('Location: '.$this->System->Link('/referrer/'));36 if($this->System->PathItems[0] == 'download.php') Header('Location: '.$this->System->Link('/download/'));37 if($this->System->PathItems[0] == 'serverlist.php') Header('Location: '.$this->System->Link('/server/'));34 if($this->System->PathItems[0] == 'team.php') $Output = $this->Redirect($this->System->Link('/team/')); 35 if($this->System->PathItems[0] == 'version.php') $Output = $this->Redirect($this->System->Link('/client-version/')); 36 if($this->System->PathItems[0] == 'phpBB3') $Output = $this->Redirect($this->System->Link('/forum/')); 37 if($this->System->PathItems[0] == 'phpbb3') $Output = $this->Redirect($this->System->Link('/forum/')); 38 if($this->System->PathItems[0] == 'statistic.php') $Output = $this->Redirect($this->System->Link('/progress/')); 39 if($this->System->PathItems[0] == 'register.php') $Output = $this->Redirect($this->System->Link('/registrace.php')); 40 if($this->System->PathItems[0] == 'dictionary.php') $Output = $this->Redirect($this->System->Link('/dictionary/')); 41 if($this->System->PathItems[0] == 'download-addon.php') $Output = $this->Redirect($this->System->Link('/download/')); 42 if($this->System->PathItems[0] == 'banners.php') $Output = $this->Redirect($this->System->Link('/referrer/')); 43 if($this->System->PathItems[0] == 'download.php') $Output = $this->Redirect($this->System->Link('/download/')); 44 if($this->System->PathItems[0] == 'serverlist.php') $Output = $this->Redirect($this->System->Link('/server/')); 38 45 if(count($this->System->PathItems) > 1) 39 46 { 40 47 if(($this->System->PathItems[0] == 'team') and ($this->System->PathItems[1] == 'userlist.php')) 41 Header('Location: '.$this->System->Link('/userlist.php'));48 $Output = $this->Redirect($this->System->Link('/userlist.php')); 42 49 if(($this->System->PathItems[0] == 'dictionary') and ($this->System->PathItems[1] == 'user.php')) 43 Header('Location: '.$this->System->Link('/user.php'));50 $Output = $this->Redirect($this->System->Link('/user.php')); 44 51 if(($this->System->PathItems[0] == 'forum') and ($this->System->PathItems[1] == 'index.php')) 45 Header('Location: '.$this->System->Link('/forum/'));52 $Output = $this->Redirect($this->System->Link('/forum/')); 46 53 if(($this->System->PathItems[0] == 'phpbb3') and ($this->System->PathItems[1] == 'index.php')) 47 Header('Location: '.$this->System->Link('/forum/'));54 $Output = $this->Redirect($this->System->Link('/forum/')); 48 55 if(($this->System->PathItems[0] == 'phpBB3') and ($this->System->PathItems[1] == 'index.php')) 49 Header('Location: '.$this->System->Link('/forum/'));56 $Output = $this->Redirect($this->System->Link('/forum/')); 50 57 } 51 58 } 52 return( '<h3 align="center">Požadovaná stránka byla přesunuta do nového umístění.</h3>');59 return($Output); 53 60 } 54 61 }
Note:
See TracChangeset
for help on using the changeset viewer.