[1110] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
| 3 | // | PhpWebGallery - a PHP based picture gallery | |
---|
[1903] | 4 | // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | |
---|
[1110] | 5 | // +-----------------------------------------------------------------------+ |
---|
| 6 | // | branch : BSF (Best So Far) |
---|
| 7 | // | file : $Id: category.php 1949 2007-04-09 23:24:34Z rvelices $ |
---|
| 8 | // | last update : $Date: 2007-04-09 23:24:34 +0000 (Mon, 09 Apr 2007) $ |
---|
| 9 | // | last modifier : $Author: rvelices $ |
---|
| 10 | // | revision : $Revision: 1949 $ |
---|
| 11 | // +-----------------------------------------------------------------------+ |
---|
| 12 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 13 | // | it under the terms of the GNU General Public License as published by | |
---|
| 14 | // | the Free Software Foundation | |
---|
| 15 | // | | |
---|
| 16 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 17 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 18 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 19 | // | General Public License for more details. | |
---|
| 20 | // | | |
---|
| 21 | // | You should have received a copy of the GNU General Public License | |
---|
| 22 | // | along with this program; if not, write to the Free Software | |
---|
| 23 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 24 | // | USA. | |
---|
| 25 | // +-----------------------------------------------------------------------+ |
---|
| 26 | |
---|
| 27 | /* |
---|
| 28 | This file contains now only code to ensure backward url compatibility with |
---|
| 29 | versions before 1.6 |
---|
| 30 | */ |
---|
| 31 | |
---|
| 32 | define('PHPWG_ROOT_PATH','./'); |
---|
| 33 | include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); |
---|
| 34 | |
---|
| 35 | $url_params=array(); |
---|
| 36 | if ( isset($_GET['cat']) ) |
---|
| 37 | { |
---|
| 38 | if ( is_numeric($_GET['cat']) ) |
---|
| 39 | { |
---|
| 40 | $url_params['section'] = 'categories'; |
---|
[1861] | 41 | $result = get_cat_info( $_GET['cat'] ); |
---|
[1288] | 42 | if ( !empty($result) ) |
---|
[1861] | 43 | { |
---|
| 44 | $url_params['category'] = $result; |
---|
| 45 | } |
---|
[1110] | 46 | } |
---|
| 47 | elseif ( in_array($_GET['cat'], |
---|
| 48 | array('best_rated','most_visited','recent_pics','recent_cats') |
---|
| 49 | ) |
---|
| 50 | ) |
---|
| 51 | { |
---|
| 52 | $url_params['section'] = $_GET['cat']; |
---|
| 53 | } |
---|
[1288] | 54 | else |
---|
| 55 | { |
---|
| 56 | page_not_found(''); |
---|
| 57 | } |
---|
[1110] | 58 | } |
---|
| 59 | |
---|
[1846] | 60 | $url = make_index_url($url_params); |
---|
| 61 | if (!headers_sent()) |
---|
| 62 | { |
---|
[1949] | 63 | set_status_header(301); |
---|
[1846] | 64 | redirect_http( $url ); |
---|
| 65 | } |
---|
| 66 | redirect ( $url ); |
---|
[1110] | 67 | |
---|
[1903] | 68 | ?> |
---|